Imported Upstream version 44.0.0 upstream/44.0.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:04:44 +0000 (07:04 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:04:44 +0000 (07:04 +0900)
.bumpversion.cfg
.travis.yml
CHANGES.rst
docs/easy_install.txt
docs/setuptools.txt
pkg_resources/__init__.py
setup.cfg
setuptools/tests/test_sdist.py
setuptools/tests/test_virtualenv.py
tests/requirements.txt
tox.ini

index 25093b873f7d97b8a505f52c30b38861cc935d73..e1bfa8985965d731edfd960ea858befe700a43cf 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 43.0.0
+current_version = 44.0.0
 commit = True
 tag = True
 
index b3a6556d663cf6d76ef2578c7b27a3d1efdd2dad..501a0b69ce0b37a898a82dfc352b564146ca6d55 100644 (file)
@@ -12,7 +12,6 @@ jobs:
     env: DISABLE_COVERAGE=1  # Don't run coverage on pypy (too slow).
   - python: pypy3
     env: DISABLE_COVERAGE=1
-  - python: 3.4
   - python: 3.5
   - python: 3.6
   - python: 3.7
index 817f816820c068a181a0106b053032d188f6851c..109a3f480f0fac892e80a31fd3bc760c454cf41e 100644 (file)
@@ -1,3 +1,9 @@
+v44.0.0
+-------
+
+* #1908: Drop support for Python 3.4.
+
+
 v43.0.0
 -------
 
index 544b9efd598ecd32c5543da404f565e830cf035e..fac7b8fc2a6086e06f82b75171a424ae5031c5f2 100644 (file)
@@ -41,7 +41,7 @@ Please see the `setuptools PyPI page <https://pypi.org/project/setuptools/>`_
 for download links and basic installation instructions for each of the
 supported platforms.
 
-You will need at least Python 3.4 or 2.7.  An ``easy_install`` script will be
+You will need at least Python 3.5 or 2.7.  An ``easy_install`` script will be
 installed in the normal location for Python scripts on your platform.
 
 Note that the instructions on the setuptools PyPI page assume that you are
index c109e673df5e048898e4d47d91a112a35d84a504..03b57cf3e741373454016726ebe8cc351b3fcb77 100644 (file)
@@ -62,7 +62,7 @@ Installing ``setuptools``
 
 To install the latest version of setuptools, use::
 
-    pip install -U setuptools
+    pip install --upgrade setuptools
 
 Refer to `Installing Packages`_ guide for more information.
 
@@ -1199,7 +1199,7 @@ command; see the section on the `develop`_ command below for more details.
 Note that you can also apply setuptools commands to non-setuptools projects,
 using commands like this::
 
-   python -c "import setuptools; execfile('setup.py')" develop
+   python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop
 
 That is, you can simply list the normal setup commands and options following
 the quoted part.
@@ -1215,7 +1215,7 @@ Detailed instructions to distribute a setuptools project can be found at
 
 Before you begin, make sure you have the latest versions of setuptools and wheel::
 
-    python3 -m pip install --user --upgrade setuptools wheel
+    pip install --upgrade setuptools wheel
 
 To build a setuptools project, run this command from the same directory where
 setup.py is located::
@@ -1229,15 +1229,15 @@ https://test.pypi.org/account/register/. You will also need to verify your email
 to be able to upload any packages.
 You should install twine to be able to upload packages::
 
-    python3 -m pip install --user --upgrade setuptools wheel
+    pip install --upgrade twine
 
 Now, to upload these archives, run::
 
-    twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+    twine upload --repository-url https://test.pypi.org/simple/ dist/*
 
 To install your newly uploaded package ``example_pkg``,  you can use pip::
 
-    python3 -m pip install --index-url https://test.pypi.org/simple/ example_pkg
+    pip install --index-url https://test.pypi.org/simple/ example_pkg
 
 If you have issues at any point, please refer to `Packaging project tutorials`_
 for clarification.
index 51fb1192fc8bcc02671f786955f53d1451d163ed..2f5aa64a6e10832f407601d668e4ef0d9d5d0aeb 100644 (file)
@@ -88,8 +88,8 @@ __import__('pkg_resources.extern.packaging.markers')
 __metaclass__ = type
 
 
-if (3, 0) < sys.version_info < (3, 4):
-    raise RuntimeError("Python 3.4 or later is required")
+if (3, 0) < sys.version_info < (3, 5):
+    raise RuntimeError("Python 3.5 or later is required")
 
 if six.PY2:
     # Those builtin exceptions are only defined in Python 3
index a9a9b504a136e76ddd50a352711c13abf2311571..ecef86098a291aa54d06d33b99a213be27726ade 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,7 +19,7 @@ universal = 1
 
 [metadata]
 name = setuptools
-version = 43.0.0
+version = 44.0.0
 description = Easily download, build, install, upgrade, and uninstall Python packages
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
@@ -38,7 +38,6 @@ classifiers =
     Programming Language :: Python :: 2
     Programming Language :: Python :: 2.7
     Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.4
     Programming Language :: Python :: 3.5
     Programming Language :: Python :: 3.6
     Programming Language :: Python :: 3.7
@@ -50,7 +49,7 @@ classifiers =
 
 [options]
 zip_safe = True
-python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
+python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
 py_modules = easy_install
 packages = find:
 
index b27c4a8336da40089bf28a4adb1fa5b0eb988cce..8538dd246aa8c6cf7b2722027b36f88743fd5f49 100644 (file)
@@ -1,10 +1,9 @@
 # -*- coding: utf-8 -*-
 """sdist tests"""
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 
 import os
-import shutil
 import sys
 import tempfile
 import unicodedata
@@ -91,30 +90,28 @@ fail_on_latin1_encoded_filenames = pytest.mark.xfail(
 )
 
 
+def touch(path):
+    path.write_text('', encoding='utf-8')
+
+
 class TestSdistTest:
-    def setup_method(self, method):
-        self.temp_dir = tempfile.mkdtemp()
-        with open(os.path.join(self.temp_dir, 'setup.py'), 'w') as f:
-            f.write(SETUP_PY)
+    @pytest.fixture(autouse=True)
+    def source_dir(self, tmpdir):
+        (tmpdir / 'setup.py').write_text(SETUP_PY, encoding='utf-8')
 
         # Set up the rest of the test package
-        test_pkg = os.path.join(self.temp_dir, 'sdist_test')
-        os.mkdir(test_pkg)
-        data_folder = os.path.join(self.temp_dir, "d")
-        os.mkdir(data_folder)
+        test_pkg = tmpdir / 'sdist_test'
+        test_pkg.mkdir()
+        data_folder = tmpdir / 'd'
+        data_folder.mkdir()
         # *.rst was not included in package_data, so c.rst should not be
         # automatically added to the manifest when not under version control
-        for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst',
-                      os.path.join(data_folder, "e.dat")]:
-            # Just touch the files; their contents are irrelevant
-            open(os.path.join(test_pkg, fname), 'w').close()
+        for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']:
+            touch(test_pkg / fname)
+        touch(data_folder / 'e.dat')
 
-        self.old_cwd = os.getcwd()
-        os.chdir(self.temp_dir)
-
-    def teardown_method(self, method):
-        os.chdir(self.old_cwd)
-        shutil.rmtree(self.temp_dir)
+        with tmpdir.as_cwd():
+            yield
 
     def test_package_data_in_sdist(self):
         """Regression test for pull request #4: ensures that files listed in
@@ -177,14 +174,14 @@ class TestSdistTest:
         manifest = cmd.filelist.files
         assert 'setup.py' not in manifest
 
-    def test_defaults_case_sensitivity(self):
+    def test_defaults_case_sensitivity(self, tmpdir):
         """
         Make sure default files (README.*, etc.) are added in a case-sensitive
         way to avoid problems with packages built on Windows.
         """
 
-        open(os.path.join(self.temp_dir, 'readme.rst'), 'w').close()
-        open(os.path.join(self.temp_dir, 'SETUP.cfg'), 'w').close()
+        touch(tmpdir / 'readme.rst')
+        touch(tmpdir / 'SETUP.cfg')
 
         dist = Distribution(SETUP_ATTRS)
         # the extension deliberately capitalized for this test
@@ -232,10 +229,6 @@ class TestSdistTest:
         u_contents = contents.decode('UTF-8')
 
         # The manifest should contain the UTF-8 filename
-        if six.PY2:
-            fs_enc = sys.getfilesystemencoding()
-            filename = filename.decode(fs_enc)
-
         assert posix(filename) in u_contents
 
     @py3_only
@@ -376,7 +369,7 @@ class TestSdistTest:
     @fail_on_latin1_encoded_filenames
     def test_sdist_with_utf8_encoded_filename(self):
         # Test for #303.
-        dist = Distribution(SETUP_ATTRS)
+        dist = Distribution(self.make_strings(SETUP_ATTRS))
         dist.script_name = 'setup.py'
         cmd = sdist(dist)
         cmd.ensure_finalized()
@@ -407,10 +400,19 @@ class TestSdistTest:
         else:
             assert filename in cmd.filelist.files
 
+    @classmethod
+    def make_strings(cls, item):
+        if isinstance(item, dict):
+            return {
+                key: cls.make_strings(value) for key, value in item.items()}
+        if isinstance(item, list):
+            return list(map(cls.make_strings, item))
+        return str(item)
+
     @fail_on_latin1_encoded_filenames
     def test_sdist_with_latin1_encoded_filename(self):
         # Test for #303.
-        dist = Distribution(SETUP_ATTRS)
+        dist = Distribution(self.make_strings(SETUP_ATTRS))
         dist.script_name = 'setup.py'
         cmd = sdist(dist)
         cmd.ensure_finalized()
@@ -451,11 +453,11 @@ class TestSdistTest:
             except UnicodeDecodeError:
                 filename not in cmd.filelist.files
 
-    def test_pyproject_toml_in_sdist(self):
+    def test_pyproject_toml_in_sdist(self, tmpdir):
         """
         Check if pyproject.toml is included in source distribution if present
         """
-        open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close()
+        touch(tmpdir / 'pyproject.toml')
         dist = Distribution(SETUP_ATTRS)
         dist.script_name = 'setup.py'
         cmd = sdist(dist)
@@ -465,11 +467,11 @@ class TestSdistTest:
         manifest = cmd.filelist.files
         assert 'pyproject.toml' in manifest
 
-    def test_pyproject_toml_excluded(self):
+    def test_pyproject_toml_excluded(self, tmpdir):
         """
         Check that pyproject.toml can excluded even if present
         """
-        open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close()
+        touch(tmpdir / 'pyproject.toml')
         with open('MANIFEST.in', 'w') as mts:
             print('exclude pyproject.toml', file=mts)
         dist = Distribution(SETUP_ATTRS)
index cd3d9313c325e465707c0a2ebfa5df39db967ac7..2c35825a6b15d4e7954dd6d93f5ef107289e7392 100644 (file)
@@ -77,12 +77,9 @@ def _get_pip_versions():
         'pip==10.0.1',
         'pip==18.1',
         'pip==19.0.1',
+        'https://github.com/pypa/pip/archive/master.zip',
     ]
 
-    # Pip's master dropped support for 3.4.
-    if not six.PY34:
-        network_versions.append('https://github.com/pypa/pip/archive/master.zip')
-
     versions = [None] + [
         pytest.param(v, **({} if network else {'marks': pytest.mark.skip}))
         for v in network_versions
index 1f8bd19d8c1fddf6404aad690a52ed2afa7b5347..4b5e0eeb62aba7709c8c9285a1808b61a7906898 100644 (file)
@@ -1,6 +1,5 @@
 mock
-pytest-flake8; python_version!="3.4"
-pytest-flake8<=1.0.0; python_version=="3.4"
+pytest-flake8
 virtualenv>=13.0.0
 pytest-virtualenv>=1.2.7
 pytest>=3.7
diff --git a/tox.ini b/tox.ini
index 6d3b9a9bc809e8c590b5b96b89f8d1e613404579..6a1af56e8cd391d8e4a9d52c512be9d0a2a74928 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,7 @@
 #
 # To run Tox against all supported Python interpreters, you can set:
 #
-# export TOXENV='py27,py3{4,5,6},pypy,pypy3'
+# export TOXENV='py27,py3{5,6,7,8},pypy,pypy3'
 
 [tox]
 envlist=python