summaryrefslogtreecommitdiff
path: root/tablib/compat.py
Commit message (Collapse)AuthorAgeFilesLines
* io.BytesIO is also available in Python 2.7Claude Paroz2019-10-031-2/+0
|
* Refs #273 - Replaced vendored markup lib by dependencyClaude Paroz2019-10-031-2/+2
|
* Merge branch 'master' into bugfix/invalid-ascii-csvBruno Alla2019-03-021-16/+6
|\ | | | | | | | | | | | | # Conflicts: # setup.py # tablib/compat.py # test_tablib.py
| * Merge pull request #343 from jdufresne/odParth Shandilya2019-03-021-7/+0
| |\ | | | | | | Remove vendored ordereddict package
| | * Remove vendored ordereddict packageJon Dufresne2019-01-011-7/+0
| | | | | | | | | | | | | | | Now that Python 2.6 support has been dropped, can remove the vendored ordereddict package. Use the stdlib collections.OrderedDict instead.
| * | Remove unused compat entriesJon Dufresne2019-01-011-11/+5
| |/ | | | | | | | | | | | | | | | | | | | | Organize both the Python2 & Python3 sections in the same order so they are easier to compare. Removed: - basestring - ifilter - bytes
| * reStructuredText (#336)Norman Hooper2018-09-121-1/+4
| | | | | | | | | | | | | | | | | | | | * median for Python 2 * More compat * Support reStructuredText * Tests
* | Fix unicode encode errors on Python 2 -- Fixes #215Bruno Alla2017-05-021-2/+2
|/ | | | | | | | | | | | | | Switch csv library to backports.csv as the implementation is closer to the python 3 one. Add a test case covering the problem. Run tests with unicode_literals from future Fix unicode encode errors with unicode characters - Use `backports.csv` instead of `unicodecsv` - Use StringIO instead of cStringIO - Clean-up some Python 2 specific code
* Replaced vendored odfpy by a dependency (#280)Claude Paroz2017-02-261-2/+0
| | | Refs #273.
* Replaced vendored xlrd/xlwt by dependencies (#277)Claude Paroz2017-02-201-6/+0
| | | Refs #273.
* Replaced vendored openpyxl by a dependency (#221)Claude Paroz2017-02-201-2/+0
| | | | | | | | | | | | It is time to make it happen. * Dropped Python 3.2 support Recent dependencies are dropping Python 3.2 too. * Replaced vendored openpyxl by a dependency Thanks Tommy Anthony for the initial patch.
* Replaced vendored unicodecsv by a dependencyBruno Alla2017-01-151-1/+1
| | | | Using https://pypi.python.org/pypi/unicodecsv/0.14.1
* python 3 fix: map filter to ifilterPeter M. Landwehr2016-02-271-0/+1
|
* Fixed a compatibility bug for Python 3 by adding xrange toThomas Anthony2015-05-261-0/+2
| | | | | | | | | compat.py. The code in tablib/formats/_xls.py used xrange in parsing excel spreadsheets. xrange is not a builtin for Python 3, so I've added xrange = range in compat.py and imported it in tablib/formats/_xls.py.
* Adding DBF support.James Douglass2014-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashing two squashes. Adding DBF support Adding the DBFpy python package The DBFpy package provides basic dbf support for python. Still need to write an interface format file for tablib. Adding DBF format and imports in compat.py Adding DBF format to formats.__init__ DBF format had not been committed to formats.__init__, so I’m adding it. Adding a dbf import test Adding at test to check whether a DBF can be created properly and compare it against a regression binary string. Adding an import_set test (and renaming another) Adding an import_set test that conforms with the other import_set tests for other formats. I’m also adding an export_set function. Fixing system site-packages import Importing dbfpy from tab lib.packages instead of system site packages. Fixing a syntaxError in dbfpy/dbfnew.py Fixing an issue with ending field definitions DBFPY, when writing a DBF, terminates the field definitions with a newline character. When importing a DBF from a stream, however, DBFPY was looking only for the \x0D character rather than the newline. Now we consider both cases. Adding a test for dbf format detection Adding DBF filetype detection tests Adding tests for YAML, JSON, TSV, CSV using the DBF detection function. Handling extra exceptions in dbf detection Adding exception handling for struct.error, an exception that DBFPY raises when trying to unpack a TSV table. Since it’s not a DBF file, we know it’s not a DBF and return False. Fixing an issue with the DBF set exporting test The DBF set export test needed a bit enabled (probably the writeable bit?) before the test would match the regression output. Updating dbf interface Updating the int/float class/type checking in the dbf format file. This allows for python2 and python3 compatibility. Tweaking dbfpy to work with python3 Altering a couple of imports. Updating dbf tests for binary data compatibility Making regression strings binary and improving debug messages for dbf assertion errors. Improving file handling for python 2 and 3 Updating DBF file handling for both python 2 and 3 in the _dbf interface. Adding a (seemingly) functional dbfpy for python3 I’ve made dbfpy python3 compatible! Tests appear to pass. A significant change was made to the format detection test whereby I made the input string a binary (bytes) string. If the string is not a bytes string by the time we try to detect the format, we try to decode the string as utf-8 (which admittedly might not be the safest thing to do) and try to decode anyways. Updating imports for tablib dbf interface Now importing python2 or python3 versions as appropriate. Updating dbf package references in compat.py Cleaning up debugging print statements Updating stream handling in dbf interface Factoring the open() call out of the py3 conditional and removing the temp file before returning the stream value. Adding dbfpy3 init.py I had apparently missed the dbfpy3 init file when committing dbfpy3. Adding dbfpy and dbfpy3 to setup.py's package list Switching test order of formats Putting dbf format testing ahead of TSV. In some of my tests with numeric DBF files, I encountered an issue where the ASCII horizontal tab character (0x09) would appear in a numeric DBF. Because of the order of tabular format imports, though, format detection would recognize it as a TSV and not as a DBF. Adding my name to AUTHORS. Adding a DBF property to tab lib core Documentation includes examples on how to explicitly load a DBF straight from a file and how to load a DBF from a binary string. Also, how to write the binary data to a file. Adding DBF format notes to README Adding exclamation point to DBF section title Matching formatting of XLS section Updating setup.py to match current dev state Setup.py had been updated since I forked the tablib repo, so I’m updating setup.py to match its current structure while still maintaining DBF compatibility. Fixed callable collumn test the test was sending a list instead of a function CORE CONTRIBUTORS :cake: @iurisilvio v0.10.0 WHEELS 3.3, 3.4 makefile for WHEELS v0.10.0 history ALL Separate py2 and py3 packages to avoid installation errors. Fix #151 Running travis and tox with python 3.4. Adding DBF support Adding the DBFpy python package The DBFpy package provides basic dbf support for python. Still need to write an interface format file for tablib. Adding DBF format and imports in compat.py Adding DBF format to formats.__init__ DBF format had not been committed to formats.__init__, so I’m adding it. Adding a dbf import test Adding at test to check whether a DBF can be created properly and compare it against a regression binary string. Adding an import_set test (and renaming another) Adding an import_set test that conforms with the other import_set tests for other formats. I’m also adding an export_set function. Fixing system site-packages import Importing dbfpy from tab lib.packages instead of system site packages. Fixing a syntaxError in dbfpy/dbfnew.py Fixing an issue with ending field definitions DBFPY, when writing a DBF, terminates the field definitions with a newline character. When importing a DBF from a stream, however, DBFPY was looking only for the \x0D character rather than the newline. Now we consider both cases. Adding a test for dbf format detection Adding DBF filetype detection tests Adding tests for YAML, JSON, TSV, CSV using the DBF detection function. Handling extra exceptions in dbf detection Adding exception handling for struct.error, an exception that DBFPY raises when trying to unpack a TSV table. Since it’s not a DBF file, we know it’s not a DBF and return False. Fixing an issue with the DBF set exporting test The DBF set export test needed a bit enabled (probably the writeable bit?) before the test would match the regression output. Updating dbf interface Updating the int/float class/type checking in the dbf format file. This allows for python2 and python3 compatibility. Tweaking dbfpy to work with python3 Altering a couple of imports. Updating dbf tests for binary data compatibility Making regression strings binary and improving debug messages for dbf assertion errors. Improving file handling for python 2 and 3 Updating DBF file handling for both python 2 and 3 in the _dbf interface. Adding a (seemingly) functional dbfpy for python3 I’ve made dbfpy python3 compatible! Tests appear to pass. A significant change was made to the format detection test whereby I made the input string a binary (bytes) string. If the string is not a bytes string by the time we try to detect the format, we try to decode the string as utf-8 (which admittedly might not be the safest thing to do) and try to decode anyways. Updating imports for tablib dbf interface Now importing python2 or python3 versions as appropriate. Updating dbf package references in compat.py Cleaning up debugging print statements Updating stream handling in dbf interface Factoring the open() call out of the py3 conditional and removing the temp file before returning the stream value. Adding dbfpy3 init.py I had apparently missed the dbfpy3 init file when committing dbfpy3. Adding dbfpy and dbfpy3 to setup.py's package list Switching test order of formats Putting dbf format testing ahead of TSV. In some of my tests with numeric DBF files, I encountered an issue where the ASCII horizontal tab character (0x09) would appear in a numeric DBF. Because of the order of tabular format imports, though, format detection would recognize it as a TSV and not as a DBF. Adding my name to AUTHORS. Adding a DBF property to tab lib core Documentation includes examples on how to explicitly load a DBF straight from a file and how to load a DBF from a binary string. Also, how to write the binary data to a file. Adding DBF format notes to README Adding exclamation point to DBF section title Matching formatting of XLS section Updating setup.py to match current dev state Setup.py had been updated since I forked the tablib repo, so I’m updating setup.py to match its current structure while still maintaining DBF compatibility. Fixed callable collumn test the test was sending a list instead of a function CORE CONTRIBUTORS :cake: @iurisilvio v0.10.0 WHEELS 3.3, 3.4 makefile for WHEELS v0.10.0 history ALL Separate py2 and py3 packages to avoid installation errors. Fix #151 Running travis and tox with python 3.4.
* Changes for Python 3 compatibility, including vendorizing xlrd3Marc Abramowitz2012-05-151-1/+4
|
* Added XLS import supportGreg Thornton2011-07-141-0/+1
|
* 2.x bytesio fixKenneth Reitz2011-05-221-0/+2
|
* BytesIOKenneth Reitz2011-05-221-1/+0
|
* csv compatibilityKenneth Reitz2011-05-221-0/+3
|
* Merge pull request #14 from f4nt/tablibKenneth Reitz2011-05-221-3/+2
|\ | | | | | | | | | | | | | | | | --- This should provide basic support for OpenDocument spreadsheets. I didnt have py2.7 installed to test with in tox, but 2.5, 2.6, and py3k passed all tests with tox for me. Lemme know if you see any issues I may have glossed over. Conflicts: tablib/compat.py
| * start of the py3k port of odfpyMark Rogers2011-05-141-0/+2
| |
* | subtle format cleanupsKenneth Reitz2011-05-141-1/+5
| |
* | fewer 2/3 mappingsKenneth Reitz2011-05-141-8/+1
|/
* success!!Kenneth Reitz2011-05-131-0/+2
|
* additional compat mappingsKenneth Reitz2011-05-121-0/+14
|
* compat moduleKenneth Reitz2011-05-121-4/+19
|
* no more core25Kenneth Reitz2011-05-121-2/+2
|
* initial compat moduleKenneth Reitz2011-05-111-0/+18