[Python-modules-commits] [python-future] 03/03: Remove configparser module and depends on python-configparser

Vincent Bernat bernat at moszumanska.debian.org
Tue May 3 19:43:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

bernat pushed a commit to branch master
in repository python-future.

commit b9845834eb3980dedeaf00ff71d9362b74a3074a
Author: Vincent Bernat <vincent at bernat.im>
Date:   Tue May 3 21:28:02 2016 +0200

    Remove configparser module and depends on python-configparser
---
 debian/changelog                                |  2 +
 debian/control                                  |  2 +-
 debian/patches/remove-configparser-module.patch | 60 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 4 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 0f121f8..002fbff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ python-future (0.15.2-2) UNRELEASED; urgency=medium
   [ Vincent Bernat ]
   * d/control: Bump Standards-Version.
   * d/rules: Switch to pybuild.
+  * Remove configparser module and depends on python-configparser
+    instead. Closes: #822157.
 
  -- Vincent Bernat <bernat at debian.org>  Tue, 03 May 2016 21:06:42 +0200
 
diff --git a/debian/control b/debian/control
index 5cbb1ab..ff89176 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Homepage: https://python-future.org
 Package: python-future
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
-Depends: ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python:Depends}, python-configparser
 Suggests: python-future-doc
 Description: single-source support for Python 3 and 2 - Python 2.x
  Future is the missing compatibility layer between Python 2 and Python 3. It
diff --git a/debian/patches/remove-configparser-module.patch b/debian/patches/remove-configparser-module.patch
new file mode 100644
index 0000000..b439bd1
--- /dev/null
+++ b/debian/patches/remove-configparser-module.patch
@@ -0,0 +1,60 @@
+Bug-Debian: https://bugs.debian.org/822157
+Bug: https://github.com/PythonCharmers/python-future/issues/118
+
+Don't ship a configparser module.
+
+This module is already backported in python-configparser package.
+
+diff --git a/setup.py b/setup.py
+index 7c81a099c132..1b2380c85dae 100755
+--- a/setup.py
++++ b/setup.py
+@@ -58,7 +58,6 @@ PACKAGES = ["future",
+ if sys.version_info[:2] < (3, 0):
+     PACKAGES += [
+             "builtins",
+-            "configparser",
+             "copyreg",
+             "html",
+             "http",
+@@ -134,7 +133,6 @@ try:
+                           '_markupbase',
+                           '_thread',
+                           'builtins',
+-                          'configparser',
+                           'copyreg',
+                           'html',
+                           'http',
+diff --git a/src/configparser/__init__.py b/src/configparser/__init__.py
+deleted file mode 100644
+index 3642c5ec19df..000000000000
+--- a/src/configparser/__init__.py
++++ /dev/null
+@@ -1,13 +0,0 @@
+-from __future__ import absolute_import
+-import sys
+-
+-if sys.version_info[0] < 3:
+-    from ConfigParser import *
+-    try:
+-        from ConfigParser import (_Chainmap, Error, InterpolationMissingOptionError)
+-    except ImportError:
+-        pass
+-else:
+-    raise ImportError('This package should not be accessible on Python 3. '
+-                      'Either you are trying to run from the python-future src folder '
+-                      'or your installation of python-future is corrupted.')
+diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py
+index 399d587fcb53..62b40a251a5d 100644
+--- a/tests/test_future/test_standard_library.py
++++ b/tests/test_future/test_standard_library.py
+@@ -271,9 +271,6 @@ class TestStandardLibraryReorganization(CodeHandler):
+         with self.assertRaises(CalledProcessError):
+             output = self._run_test_script('importme1.py')
+ 
+-    def test_configparser(self):
+-        import configparser
+-    
+     def test_copyreg(self):
+         import copyreg
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8a76106..e97d6dd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 do-not-use-bootstrap.patch
 removes-privacy-breach-in-docs.patch
+remove-configparser-module.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-future.git



More information about the Python-modules-commits mailing list