summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Spanti <nicola.spanti@logilab.fr>2019-11-19 11:45:20 +0100
committerNicola Spanti <nicola.spanti@logilab.fr>2019-11-19 11:45:20 +0100
commit1fd09033a846d2dddfea78b2a413d243d330f283 (patch)
treee8a4ccb76ff64d3973ad7c9e8a2048522242be91
parent6145fc34878e1a741361e08304e7f364979df7b5 (diff)
downloadlogilab-common-1fd09033a846d2dddfea78b2a413d243d330f283.tar.gz
Drop dependency on six
-rw-r--r--__pkginfo__.py1
-rw-r--r--debian/changelog1
-rw-r--r--debian/control3
-rw-r--r--logilab/common/compat.py21
-rw-r--r--test/data/__pkginfo__.py4
5 files changed, 9 insertions, 21 deletions
diff --git a/__pkginfo__.py b/__pkginfo__.py
index a85030f..8b734a5 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -46,7 +46,6 @@ include_dirs = [join('test', 'data')]
install_requires = [
'setuptools',
- 'six >= 1.4.0',
]
tests_require = [
'pytz',
diff --git a/debian/changelog b/debian/changelog
index ef008e4..a5c5f36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
logilab-common (1.4.4-1.1) UNRELEASED; urgency=medium
+ * Drop dependency on six
* Drop python2 packaging
-- Philippe Pepiot <philippe.pepiot@logilab.fr> Fri, 08 Nov 2019 13:50:50 +0100
diff --git a/debian/control b/debian/control
index a321470..0fc7956 100644
--- a/debian/control
+++ b/debian/control
@@ -15,8 +15,6 @@ Build-Depends:
Build-Depends-Indep:
graphviz,
python3-tz | python3 (<< 3.3),
- python-six (>= 1.4.0),
- python3-six (>= 1.4.0) | python3 (<< 3.3),
X-Python3-Version: >= 3.3
Standards-Version: 3.9.1
Homepage: http://www.logilab.org/project/logilab-common
@@ -26,7 +24,6 @@ Vcs-Browser: http://hg.logilab.org/logilab/common
Package: python3-logilab-common
Architecture: all
Depends:
- python3-six (>= 1.4.0),
${python3:Depends},
${misc:Depends},
#Recommends:
diff --git a/logilab/common/compat.py b/logilab/common/compat.py
index f2eb590..eee0a61 100644
--- a/logilab/common/compat.py
+++ b/logilab/common/compat.py
@@ -35,21 +35,14 @@ import types
from warnings import warn
# not used here, but imported to preserve API
-from six.moves import builtins
+import builtins
-if sys.version_info < (3, 0):
- str_to_bytes = str
- def str_encode(string, encoding):
- if isinstance(string, unicode):
- return string.encode(encoding)
- return str(string)
-else:
- def str_to_bytes(string):
- return str.encode(string)
- # we have to ignore the encoding in py3k to be able to write a string into a
- # TextIOWrapper or like object (which expect an unicode string)
- def str_encode(string, encoding):
- return str(string)
+def str_to_bytes(string):
+ return str.encode(string)
+# we have to ignore the encoding in py3k to be able to write a string into a
+# TextIOWrapper or like object (which expect an unicode string)
+def str_encode(string, encoding):
+ return str(string)
# See also http://bugs.python.org/issue11776
if sys.version_info[0] == 3:
diff --git a/test/data/__pkginfo__.py b/test/data/__pkginfo__.py
index 39df3b6..d1f5731 100644
--- a/test/data/__pkginfo__.py
+++ b/test/data/__pkginfo__.py
@@ -40,9 +40,7 @@ from os.path import join
scripts = [join('bin', 'logilab-pytest')]
include_dirs = [join('test', 'data')]
-install_requires = [
- 'six >= 1.4.0',
- ]
+install_requires = []
tests_require = ['pytz']
if sys.version_info < (2, 7):