Imported Upstream version 37.0.0 upstream/37.0.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:37:33 +0000 (10:37 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:37:33 +0000 (10:37 +0900)
26 files changed:
.travis.yml
CHANGES.rst
docs/easy_install.txt
docs/formats.txt
docs/pkg_resources.txt
docs/setuptools.txt
pkg_resources/__init__.py
pkg_resources/api_tests.txt
pkg_resources/tests/test_resources.py
setup.cfg
setup.py
setuptools/archive_util.py
setuptools/command/egg_info.py
setuptools/command/sdist.py
setuptools/command/test.py
setuptools/config.py
setuptools/monkey.py
setuptools/package_index.py
setuptools/py26compat.py [deleted file]
setuptools/py31compat.py
setuptools/sandbox.py
setuptools/tests/py26compat.py [deleted file]
setuptools/tests/test_develop.py
setuptools/tests/test_easy_install.py
setuptools/tests/test_egg_info.py
tox.ini

index 60f5815fd366568ae34cee378cfa05a3ebef3f75..1fd73aa51e97c3133f84d5ca2907bae2986ade62 100644 (file)
@@ -1,18 +1,19 @@
 dist: trusty
 sudo: false
 language: python
+python:
+- &latest_py2 2.7
+- 3.3
+- 3.4
+- 3.5
+- &latest_py3 3.6
+- nightly
+- pypy
+- pypy3
+
 jobs:
   fast_finish: true
   include:
-  - python: 2.6
-  - python: &latest_py2 2.7
-  - python: 3.3
-  - python: 3.4
-  - python: 3.5
-  - python: &latest_py3 3.6
-  - python: nightly
-  - python: pypy
-  - python: pypy3
   - python: *latest_py3
     env: LANG=C
   - python: *latest_py2
index 65ab85bc6e93c62cdc6c6df04c38167b3141b7c3..f75bb62a4f2f6d7ada3e8d1b795a7f6cad3a8d89 100644 (file)
@@ -1,3 +1,9 @@
+v37.0.0
+-------
+
+* #878: Drop support for Python 2.6. Python 2.6 users should
+  rely on 'setuptools < 37dev'.
+
 v36.8.0
 -------
 
index bd9f0e863d62e96b4e0500a47ae0993df4e33a60..56b16672264c661a604dd83984de0c5180a5d15c 100644 (file)
@@ -35,7 +35,7 @@ Please see the `setuptools PyPI page <https://pypi.python.org/pypi/setuptools>`_
 for download links and basic installation instructions for each of the
 supported platforms.
 
-You will need at least Python 2.6.  An ``easy_install`` script will be
+You will need at least Python 3.3 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
@@ -305,8 +305,7 @@ Regardless of the technique used, the script(s) will be installed to a Scripts
 directory (by default in the Python installation directory). It is recommended
 for EasyInstall that you ensure this directory is in the PATH environment
 variable. The easiest way to ensure the Scripts directory is in the PATH is
-to run ``Tools\Scripts\win_add2path.py`` from the Python directory (requires
-Python 2.6 or later).
+to run ``Tools\Scripts\win_add2path.py`` from the Python directory.
 
 Note that instead of changing your ``PATH`` to include the Python scripts
 directory, you can also retarget the installation location for scripts so they
@@ -987,21 +986,20 @@ The following section lists only the easiest and most relevant approaches [1]_.
 
 `Use "virtualenv"`_
 
-.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6.
+.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_.
 
 .. _PEP-370: http://www.python.org/dev/peps/pep-0370/
 
 
 Use the "--user" option
 ~~~~~~~~~~~~~~~~~~~~~~~
-With Python 2.6 came the User scheme for installation, which means that all
-python distributions support an alternative install location that is specific to a user [2]_ [3]_.
+Python provides a User scheme for installation, which means that all
+python distributions support an alternative install location that is specific to a user [3]_.
 The Default location for each OS is explained in the python documentation
 for the ``site.USER_BASE`` variable.  This mode of installation can be turned on by
 specifying the ``--user`` option to ``setup.py install`` or ``easy_install``.
 This approach serves the need to have a user-specific stash of packages.
 
-.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6.
 .. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized.
 
 Use the "--user" option and customize "PYTHONUSERBASE"
index 9e6fe7278724978e49f9e6c9cb46521cc3fd4225..a182eb99fca0cc3bbe91704e273af71fd937fe05 100644 (file)
@@ -110,7 +110,7 @@ the need to create a directory just to store one file.  This option is
 other metadata.  (In fact, setuptools itself never generates
 ``.egg-info`` files, either; the support for using files was added so
 that the requirement could easily be satisfied by other tools, such
-as the distutils in Python 2.5).
+as distutils).
 
 In addition to the ``PKG-INFO`` file, an egg's metadata directory may
 also include files and directories representing various forms of
index 487320ce894095d4039378f6538ad4cccbcbf29b..8d337cb297bfa1e84b591c00924f47335531b9ac 100644 (file)
@@ -620,8 +620,8 @@ Requirements Parsing
     The "markers" in a requirement are used to specify when a requirement
     should be installed -- the requirement will be installed if the marker
     evaluates as true in the current environment. For example, specifying
-    ``argparse;python_version<"2.7"`` will not install in an Python 2.7 or 3.3
-    environment, but will in a Python 2.6 environment.
+    ``argparse;python_version<"3.0"`` will not install in an Python 3
+    environment, but will in a Python 2 environment.
 
 ``Requirement`` Methods and Attributes
 --------------------------------------
@@ -1658,19 +1658,7 @@ PEP 302 Utilities
 -----------------
 
 ``get_importer(path_item)``
-    Retrieve a PEP 302 "importer" for the given path item (which need not
-    actually be on ``sys.path``).  This routine simulates the PEP 302 protocol
-    for obtaining an "importer" object.  It first checks for an importer for
-    the path item in ``sys.path_importer_cache``, and if not found it calls
-    each of the ``sys.path_hooks`` and caches the result if a good importer is
-    found.  If no importer is found, this routine returns an ``ImpWrapper``
-    instance that wraps the builtin import machinery as a PEP 302-compliant
-    "importer" object.  This ``ImpWrapper`` is *not* cached; instead a new
-    instance is returned each time.
-
-    (Note: When run under Python 2.5, this function is simply an alias for
-    ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper``
-    instances, it may return ``pkgutil.ImpImporter`` instances.)
+    A deprecated alias for ``pkgutil.get_importer()``
 
 
 File/Path Utilities
index f255cfd21779a610c1f4fddda48db6ca8bdae581..c2822c4f9e8cf164f2128fed6b91eef2f46cd321 100644 (file)
@@ -3,7 +3,7 @@ Building and Distributing Packages with Setuptools
 ==================================================
 
 ``Setuptools`` is a collection of enhancements to the Python ``distutils``
-(for Python 2.6 and up) that allow developers to more easily build and
+that allow developers to more easily build and
 distribute Python packages, especially ones that have dependencies on other
 packages.
 
index 6f1071fb87ab431c84268e4b133fb2038d2dd493..c06cf4b1d87025405eb0bf51a030df974007eb1c 100644 (file)
@@ -1644,7 +1644,7 @@ class ZipManifests(dict):
         Use a platform-specific path separator (os.sep) for the path keys
         for compatibility with pypy on Windows.
         """
-        with ContextualZipFile(path) as zfile:
+        with zipfile.ZipFile(path) as zfile:
             items = (
                 (
                     name.replace('/', os.sep),
@@ -1677,26 +1677,6 @@ class MemoizedZipManifests(ZipManifests):
         return self[path].manifest
 
 
-class ContextualZipFile(zipfile.ZipFile):
-    """
-    Supplement ZipFile class to support context manager for Python 2.6
-    """
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, type, value, traceback):
-        self.close()
-
-    def __new__(cls, *args, **kwargs):
-        """
-        Construct a ZipFile or ContextualZipFile as appropriate
-        """
-        if hasattr(zipfile.ZipFile, '__exit__'):
-            return zipfile.ZipFile(*args, **kwargs)
-        return super(ContextualZipFile, cls).__new__(cls)
-
-
 class ZipProvider(EggProvider):
     """Resource support for zips and eggs"""
 
@@ -1897,7 +1877,7 @@ class FileMetadata(EmptyProvider):
         return metadata
 
     def _warn_on_replacement(self, metadata):
-        # Python 2.6 and 3.2 compat for: replacement_char = '�'
+        # Python 2.7 compat for: replacement_char = '�'
         replacement_char = b'\xef\xbf\xbd'.decode('utf-8')
         if replacement_char in metadata:
             tmpl = "{self.path} could not be properly decoded in UTF-8"
index 4fbd3d235df4e7fe643cdde60085d2bd6f0bc87c..0a75170e4ff41c83277d88dafe208b960f6018ee 100644 (file)
@@ -385,10 +385,10 @@ Environment Markers
     >>> em("sys_platform=='win32'") == (sys.platform=='win32')
     True
 
-    >>> em("python_version >= '2.6'")
+    >>> em("python_version >= '2.7'")
     True
 
-    >>> em("python_version > '2.5'")
+    >>> em("python_version > '2.6'")
     True
 
     >>> im("implementation_name=='cpython'")
index 0b05343c3b098184857e538737d29ab6b4486d12..dcd2f42c17290236deba495c0b6aae9856a82551 100644 (file)
@@ -206,12 +206,10 @@ class TestDistro:
         """Extras are also evaluated as markers at resolution time."""
         ad = pkg_resources.Environment([])
         ws = WorkingSet([])
-        # Metadata needs to be native strings due to cStringIO behaviour in
-        # 2.6, so use str().
         Foo = Distribution.from_filename(
             "/foo_dir/Foo-1.2.dist-info",
-            metadata=Metadata(("METADATA", str("Provides-Extra: baz\n"
-                               "Requires-Dist: quux; extra=='baz'")))
+            metadata=Metadata(("METADATA", "Provides-Extra: baz\n"
+                               "Requires-Dist: quux; extra=='baz'"))
         )
         ad.add(Foo)
         assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo]
@@ -224,12 +222,10 @@ class TestDistro:
         """Extras are also evaluated as markers at resolution time."""
         ad = pkg_resources.Environment([])
         ws = WorkingSet([])
-        # Metadata needs to be native strings due to cStringIO behaviour in
-        # 2.6, so use str().
         Foo = Distribution.from_filename(
             "/foo_dir/Foo-1.2.dist-info",
-            metadata=Metadata(("METADATA", str("Provides-Extra: baz-lightyear\n"
-                               "Requires-Dist: quux; extra=='baz-lightyear'")))
+            metadata=Metadata(("METADATA", "Provides-Extra: baz-lightyear\n"
+                               "Requires-Dist: quux; extra=='baz-lightyear'"))
         )
         ad.add(Foo)
         assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo]
@@ -241,14 +237,12 @@ class TestDistro:
     def test_marker_evaluation_with_multiple_extras(self):
         ad = pkg_resources.Environment([])
         ws = WorkingSet([])
-        # Metadata needs to be native strings due to cStringIO behaviour in
-        # 2.6, so use str().
         Foo = Distribution.from_filename(
             "/foo_dir/Foo-1.2.dist-info",
-            metadata=Metadata(("METADATA", str("Provides-Extra: baz\n"
+            metadata=Metadata(("METADATA", "Provides-Extra: baz\n"
                                "Requires-Dist: quux; extra=='baz'\n"
                                "Provides-Extra: bar\n"
-                               "Requires-Dist: fred; extra=='bar'\n")))
+                               "Requires-Dist: fred; extra=='bar'\n"))
         )
         ad.add(Foo)
         quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info")
@@ -261,22 +255,20 @@ class TestDistro:
     def test_marker_evaluation_with_extras_loop(self):
         ad = pkg_resources.Environment([])
         ws = WorkingSet([])
-        # Metadata needs to be native strings due to cStringIO behaviour in
-        # 2.6, so use str().
         a = Distribution.from_filename(
             "/foo_dir/a-0.2.dist-info",
-            metadata=Metadata(("METADATA", str("Requires-Dist: c[a]")))
+            metadata=Metadata(("METADATA", "Requires-Dist: c[a]"))
         )
         b = Distribution.from_filename(
             "/foo_dir/b-0.3.dist-info",
-            metadata=Metadata(("METADATA", str("Requires-Dist: c[b]")))
+            metadata=Metadata(("METADATA", "Requires-Dist: c[b]"))
         )
         c = Distribution.from_filename(
             "/foo_dir/c-1.0.dist-info",
-            metadata=Metadata(("METADATA", str("Provides-Extra: a\n"
+            metadata=Metadata(("METADATA", "Provides-Extra: a\n"
                                "Requires-Dist: b;extra=='a'\n"
                                "Provides-Extra: b\n"
-                               "Requires-Dist: foo;extra=='b'")))
+                               "Requires-Dist: foo;extra=='b'"))
         )
         foo = Distribution.from_filename("/foo_dir/foo-0.1.dist-info")
         for dist in (a, b, c, foo):
index 8da91de23ccd3d0dd3b1a9cabbc69ac124ee08b2..04dcfbf885dd975f60c231576dce70d0793c0edf 100755 (executable)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 36.8.0
+current_version = 37.0.0
 commit = True
 tag = True
 
index c6dfc79515cbbffda68c049f518bc062b1fd8517..25d44de39a91e8c73e22ff3b4013d673a36a7f3f 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
 
 setup_params = dict(
     name="setuptools",
-    version="36.8.0",
+    version="37.0.0",
     description="Easily download, build, install, upgrade, and uninstall "
         "Python packages",
     author="Python Packaging Authority",
@@ -151,7 +151,6 @@ setup_params = dict(
         License :: OSI Approved :: MIT License
         Operating System :: OS Independent
         Programming Language :: Python :: 2
-        Programming Language :: Python :: 2.6
         Programming Language :: Python :: 2.7
         Programming Language :: Python :: 3
         Programming Language :: Python :: 3.3
@@ -163,7 +162,7 @@ setup_params = dict(
         Topic :: System :: Systems Administration
         Topic :: Utilities
         """).strip().splitlines(),
-    python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*',
+    python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*',
     extras_require={
         "ssl:sys_platform=='win32'": "wincertstore==0.2",
         "certs": "certifi==2016.9.26",
index cc82b3da369e27d98a7540a2b9bc27ce4e212405..81436044d995ff430334a7ef324b08e616f4b7a7 100755 (executable)
@@ -8,7 +8,7 @@ import posixpath
 import contextlib
 from distutils.errors import DistutilsError
 
-from pkg_resources import ensure_directory, ContextualZipFile
+from pkg_resources import ensure_directory
 
 __all__ = [
     "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
@@ -98,7 +98,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
     if not zipfile.is_zipfile(filename):
         raise UnrecognizedFormat("%s is not a zip file" % (filename,))
 
-    with ContextualZipFile(filename) as z:
+    with zipfile.ZipFile(filename) as z:
         for info in z.infolist():
             name = info.filename
 
index a183d15db76773d75c5db0268e32bfdbd53a4897..a1d41b27dac6a26ddabcbf08b68faeea9d77a8ad 100755 (executable)
@@ -160,9 +160,7 @@ class egg_info(Command):
         build tag. Install build keys in a deterministic order
         to avoid arbitrary reordering on subsequent builds.
         """
-        # python 2.6 compatibility
-        odict = getattr(collections, 'OrderedDict', dict)
-        egg_info = odict()
+        egg_info = collections.OrderedDict()
         # follow the order these keys would have been added
         # when PYTHONHASHSEED=0
         egg_info['tag_build'] = self.tags()
index 508148e06d9838ccd374669f29c1fa0b3aa9874f..bcfae4d82f6c04e355ec82d8ec0f1b8de44912cb 100755 (executable)
@@ -51,13 +51,6 @@ class sdist(sdist_add_defaults, orig.sdist):
         for cmd_name in self.get_sub_commands():
             self.run_command(cmd_name)
 
-        # Call check_metadata only if no 'check' command
-        # (distutils <= 2.6)
-        import distutils.command
-
-        if 'check' not in distutils.command.__all__:
-            self.check_metadata()
-
         self.make_distribution()
 
         dist_files = getattr(self.distribution, 'dist_files', [])
index bfa7149615939dcc2dd397be09935d265a5346e9..51aee1f7b18d12c35a0a09533aaf54745aabbcd9 100644 (file)
@@ -3,6 +3,7 @@ import operator
 import sys
 import contextlib
 import itertools
+import unittest
 from distutils.errors import DistutilsError, DistutilsOptionError
 from distutils import log
 from unittest import TestLoader
@@ -14,7 +15,6 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path,
                            working_set, _namespace_packages, evaluate_marker,
                            add_activation_listener, require, EntryPoint)
 from setuptools import Command
-from setuptools.py31compat import unittest_main
 
 
 class ScanningLoader(TestLoader):
@@ -241,12 +241,11 @@ class test(Command):
                         del_modules.append(name)
                 list(map(sys.modules.__delitem__, del_modules))
 
-        exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False}
-        test = unittest_main(
+        test = unittest.main(
             None, None, self._argv,
             testLoader=self._resolve_as_ep(self.test_loader),
             testRunner=self._resolve_as_ep(self.test_runner),
-            **exit_kwarg
+            exit=False,
         )
         if not test.result.wasSuccessful():
             msg = 'Test failed: %s' % test.result
index 9a62e2ec5573d2b3cea4836a71292071ab53ba70..5382844769eb5e25ff9a0afe0d5c49ba7dfcbd7f 100644 (file)
@@ -4,9 +4,9 @@ import os
 import sys
 from collections import defaultdict
 from functools import partial
+from importlib import import_module
 
 from distutils.errors import DistutilsOptionError, DistutilsFileError
-from setuptools.py26compat import import_module
 from setuptools.extern.six import string_types
 
 
index 6d3711ec1fceb207da2ff0f8b4916520f9467711..d9eb7d7b2946519137ec27ebf5dbf9e14ada6f81 100644 (file)
@@ -7,9 +7,9 @@ import distutils.filelist
 import platform
 import types
 import functools
+from importlib import import_module
 import inspect
 
-from .py26compat import import_module
 from setuptools.extern import six
 
 import setuptools
index e0aeb309d73ec32651aa8f3fd75378506a475404..fe2ef50fee54a7982a0954577e4792a76fdf5053 100755 (executable)
@@ -27,7 +27,6 @@ from setuptools import ssl_support
 from distutils import log
 from distutils.errors import DistutilsError
 from fnmatch import translate
-from setuptools.py26compat import strip_fragment
 from setuptools.py27compat import get_all_headers
 
 EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
@@ -717,7 +716,7 @@ class PackageIndex(Environment):
         fp = None
         try:
             checker = HashChecker.from_url(url)
-            fp = self.open_url(strip_fragment(url))
+            fp = self.open_url(url)
             if isinstance(fp, urllib.error.HTTPError):
                 raise DistutilsError(
                     "Can't download %s: %s %s" % (url, fp.code, fp.msg)
diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py
deleted file mode 100644 (file)
index 4d3add8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Compatibility Support for Python 2.6 and earlier
-"""
-
-import sys
-
-try:
-    from urllib.parse import splittag
-except ImportError:
-    from urllib import splittag
-
-
-def strip_fragment(url):
-    """
-    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
-    later was patched to disregard the fragment when making URL requests.
-    Do the same for Python 2.6 and earlier.
-    """
-    url, fragment = splittag(url)
-    return url
-
-
-if sys.version_info >= (2, 7):
-    strip_fragment = lambda x: x
-
-try:
-    from importlib import import_module
-except ImportError:
-
-    def import_module(module_name):
-        return __import__(module_name, fromlist=['__name__'])
index 44b025d4b255c6942c7a7c313f84705541094765..4ea953201f48a7049f70eab4ea0c32b06f16e6eb 100644 (file)
@@ -1,6 +1,3 @@
-import sys
-import unittest
-
 __all__ = ['get_config_vars', 'get_path']
 
 try:
@@ -42,15 +39,3 @@ except ImportError:
             except OSError:  # removal errors are not the only possible
                 pass
             self.name = None
-
-
-unittest_main = unittest.main
-
-_PY31 = (3, 1) <= sys.version_info[:2] < (3, 2)
-if _PY31:
-    # on Python 3.1, translate testRunner==None to TextTestRunner
-    # for compatibility with Python 2.6, 2.7, and 3.2+
-    def unittest_main(*args, **kwargs):
-        if 'testRunner' in kwargs and kwargs['testRunner'] is None:
-            kwargs['testRunner'] = unittest.TextTestRunner
-        return unittest.main(*args, **kwargs)
index 1d981f497f6bfce95fb9ce0defdb15d2c14b236d..685f3f72e3611a5fa99c999e233ffd179c431a6d 100755 (executable)
@@ -39,10 +39,6 @@ def _execfile(filename, globals, locals=None):
     mode = 'rb'
     with open(filename, mode) as stream:
         script = stream.read()
-    # compile() function in Python 2.6 and 3.1 requires LF line endings.
-    if sys.version_info[:2] < (2, 7) or sys.version_info[:2] >= (3, 0) and sys.version_info[:2] < (3, 2):
-        script = script.replace(b'\r\n', b'\n')
-        script = script.replace(b'\r', b'\n')
     if locals is None:
         locals = globals
     code = compile(script, filename, 'exec')
diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
deleted file mode 100644 (file)
index 18cece0..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-import sys
-import tarfile
-import contextlib
-
-
-def _tarfile_open_ex(*args, **kwargs):
-    """
-    Extend result as a context manager.
-    """
-    return contextlib.closing(tarfile.open(*args, **kwargs))
-
-
-if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2):
-    tarfile_open = _tarfile_open_ex
-else:
-    tarfile_open = tarfile.open
index cb4ff4b40101480052966fd31c2bc6894ff9d31d..00d4bd9abb823fd9198519f31d2e21a65f8d071d 100644 (file)
@@ -8,6 +8,7 @@ import site
 import sys
 import io
 import subprocess
+import platform
 
 from setuptools.extern import six
 from setuptools.command import test
@@ -61,7 +62,8 @@ class TestDevelop:
     in_virtualenv = hasattr(sys, 'real_prefix')
     in_venv = hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix
 
-    @pytest.mark.skipif(in_virtualenv or in_venv,
+    @pytest.mark.skipif(
+        in_virtualenv or in_venv,
         reason="Cannot run when invoked in a virtualenv or venv")
     def test_2to3_user_mode(self, test_env):
         settings = dict(
@@ -101,7 +103,8 @@ class TestDevelop:
         Test that console scripts are installed and that they reference
         only the project by name and not the current version.
         """
-        pytest.skip("TODO: needs a fixture to cause 'develop' "
+        pytest.skip(
+            "TODO: needs a fixture to cause 'develop' "
             "to be invoked without mutating environment.")
         settings = dict(
             name='foo',
@@ -153,8 +156,14 @@ class TestNamespaces:
             with test.test.paths_on_pythonpath([str(target)]):
                 subprocess.check_call(develop_cmd)
 
-    @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")),
-        reason="https://github.com/pypa/setuptools/issues/851")
+    @pytest.mark.skipif(
+        bool(os.environ.get("APPVEYOR")),
+        reason="https://github.com/pypa/setuptools/issues/851",
+    )
+    @pytest.mark.skipif(
+        platform.python_implementation() == 'PyPy' and six.PY3,
+        reason="https://github.com/pypa/setuptools/issues/1202",
+    )
     def test_namespace_package_importable(self, tmpdir):
         """
         Installing two packages sharing the same namespace, one installed
@@ -169,7 +178,7 @@ class TestNamespaces:
         install_cmd = [
             sys.executable,
             '-m',
-            'pip.__main__',
+            'pip',
             'install',
             str(pkg_A),
             '-t', str(target),
index 1d3390c567ca1a973ec3865e3bd47dc0e869e4e8..834710ef29b09afe2df0268425816ad099bd7de2 100644 (file)
@@ -33,7 +33,6 @@ import setuptools.tests.server
 from setuptools.tests import fail_on_ascii
 import pkg_resources
 
-from .py26compat import tarfile_open
 from . import contexts
 from .textwrap import DALS
 
@@ -432,7 +431,7 @@ class TestSetupRequires:
                 # extracted path to sys.path so foo.bar v0.1 is importable
                 foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1')
                 os.mkdir(foobar_1_dir)
-                with tarfile_open(foobar_1_archive) as tf:
+                with tarfile.open(foobar_1_archive) as tf:
                     tf.extractall(foobar_1_dir)
                 sys.path.insert(1, foobar_1_dir)
 
@@ -563,7 +562,7 @@ def make_sdist(dist_path, files):
     listed in ``files`` as ``(filename, content)`` tuples.
     """
 
-    with tarfile_open(dist_path, 'w:gz') as dist:
+    with tarfile.open(dist_path, 'w:gz') as dist:
         for filename, content in files:
             file_bytes = io.BytesIO(content.encode('utf-8'))
             file_info = tarfile.TarInfo(name=filename)
index 1411f93c0d99ff0d6ffd23d99749a16003029e46..a97d0c84b055fa7c950827e31271d8f7c0886443 100644 (file)
@@ -1,9 +1,9 @@
+import sys
 import ast
 import os
 import glob
 import re
 import stat
-import sys
 
 from setuptools.command.egg_info import egg_info, manifest_maker
 from setuptools.dist import Distribution
@@ -64,12 +64,6 @@ class TestEggInfo(object):
             })
             yield env
 
-    dict_order_fails = pytest.mark.skipif(
-        sys.version_info < (2, 7),
-        reason="Intermittent failures on Python 2.6",
-    )
-
-    @dict_order_fails
     def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env):
         """
         When the egg_info section is empty or not present, running
@@ -104,7 +98,6 @@ class TestEggInfo(object):
         flags = re.MULTILINE | re.DOTALL
         assert re.search(pattern, content, flags)
 
-    @dict_order_fails
     def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env):
         """
         When running save_version_info on an existing setup.cfg
diff --git a/tox.ini b/tox.ini
index 4b4b4fd8ba2936c6fc56a52c4afa66e528705bfd..2f7d4dc81851fa7754b9dfe7cb752622c2c4fb45 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='py2{6,7},py3{3,4,5,6},pypy'
+# export TOXENV='py27,py3{3,4,5,6},pypy,pypy3'
 
 [testenv]
 deps=-rtests/requirements.txt