diff options
| author | Hugo <hugovk@users.noreply.github.com> | 2018-04-26 18:06:09 +0300 |
|---|---|---|
| committer | Paul Ganssle <paul@ganssle.io> | 2018-05-24 14:32:31 -0400 |
| commit | 7392f01ffced3acfdef25b0b2d55cefdc6ee468a (patch) | |
| tree | af16caf760ae204ba437d0aa7a6b862fc85bb0b2 /setuptools | |
| parent | e078d78a439591fd7028cf80ca0b7c12ae013d4d (diff) | |
| download | python-setuptools-git-7392f01ffced3acfdef25b0b2d55cefdc6ee468a.tar.gz | |
Drop support for EOL Python 3.3
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/command/bdist_egg.py | 2 | ||||
| -rw-r--r-- | setuptools/command/build_ext.py | 12 | ||||
| -rw-r--r-- | setuptools/extern/__init__.py | 2 | ||||
| -rw-r--r-- | setuptools/monkey.py | 2 | ||||
| -rw-r--r-- | setuptools/pep425tags.py | 4 | ||||
| -rw-r--r-- | setuptools/site-patch.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_install_scripts.py | 2 |
9 files changed, 9 insertions, 21 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 423b8187..14530729 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -411,7 +411,7 @@ def scan_module(egg_dir, base, name, stubs): return True # Extension module pkg = base[len(egg_dir) + 1:].replace(os.sep, '.') module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0] - if sys.version_info < (3, 3): + if sys.version_info.major == 2: skip = 8 # skip magic & date elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index ea97b37b..60a8a32f 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -112,7 +112,7 @@ class build_ext(_build_ext): and get_abi3_suffix() ) if use_abi3: - so_ext = _get_config_var_837('EXT_SUFFIX') + so_ext = get_config_var('EXT_SUFFIX') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): @@ -319,13 +319,3 @@ else: self.create_static_lib( objects, basename, output_dir, debug, target_lang ) - - -def _get_config_var_837(name): - """ - In https://github.com/pypa/setuptools/pull/837, we discovered - Python 3.3.0 exposes the extension suffix under the name 'SO'. - """ - if sys.version_info < (3, 3, 1): - name = 'SO' - return get_config_var(name) diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index da3d668d..52785a03 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -48,7 +48,7 @@ class VendorImporter: # on later Python versions to cause relative imports # in the vendor package to resolve the same modules # as those going through this importer. - if sys.version_info > (3, 3): + if sys.version_info.major >= 3: del sys.modules[extant] return mod except ImportError: diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 08ed50d9..05a738b0 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -75,8 +75,6 @@ def patch_all(): needs_warehouse = ( sys.version_info < (2, 7, 13) or - (3, 0) < sys.version_info < (3, 3, 7) - or (3, 4) < sys.version_info < (3, 4, 6) or (3, 5) < sys.version_info <= (3, 5, 3) diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py index 3bdd3285..a86a0d18 100644 --- a/setuptools/pep425tags.py +++ b/setuptools/pep425tags.py @@ -97,8 +97,8 @@ def get_abi_tag(): lambda: sys.maxunicode == 0x10ffff, expected=4, warn=(impl == 'cp' and - sys.version_info < (3, 3))) \ - and sys.version_info < (3, 3): + sys.version_info.major == 2)) \ + and sys.version_info.major == 2: u = 'u' abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u) elif soabi and soabi.startswith('cpython-'): diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 0d2d2ff8..40b00de0 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -23,7 +23,7 @@ def __boot(): break else: try: - import imp # Avoid import loop in Python >= 3.3 + import imp # Avoid import loop in Python 3 stream, path, descr = imp.find_module('site', [item]) except ImportError: continue diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 57339c8a..3fc7fdaf 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -688,7 +688,7 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', ) class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' - exe_with_spaces = r'C:\Program Files\Python33\python.exe' + exe_with_spaces = r'C:\Program Files\Python36\python.exe' def test_get_script_header(self): expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable)) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 8b3b90f7..a70a93a8 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -452,7 +452,7 @@ class TestEggInfo(object): def test_doesnt_provides_extra(self, tmpdir_cwd, env): self._setup_script_with_requires( - '''install_requires=["spam ; python_version<'3.3'"]''') + '''install_requires=["spam ; python_version<'3.6'"]''') environ = os.environ.copy().update( HOME=env.paths['home'], ) diff --git a/setuptools/tests/test_install_scripts.py b/setuptools/tests/test_install_scripts.py index 7393241f..727ad65b 100644 --- a/setuptools/tests/test_install_scripts.py +++ b/setuptools/tests/test_install_scripts.py @@ -19,7 +19,7 @@ class TestInstallScripts: ) unix_exe = '/usr/dummy-test-path/local/bin/python' unix_spaces_exe = '/usr/bin/env dummy-test-python' - win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.3\\python.exe' + win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.6\\python.exe' def _run_install_scripts(self, install_dir, executable=None): dist = Distribution(self.settings) |
