File tree Expand file tree Collapse file tree 8 files changed +44
-19
lines changed Expand file tree Collapse file tree 8 files changed +44
-19
lines changed Original file line number Diff line number Diff line change 1
1
Change log
2
2
================================================================================
3
3
4
+ 0.5.17 - 04.04.2019
5
+ --------------------------------------------------------------------------------
6
+
7
+ updated
8
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9
+
10
+ #. `#68 <https://github.com/pyexcel/pyexcel-io/issues/68 >`_: Raise IOError when
11
+ the data file does not exist
12
+
4
13
0.5.16 - 19.03.2019
5
14
--------------------------------------------------------------------------------
6
15
Original file line number Diff line number Diff line change 1
1
name : pyexcel-io
2
2
organisation : pyexcel
3
3
releases :
4
+ - changes :
5
+ - action : updated
6
+ details :
7
+ - ' `#68`: Raise IOError when the data file does not exist'
8
+ version : 0.5.17
9
+ date : 04.04.2019
4
10
- changes :
5
11
- action : updated
6
12
details :
Original file line number Diff line number Diff line change 20
20
copyright = 'copyright 2015-2019 Onni Software Ltd.'
21
21
author = 'C.W.'
22
22
# The short X.Y version
23
- version = '0.5.16 '
23
+ version = '0.6.0 '
24
24
# The full version, including alpha/beta/rc tags
25
- release = '0.5.16 '
25
+ release = '0.5.17 '
26
26
27
27
10000
# -- General configuration ---------------------------------------------------
28
28
Original file line number Diff line number Diff line change 10
10
:Source code: http://github.com/pyexcel/pyexcel-io.git
11
11
:Issues: http://github.com/pyexcel/pyexcel-io/issues
12
12
:License: New BSD License
13
+ :Development: |release |
13
14
:Released: |version |
14
15
:Generated: |today |
15
16
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ overrides: "pyexcel.yaml"
2
2
project : " pyexcel-io"
3
3
name : pyexcel-io
4
4
nick_name : io
5
- version : 0.5.16
6
- current_version : 0.5.16
7
- release : 0.5.16
5
+ version : 0.6.0
6
+ current_version : 0.6.0
8
7
copyright_year : 2015-2019
8
+ release : 0.5.17
9
9
dependencies :
10
10
- ordereddict;python_version<"2.7"
11
11
- lml>=0.0.4
Original file line number Diff line number Diff line change 7
7
:copyright: (c) 2014-2017 by Onni Software Ltd.
8
8
:license: New BSD License, see LICENSE for more details
9
9
"""
10
+ import os
10
11
import warnings
11
12
from types import GeneratorType
12
13
13
- import pyexcel_io .constants as constants
14
+ from pyexcel_io ._compact import isstream , PY2
14
15
from pyexcel_io .plugins import READERS , WRITERS
15
- from pyexcel_io ._compact import PY2 , isstream
16
+ from pyexcel_io .exceptions import NoSupportingPluginFound
16
17
17
18
18
19
def iget_data (afile , file_type = None , ** keywords ):
@@ -166,7 +167,15 @@ def load_data(
166
167
except AttributeError :
167
168
raise Exception ("file_name should be a string type" )
168
169
169
- reader = READERS .get_a_plugin (file_type , library )
170
+ try :
171
+ reader = READERS .get_a_plugin (file_type , library )
172
+ except NoSupportingPluginFound :
173
+ if file_name :
174
+ if not os .path .exists (file_name ):
175
+ raise IOError ("%s does not exist" % file_name )
176
+ else :
177
+ raise
178
+
170
179
if file_name :
171
180
reader .open (file_name , ** keywords )
172
181
elif file_content :
Original file line number Diff line number Diff line change 29
29
30
30
NAME = 'pyexcel-io'
31
31
AUTHOR = 'C.W.'
32
- VERSION = '0.5.16 '
33
- EMAIL = 'wangc_2011@hotmail.com '
32
+ VERSION = '0.6.0 '
33
+ EMAIL = 'info@pyexcel.org '
34
34
LICENSE = 'New BSD'
35
35
DESCRIPTION = (
36
36
'A python library to read and write structured data in csv, zipped csv' +
37
37
'format and to/from databases'
38
38
)
39
39
URL = 'https://github.com/pyexcel/pyexcel-io'
40
- DOWNLOAD_URL = '%s/archive/0.5.16 .tar.gz' % URL
40
+ DOWNLOAD_URL = '%s/archive/0.5.17 .tar.gz' % URL
41
41
FILES = ['README.rst' , 'CHANGELOG.rst' ]
42
42
KEYWORDS = [
43
43
'python' ,
81
81
# You do not need to read beyond this line
82
82
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi' .format (
83
83
sys .executable )
84
- GS_COMMAND = ('gs pyexcel-io v0.5.16 ' +
85
- "Find 0.5.16 in changelog for more details" )
84
+ GS_COMMAND = ('gs pyexcel-io v0.5.17 ' +
85
+ "Find 0.5.17 in changelog for more details" )
86
86
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
87
87
'Please install gease to enable it.' )
88
88
UPLOAD_FAILED_MSG = (
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ def test_force_file_type():
23
23
eq_ (expected , data [test_file ])
24
24
25
25
26
+ @raises (IOError )
27
+ def test_invalid_file ():
28
+ load_data ('/something/does/not/exist' )
29
+
30
+
26
31
@raises (IOError )
27
32
def test_no_valid_parameters ():
28
33
load_data ()
@@ -83,7 +88,7 @@ def test_write_xlsx_data_to_memory():
83
88
eq_ (str (e ), msg )
84
89
85
90
86
- @raises (exceptions . NoSupportingPluginFound )
91
+ @raises (IOError )
87
92
def test_load_unknown_data ():
88
93
get_data ("test.unknown" )
89
94
@@ -108,11 +113,6 @@ def test_write_xlsx_data():
108
113
get_data ("test.xlsx" )
109
114
110
115
111
- @raises (exceptions .NoSupportingPluginFound )
112
- def test_write_unknown_data ():
113
- get_data ("test.unknown" )
114
-
115
-
116
116
@raises (Exception )
117
117
def test_writer_csvz_data_from_memory ():
118
118
if not PY2 :
You can’t perform that action at this time.
0 commit comments