From 7518c1f95e878aee12fca1788ce8e1063761f8e5 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 30 Dec 2020 07:06:10 +0900 Subject: [PATCH] Imported Upstream version 46.3.1 --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ README.rst | 2 +- azure-pipelines.yml | 15 ++++++++++--- setup.cfg | 2 +- setuptools/tests/test_packageindex.py | 31 ++++++++++++++++++--------- setuptools/tests/test_virtualenv.py | 20 ++++++----------- tools/finalize.py | 14 ++++++++++++ 8 files changed, 62 insertions(+), 30 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 09a3be9..4ee9218 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.3.0 +current_version = 46.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 9793453..fd3c16b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v46.3.1 +------- + +No significant changes. + + v46.3.0 ------- diff --git a/README.rst b/README.rst index 6caaa75..9cbf7b8 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ .. _PyPI link: https://pypi.org/project/setuptools -.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/jaraco.setuptools?branchName=master +.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/pypa.setuptools?branchName=master :target: https://dev.azure.com/jaraco/setuptools/_build/latest?definitionId=1&branchName=master .. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0253a77..ee77268 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,10 +11,12 @@ trigger: - '*' pool: - vmimage: 'Ubuntu-18.04' + vmImage: $(pool_vm_image) variables: - group: Azure secrets +- name: pool_vm_image + value: Ubuntu-18.04 stages: - stage: Test @@ -23,10 +25,17 @@ stages: - job: 'Test' strategy: matrix: - Python36: + Bionic Python 3.6: python.version: '3.6' - Python38: + Bionic Python 3.8: python.version: '3.8' + Windows: + python.version: '3.8' + pool_vm_image: vs2017-win2016 + MacOS: + python.version: '3.8' + pool_vm_image: macos-10.15 + maxParallel: 4 steps: diff --git a/setup.cfg b/setup.cfg index 5495343..467d1fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.3.0 +version = 46.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 4529689..29aace1 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -3,6 +3,7 @@ from __future__ import absolute_import import sys import os import distutils.errors +import platform from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client @@ -283,17 +284,27 @@ class TestContentCheckers: assert rep == 'My message about md5' +@pytest.fixture +def temp_home(tmpdir, monkeypatch): + key = ( + 'USERPROFILE' + if platform.system() == 'Windows' and sys.version_info > (3, 8) else + 'HOME' + ) + + monkeypatch.setitem(os.environ, key, str(tmpdir)) + return tmpdir + + class TestPyPIConfig: - def test_percent_in_password(self, tmpdir, monkeypatch): - monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) - pypirc = tmpdir / '.pypirc' - with pypirc.open('w') as strm: - strm.write(DALS(""" - [pypi] - repository=https://pypi.org - username=jaraco - password=pity% - """)) + def test_percent_in_password(self, temp_home): + pypirc = temp_home / '.pypirc' + pypirc.write(DALS(""" + [pypi] + repository=https://pypi.org + username=jaraco + password=pity% + """)) cfg = setuptools.package_index.PyPIConfig() cred = cfg.creds_by_repository['https://pypi.org'] assert cred.username == 'jaraco' diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 6549a6c..555273a 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -57,10 +57,7 @@ def test_clean_env_install(bare_virtualenv): """ Check setuptools can be installed in a clean environment. """ - bare_virtualenv.run(' && '.join(( - 'cd {source}', - 'python setup.py install', - )).format(source=SOURCE_DIR)) + bare_virtualenv.run(['python', 'setup.py', 'install'], cd=SOURCE_DIR) def _get_pip_versions(): @@ -115,10 +112,9 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( - 'cd {source}', 'python setup.py -q sdist -d {dist}', 'python setup.py -q bdist_wheel -d {dist}', - )).format(source=SOURCE_DIR, dist=dist_dir)) + )).format(dist=dist_dir), cd=SOURCE_DIR) sdist = glob.glob(os.path.join(dist_dir, '*.zip'))[0] wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] # Then update from wheel. @@ -183,10 +179,8 @@ def _check_test_command_install_requirements(virtualenv, tmpdir): open('success', 'w').close() ''')) # Run test command for test package. - virtualenv.run(' && '.join(( - 'cd {tmpdir}', - 'python setup.py test -s test', - )).format(tmpdir=tmpdir)) + virtualenv.run( + ['python', 'setup.py', 'test', '-s', 'test'], cd=str(tmpdir)) assert tmpdir.join('success').check() @@ -207,7 +201,5 @@ 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)) + bare_virtualenv.run( + ['python', 'setup.py', command, '-h'], cd=SOURCE_DIR) diff --git a/tools/finalize.py b/tools/finalize.py index 5f28456..98b06c0 100644 --- a/tools/finalize.py +++ b/tools/finalize.py @@ -60,8 +60,22 @@ def ensure_config(): subprocess.check_output(['git', 'config', 'user.email']) +def check_changes(): + """ + Verify that all of the files in changelog.d have the appropriate + names. + """ + allowed = 'deprecation', 'breaking', 'change', 'doc', 'misc' + assert all( + any(key in file.name for key in allowed) + for file in pathlib.Path('changelog.d').iterdir() + if file.name != '.gitignore' + ) + + if __name__ == '__main__': print("Cutting release at", get_version()) ensure_config() + check_changes() update_changelog() bump_version() -- 2.34.1