Imported Upstream version 47.3.2 upstream/47.3.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:06:34 +0000 (07:06 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:06:34 +0000 (07:06 +0900)
.bumpversion.cfg
.coveragerc [new file with mode: 0644]
.github/workflows/python-tests.yml
.travis.yml
CHANGES.rst
docs/developer-guide.txt
pytest.ini
setup.cfg
setuptools/command/bdist_egg.py
setuptools/command/build_ext.py
tox.ini

index 9b106cfa3f66ef5e831143c6d1a7f37e34a6d196..8870172755191d86f63456eb98c819a3de6f8471 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 47.3.1
+current_version = 47.3.2
 commit = True
 tag = True
 
diff --git a/.coveragerc b/.coveragerc
new file mode 100644 (file)
index 0000000..2f0e871
--- /dev/null
@@ -0,0 +1,8 @@
+[run]
+source=
+       pkg_resources
+       setuptools
+omit=
+       */_vendor/*
+
+[report]
index e3663cf0b891931b4e8d7b76c9fdb723c83c82ba..5a5980842cf7de487659fe4f8285292a4752e6fe 100644 (file)
@@ -98,5 +98,3 @@ jobs:
         python -m
         tox
         --parallel auto
-        --
-        --cov
index f97abc51c4355cfd360aa0ca271b23424f3de535..e8bc75743bb175a6eac8111638d8b08b82257cc0 100644 (file)
@@ -5,7 +5,6 @@ jobs:
   fast_finish: true
   include:
   - python: pypy3
-    env: DISABLE_COVERAGE=1  # Don't run coverage on pypy (too slow).
   - python: 3.5
   - python: 3.6
   - python: 3.7
@@ -15,12 +14,12 @@ jobs:
     env: LANG=C
   - python: 3.8-dev
   - <<: *latest_py3
-    env: TOXENV=docs DISABLE_COVERAGE=1
+    env: TOXENV=docs
   allow_failures:
   # suppress failures due to pypa/setuptools#2000
   - python: pypy3
   - <<: *latest_py3
-    env: TOXENV=docs DISABLE_COVERAGE=1
+    env: TOXENV=docs
 
 cache: pip
 
@@ -39,22 +38,8 @@ install:
 
 script:
   - export NETWORK_REQUIRED=1
-  - |
-    ( # Run testsuite.
-      if [ -z "$DISABLE_COVERAGE" ]
-      then
-        tox -- --cov
-      else
-        tox
-      fi
-    )
+  - tox
 
 after_success:
-  - |
-    ( # Upload coverage data.
-      if [ -z "$DISABLE_COVERAGE" ]
-      then
-        export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
-        tox -e coverage,codecov
-      fi
-    )
+  - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
+  - tox -e coverage,codecov
index 799163edd3ba4dc9f9db03d8ba6cf461eea40169..a8ddb657521d98bf9814c850bf68ec8e5e5fef25 100644 (file)
@@ -1,3 +1,9 @@
+v47.3.2
+-------
+
+* #2071: Replaced references to the deprecated imp package with references to importlib
+
+
 v47.3.1
 -------
 
index 4a78e22ea46a6fe28de146110c01c8268a7dd30d..e84cd640b854c70fea71167687894a6584658fc5 100644 (file)
@@ -145,5 +145,5 @@ setuptools from source. Eventually, this limitation may be lifted as
 PEP 517/518 reach ubiquitous adoption, but for now, Setuptools
 cannot declare dependencies other than through
 ``setuptools/_vendor/vendored.txt`` and
-``pkg_reosurces/_vendor/vendored.txt`` and refreshed by way of
+``pkg_resources/_vendor/vendored.txt`` and refreshed by way of
 ``paver update_vendored`` (pavement.py).
index 479a2965ea3db04a43672fbb8e7dda6f92278e54..ddcad08baed39ab2ce9c5924b9f01b795ffda27e 100644 (file)
@@ -1,5 +1,5 @@
 [pytest]
-addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt -r sxX
+addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt --cov -r sxX
 norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor
 doctest_optionflags=ELLIPSIS ALLOW_UNICODE
 filterwarnings =
index f23714b6594616b6fcf5fe648f88be7e1c8866f9..cd62393c521d0f3d550d4b583319feadc09854be 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,7 +16,7 @@ formats = zip
 
 [metadata]
 name = setuptools
-version = 47.3.1
+version = 47.3.2
 description = Easily download, build, install, upgrade, and uninstall Python packages
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
index 1b28d4c9382a3bc1aa7f69a5290e1acdbcb6724b..e94fe25250f9100c3178ef3cd2af3398676c5cc3 100644 (file)
@@ -55,10 +55,11 @@ def write_stub(resource, pyfile):
     _stub_template = textwrap.dedent("""
         def __bootstrap__():
             global __bootstrap__, __loader__, __file__
-            import sys, pkg_resources, imp
+            import sys, pkg_resources
+            from importlib.machinery import ExtensionFileLoader
             __file__ = pkg_resources.resource_filename(__name__, %r)
             __loader__ = None; del __bootstrap__, __loader__
-            imp.load_dynamic(__name__,__file__)
+            ExtensionFileLoader(__name__,__file__).exec_module()
         __bootstrap__()
         """).lstrip()
     with open(pyfile, 'w') as f:
index 03b6f3467f9e763538180609a888afec457087d5..327fa06335e0f710bb1199962a51c49bded20651 100644 (file)
@@ -254,7 +254,8 @@ class build_ext(_build_ext):
                 '\n'.join([
                     "def __bootstrap__():",
                     "   global __bootstrap__, __file__, __loader__",
-                    "   import sys, os, pkg_resources, imp" + if_dl(", dl"),
+                    "   import sys, os, pkg_resources" + if_dl(", dl"),
+                    "   from importlib.machinery import ExtensionFileLoader",
                     "   __file__ = pkg_resources.resource_filename"
                     "(__name__,%r)"
                     % os.path.basename(ext._file_name),
@@ -266,7 +267,8 @@ class build_ext(_build_ext):
                     "   try:",
                     "     os.chdir(os.path.dirname(__file__))",
                     if_dl("     sys.setdlopenflags(dl.RTLD_NOW)"),
-                    "     imp.load_dynamic(__name__,__file__)",
+                    "     ExtensionFileLoader(__name__,",
+                    "                         __file__).exec_module()",
                     "   finally:",
                     if_dl("     sys.setdlopenflags(old_flags)"),
                     "     os.chdir(old_dir)",
diff --git a/tox.ini b/tox.ini
index d3df21bffd27602f035aa016545a2a8fe899145b..59213e88f9b6aba547eb9d2e1a2898a1a481e36d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -23,12 +23,16 @@ setenv =
 # TODO: The passed environment variables came from copying other tox.ini files
 # These should probably be individually annotated to explain what needs them.
 passenv=APPDATA HOMEDRIVE HOMEPATH windir Program* CommonProgram* VS* APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED
-commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs}
+commands = pytest {posargs}
 usedevelop=True
 extras =
        tests
 
 
+[testenv:pypy{,3}]
+commands = pytest --no-cov {posargs}
+
+
 [testenv:coverage]
 description=Combine coverage data and create report
 deps=coverage
@@ -53,13 +57,6 @@ changedir = docs
 commands =
         python -m sphinx . {toxinidir}/build/html
 
-[coverage:run]
-source=
-       pkg_resources
-       setuptools
-omit=
-       */_vendor/*
-
 [testenv:finalize]
 skip_install = True
 deps =