|
|
4c4d6ea |
From 89da05a84da87ba298a5f8770b899050d127280c Mon Sep 17 00:00:00 2001
|
|
|
4c4d6ea |
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
4c4d6ea |
Date: Sun, 9 Nov 2014 17:52:41 -0500
|
|
|
4c4d6ea |
Subject: [PATCH 1/2] Remove configparser backport.
|
|
|
4c4d6ea |
|
|
|
4c4d6ea |
It conflicts with another backport.
|
|
|
4c4d6ea |
|
|
|
4c4d6ea |
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
4c4d6ea |
---
|
|
|
4c4d6ea |
setup.py | 6 ++----
|
|
|
4c4d6ea |
src/configparser/__init__.py | 13 -------------
|
|
|
4c4d6ea |
tests/test_future/test_standard_library.py | 3 ---
|
|
|
4c4d6ea |
3 files changed, 2 insertions(+), 20 deletions(-)
|
|
|
4c4d6ea |
delete mode 100644 src/configparser/__init__.py
|
|
|
4c4d6ea |
|
|
|
4c4d6ea |
diff --git a/setup.py b/setup.py
|
|
|
4c4d6ea |
index 7c81a09..bbaef58 100755
|
|
|
4c4d6ea |
--- a/setup.py
|
|
|
4c4d6ea |
+++ b/setup.py
|
|
|
4c4d6ea |
@@ -58,7 +58,6 @@ PACKAGES = ["future",
|
|
|
4c4d6ea |
if sys.version_info[:2] < (3, 0):
|
|
|
4c4d6ea |
PACKAGES += [
|
|
|
4c4d6ea |
"builtins",
|
|
|
4c4d6ea |
- "configparser",
|
|
|
4c4d6ea |
"copyreg",
|
|
|
4c4d6ea |
"html",
|
|
|
4c4d6ea |
"http",
|
|
|
4c4d6ea |
@@ -124,17 +123,16 @@ try:
|
|
|
4c4d6ea |
# If the user happens to run:
|
|
|
4c4d6ea |
# python2 setup.py build
|
|
|
4c4d6ea |
# python3 setup.py install
|
|
|
4c4d6ea |
- # then folders like "configparser" will be in build/lib.
|
|
|
4c4d6ea |
+ # then folders like "copyreg" will be in build/lib.
|
|
|
4c4d6ea |
# If so, we CANNOT let the user install this, because
|
|
|
4c4d6ea |
# this may break his/her Python 3 install, depending on the folder order in
|
|
|
4c4d6ea |
- # sys.path. (Running "import configparser" etc. may pick up our Py2
|
|
|
4c4d6ea |
+ # sys.path. (Running "import copyreg" etc. may pick up our Py2
|
|
|
4c4d6ea |
# substitute packages, instead of the intended system stdlib modules.)
|
|
|
4c4d6ea |
SYSTEM_MODULES = set([
|
|
|
4c4d6ea |
'_dummy_thread',
|
|
|
4c4d6ea |
'_markupbase',
|
|
|
4c4d6ea |
'_thread',
|
|
|
4c4d6ea |
'builtins',
|
|
|
4c4d6ea |
- 'configparser',
|
|
|
4c4d6ea |
'copyreg',
|
|
|
4c4d6ea |
'html',
|
|
|
4c4d6ea |
'http',
|
|
|
4c4d6ea |
diff --git a/src/configparser/__init__.py b/src/configparser/__init__.py
|
|
|
4c4d6ea |
deleted file mode 100644
|
|
|
4c4d6ea |
index 3642c5e..0000000
|
|
|
4c4d6ea |
--- a/src/configparser/__init__.py
|
|
|
4c4d6ea |
+++ /dev/null
|
|
|
4c4d6ea |
@@ -1,13 +0,0 @@
|
|
|
4c4d6ea |
-from __future__ import absolute_import
|
|
|
4c4d6ea |
-import sys
|
|
|
4c4d6ea |
-
|
|
|
4c4d6ea |
-if sys.version_info[0] < 3:
|
|
|
4c4d6ea |
- from ConfigParser import *
|
|
|
4c4d6ea |
- try:
|
|
|
4c4d6ea |
- from ConfigParser import (_Chainmap, Error, InterpolationMissingOptionError)
|
|
|
4c4d6ea |
- except ImportError:
|
|
|
4c4d6ea |
- pass
|
|
|
4c4d6ea |
-else:
|
|
|
4c4d6ea |
- raise ImportError('This package should not be accessible on Python 3. '
|
|
|
4c4d6ea |
- 'Either you are trying to run from the python-future src folder '
|
|
|
4c4d6ea |
- 'or your installation of python-future is corrupted.')
|
|
|
4c4d6ea |
diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py
|
|
|
4c4d6ea |
index fc564a5..e44cb26 100644
|
|
|
4c4d6ea |
--- a/tests/test_future/test_standard_library.py
|
|
|
4c4d6ea |
+++ b/tests/test_future/test_standard_library.py
|
|
|
4c4d6ea |
@@ -271,9 +271,6 @@ class TestStandardLibraryReorganization(CodeHandler):
|
|
|
4c4d6ea |
with self.assertRaises(CalledProcessError):
|
|
|
4c4d6ea |
output = self._run_test_script('importme1.py')
|
|
|
4c4d6ea |
|
|
|
4c4d6ea |
- def test_configparser(self):
|
|
|
4c4d6ea |
- import configparser
|
|
|
4c4d6ea |
-
|
|
|
4c4d6ea |
def test_copyreg(self):
|
|
|
4c4d6ea |
import copyreg
|
|
|
4c4d6ea |
|
|
|
4c4d6ea |
--
|
|
|
4c4d6ea |
1.9.3
|
|
|
4c4d6ea |
|