diff options
| author | Peyman Salehi <peymanslh@pm.me> | 2019-10-05 00:38:55 +0330 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2019-10-19 16:30:57 +0200 |
| commit | b3c7145c4079fe3d0c76c45421c02b96cc74b624 (patch) | |
| tree | 2734a57dc011276b0377624910d9ee0abe82e441 /src/tablib/compat.py | |
| parent | 44f43516a582f500cda3b37dbab9faa247d3f3f1 (diff) | |
| download | tablib-b3c7145c4079fe3d0c76c45421c02b96cc74b624.tar.gz | |
Drop python 2 support
Remove support python 2 from doc, requirements.txt and config
Replace unicode with str
Remove dbfpy folder and rename dbfpy3 to dbfpy
Remove compat file and remove python2 packages from dependency
Diffstat (limited to 'src/tablib/compat.py')
| -rw-r--r-- | src/tablib/compat.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/tablib/compat.py b/src/tablib/compat.py deleted file mode 100644 index 1956e99..0000000 --- a/src/tablib/compat.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -tablib.compat -~~~~~~~~~~~~~ - -Tablib compatibility module. - -""" - -import sys - -is_py3 = (sys.version_info[0] > 2) - - -if is_py3: - from io import StringIO - from statistics import median - from itertools import zip_longest as izip_longest - import csv - import tablib.packages.dbfpy3 as dbfpy - - unicode = str - xrange = range - -else: - from StringIO import StringIO - from tablib.packages.statistics import median - from itertools import izip_longest - from backports import csv - import tablib.packages.dbfpy as dbfpy - - unicode = unicode - xrange = xrange - -from MarkupPy import markup # Kept temporarily to avoid breaking existing imports |
