From 95f9e69fa2e5f8e2a54cb454b3e9ef2715dc6ef7 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 14 Jan 2019 10:44:29 +0900 Subject: [PATCH] Imported Upstream version 40.6.2 --- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- setup.py | 2 +- setuptools/command/upload.py | 6 +++--- setuptools/tests/test_dist.py | 3 +-- setuptools/tests/test_upload.py | 2 +- setuptools/tests/test_virtualenv.py | 12 ++++++++++++ tests/manual_test.py | 2 +- 8 files changed, 26 insertions(+), 9 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7a3e874..dc26cb4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.6.2 +------- + +* #1592: Fix invalid dependency on external six module (instead of vendored version). + + v40.6.1 ------- diff --git a/setup.cfg b/setup.cfg index 9e12b65..ace8038 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.6.1 +current_version = 40.6.2 commit = True tag = True diff --git a/setup.py b/setup.py index f24b8e7..44b7edf 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.6.1", + version="40.6.2", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 3b8cab5..dd17f7a 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -12,9 +12,9 @@ from distutils.spawn import spawn from distutils.errors import DistutilsError -from six.moves.urllib.request import urlopen, Request -from six.moves.urllib.error import HTTPError -from six.moves.urllib.parse import urlparse +from setuptools.extern.six.moves.urllib.request import urlopen, Request +from setuptools.extern.six.moves.urllib.error import HTTPError +from setuptools.extern.six.moves.urllib.parse import urlparse class upload(orig.upload): """ diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 170d27e..cf830b4 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -7,13 +7,12 @@ from setuptools.dist import DistDeprecationWarning, _get_unpatched from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin +from setuptools.extern import six from .textwrap import DALS from .test_easy_install import make_nspkg_sdist import pytest -import six - def test_dist_fetch_build_egg(tmpdir): """ diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 9229bba..cc0e8a0 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -7,10 +7,10 @@ from distutils.errors import DistutilsError from distutils.version import StrictVersion import pytest -import six from setuptools.command.upload import upload from setuptools.dist import Distribution +from setuptools.extern import six def _parse_upload_body(body): diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index e511c91..7b5fea1 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,3 +1,4 @@ +import distutils.command import glob import os import sys @@ -134,3 +135,14 @@ def test_test_command_install_requirements(bare_virtualenv, tmpdir): 'python setup.py test -s test', )).format(tmpdir=tmpdir)) assert tmpdir.join('success').check() + + +def test_no_missing_dependencies(bare_virtualenv): + """ + Quick and dirty test to ensure all external dependencies are vendored. + """ + for command in ('upload',):#sorted(distutils.command.__all__): + bare_virtualenv.run(' && '.join(( + 'cd {source}', + 'python setup.py {command} -h', + )).format(command=command, source=SOURCE_DIR)) diff --git a/tests/manual_test.py b/tests/manual_test.py index 52295f9..99db4b0 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -8,7 +8,7 @@ import subprocess from distutils.command.install import INSTALL_SCHEMES from string import Template -from six.moves import urllib +from setuptools.extern.six.moves import urllib def _system_call(*args): -- 2.34.1