diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-20 13:29:19 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-20 13:29:19 -0500 |
| commit | 204f46b572f110bab6f4265a1ea21727390d8a4c (patch) | |
| tree | 904a4d5d9379fd3dcf486ef4ba6caff3c29def4b | |
| parent | 73d2375eeb018a6db5e8c27af482aea69bf3c874 (diff) | |
| parent | 30b66d8ddde14ecbf0ae90966042d8d31fc680c8 (diff) | |
| download | python-setuptools-git-204f46b572f110bab6f4265a1ea21727390d8a4c.tar.gz | |
Merge remote-tracking branch 'origin/main' into include-pypy
| -rw-r--r-- | MANIFEST.in | 2 | ||||
| -rw-r--r-- | changelog.d/2477.misc.rst | 1 | ||||
| -rw-r--r-- | changelog.d/2484.misc.rst | 1 | ||||
| -rw-r--r-- | changelog.d/2485.misc.rst | 2 | ||||
| -rw-r--r-- | changelog.d/2487.misc.rst | 2 | ||||
| -rw-r--r-- | docs/userguide/quickstart.rst | 2 | ||||
| -rw-r--r-- | pkg_resources/tests/test_resources.py | 4 | ||||
| -rw-r--r-- | setuptools/tests/fixtures.py | 4 | ||||
| -rw-r--r-- | setuptools/tests/test_develop.py | 4 | ||||
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 6 | ||||
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_msvc.py | 6 | ||||
| -rw-r--r-- | setuptools/tests/test_virtualenv.py | 7 |
13 files changed, 25 insertions, 18 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 128ae280..92bd4f69 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ recursive-include setuptools *.py *.exe *.xml recursive-include tests *.py recursive-include setuptools/tests *.html -recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html +recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html recursive-include setuptools/_vendor *.py *.txt recursive-include pkg_resources *.py *.txt recursive-include pkg_resources/tests/data * diff --git a/changelog.d/2477.misc.rst b/changelog.d/2477.misc.rst new file mode 100644 index 00000000..48900e9d --- /dev/null +++ b/changelog.d/2477.misc.rst @@ -0,0 +1 @@ +Restore inclusion of rst files in sdist. diff --git a/changelog.d/2484.misc.rst b/changelog.d/2484.misc.rst new file mode 100644 index 00000000..8f93b3d0 --- /dev/null +++ b/changelog.d/2484.misc.rst @@ -0,0 +1 @@ +Setuptools has replaced the master branch with the main branch. diff --git a/changelog.d/2485.misc.rst b/changelog.d/2485.misc.rst new file mode 100644 index 00000000..0a28fd93 --- /dev/null +++ b/changelog.d/2485.misc.rst @@ -0,0 +1,2 @@ +Fixed failing test when pip 20.3+ is present. +-- by :user:`yan12125` diff --git a/changelog.d/2487.misc.rst b/changelog.d/2487.misc.rst new file mode 100644 index 00000000..003f6efb --- /dev/null +++ b/changelog.d/2487.misc.rst @@ -0,0 +1,2 @@ + Fix tests with pytest 6.2 +-- by :user:`yan12125` diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 30989826..1d557d47 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -71,7 +71,7 @@ file in the ``dist`` directory), which you can upload to PyPI! Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your project. And maybe your project will have grown by then to include a few -dependencies, and perhaps some data files and scripts. In the next few section, +dependencies, and perhaps some data files and scripts. In the next few sections, we will walk through those additional but essential information you need to specify to properly package your project. diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index b08bb293..965a7c00 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -773,7 +773,7 @@ class TestNamespaces: ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" - @pytest.yield_fixture + @pytest.fixture def symlinked_tmpdir(self, tmpdir): """ Where available, return the tempdir as a symlink, @@ -791,7 +791,7 @@ class TestNamespaces: finally: os.unlink(link_name) - @pytest.yield_fixture(autouse=True) + @pytest.fixture(autouse=True) def patched_path(self, tmpdir): """ Patch sys.path to include the 'site-pkgs' dir. Also diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 5204c8d1..e8cb7f52 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -3,7 +3,7 @@ import pytest from . import contexts -@pytest.yield_fixture +@pytest.fixture def user_override(monkeypatch): """ Override site.USER_BASE and site.USER_SITE with temporary directories in @@ -17,7 +17,7 @@ def user_override(monkeypatch): yield -@pytest.yield_fixture +@pytest.fixture def tmpdir_cwd(tmpdir): with tmpdir.as_cwd() as orig: yield orig diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 9854420e..2766da2f 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -31,7 +31,7 @@ INIT_PY = """print "foo" """ -@pytest.yield_fixture +@pytest.fixture def temp_user(monkeypatch): with contexts.tempdir() as user_base: with contexts.tempdir() as user_site: @@ -40,7 +40,7 @@ def temp_user(monkeypatch): yield -@pytest.yield_fixture +@pytest.fixture def test_env(tmpdir, temp_user): target = tmpdir foo = target.mkdir('foo') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 26a5e9a6..dc00e697 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -305,7 +305,7 @@ class TestPTHFileWriter: assert not pth.dirty -@pytest.yield_fixture +@pytest.fixture def setup_context(tmpdir): with (tmpdir / 'setup.py').open('w') as f: f.write(SETUP_PY) @@ -361,7 +361,7 @@ class TestUserInstallTest: f.write('Name: foo\n') return str(tmpdir) - @pytest.yield_fixture() + @pytest.fixture() def install_target(self, tmpdir): target = str(tmpdir) with mock.patch('sys.path', sys.path + [target]): @@ -406,7 +406,7 @@ class TestUserInstallTest: ) -@pytest.yield_fixture +@pytest.fixture def distutils_package(): distutils_setup_py = SETUP_PY.replace( 'from setuptools import setup', diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index dc472af4..1047468b 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -45,7 +45,7 @@ class TestEggInfo: """) }) - @pytest.yield_fixture + @pytest.fixture def env(self): with contexts.tempdir(prefix='setuptools-test.') as env_dir: env = Environment(env_dir) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 24e38ea8..d1527bfa 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -88,7 +88,7 @@ class TestModulePatch: assert isinstance(exc, expected) assert 'aka.ms/vcpython27' in str(exc) - @pytest.yield_fixture + @pytest.fixture def user_preferred_setting(self): """ Set up environment with different install dirs for user vs. system @@ -116,7 +116,7 @@ class TestModulePatch: expected = os.path.join(user_preferred_setting, 'vcvarsall.bat') assert expected == result - @pytest.yield_fixture + @pytest.fixture def local_machine_setting(self): """ Set up environment with only the system environment configured. @@ -138,7 +138,7 @@ class TestModulePatch: expected = os.path.join(local_machine_setting, 'vcvarsall.bat') assert expected == result - @pytest.yield_fixture + @pytest.fixture def x64_preferred_setting(self): """ Set up environment with 64-bit and 32-bit system settings configured diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index c8ed9e57..21dea5bb 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,8 +2,9 @@ import glob import os import sys +import pathlib + import pytest -from pytest import yield_fixture from pytest_fixture_config import yield_requires_config import pytest_virtualenv @@ -27,7 +28,7 @@ def pytest_virtualenv_works(virtualenv): @yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable']) -@yield_fixture(scope='function') +@pytest.fixture(scope='function') def bare_virtualenv(): """ Bare virtualenv (no pip/setuptools/wheel). """ @@ -124,7 +125,7 @@ def _check_test_command_install_requirements(virtualenv, tmpdir): make_nspkg_sdist(str(dist_path), distname, version) return dist_path dependency_links = [ - str(dist_path) + pathlib.Path(str(dist_path)).as_uri() for dist_path in ( sdist('foobar', '2.4'), sdist('bits', '4.2'), |
