Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setuptools 60 is breaking tests #10742

Closed
uranusjr opened this issue Dec 22, 2021 · 12 comments
Closed

Setuptools 60 is breaking tests #10742

uranusjr opened this issue Dec 22, 2021 · 12 comments

Comments

@uranusjr
Copy link
Member

uranusjr commented Dec 22, 2021

Filed for tracking and discussion. Unfortuantely I don’t (and won’t for a while) have time to look into the cause, but from a quick peek, it seems like this is a debundling issue caused by setuptools’s distutils vendoring adoption:

self = <setuptools.command.egg_info.egg_info object at 0x000001ABC5892140>
dist = <setuptools.dist.Distribution object at 0x000001ABC58A0790>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution
    
        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

Distribution = <class 'distutils.dist.Distribution'>
dist       = <setuptools.dist.Distribution object at 0x000001ABC58A0790>
self       = <setuptools.command.egg_info.egg_info object at 0x000001ABC5892140>

Setuptools is using isinstance to check whether dist is of the correct type, but it imports Distribution from its vendored distutils, which dist is actually created from the system distutils. Or the other way around, I’m not sure. But something like that, I think. It’d be awesome if someone could dig deeper into this and file an issue in pypa/setuptools with deeper investigation.

Regarding pip’s situation, I think this does not affect the actual code base (which never imports setuptools), only the test suite, and we should be able to work around this by capping setuptools to <60. Or with some workaround in test setup.

@pradyunsg
Copy link
Member

/cc @jaraco for awareness.

@jaraco
Copy link
Member

jaraco commented Dec 22, 2021

As a reminder, Setuptools isn't vendoring distutils. It's adopting it. The difference is subtle but important. The adoption means that Setuptools intends to absorb the functionality and supersede stdlib distutils without there being any standalone distutils.

Part of the issue here is that Setuptools does expect that distutils comes from exactly one place (stdlib or local), but specifically for the pip case, the hook that directs imports to the Setuptools-hosted version of distutils is disabled.

I'm pretty sure if pip can eliminate its reliance on distutils per #8761, that exclusion could be removed, and this issue would resolve itself.

@MichaIng
Copy link

MichaIng commented Jan 2, 2022

Somehow related: Since setuptools v60 at least on Debian running get-pip.py over an existing pip + setuptools fails, when the Debian python3-distutils package is installed, e.g. as dependency of the Python development headers package:

/usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py:24: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
  warnings.warn(
/usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py:36: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "/tmp/DietPi-Software/./get-pip.py", line 27081, in <module>
    main()
  File "/tmp/DietPi-Software/./get-pip.py", line 139, in main
    bootstrap(tmpdir=tmpdir)
  File "/tmp/DietPi-Software/./get-pip.py", line 120, in bootstrap
    args = determine_pip_install_arguments()
  File "/tmp/DietPi-Software/./get-pip.py", line 65, in determine_pip_install_arguments
    import setuptools  # noqa
  File "/usr/local/lib/python3.9/dist-packages/setuptools/__init__.py", line 8, in <module>
    import _distutils_hack.override  # noqa: F401
  File "/usr/local/lib/python3.9/dist-packages/_distutils_hack/override.py", line 1, in <module>
    __import__('_distutils_hack').do_override()
  File "/usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py", line 73, in do_override
    ensure_local_distutils()
  File "/usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py", line 61, in ensure_local_distutils
    assert '_distutils' in core.__file__, core.__file__
AssertionError: /usr/lib/python3.9/distutils/core.py

This _distutils_hack comes from get-pip.py. Looks like removing any use and detangling distutils from pip in favour of setuptools would solve both issues.

@pradyunsg
Copy link
Member

pradyunsg commented Jan 2, 2022

This _distutils_hack comes from get-pip.py.

It does not. This comes from setuptools directly (https://github.com/pypa/setuptools/tree/main/_distutils_hack), and this style of failure should likely be reported as a bug against setuptools or Debian (it might have already been reported, so please check for duplicates before filing a new one).

@MichaIng
Copy link

MichaIng commented Jan 2, 2022

@pradyunsg
Ah you're right, I missed the /usr/local/lib/python3.9/dist-packages/setuptools/__init__.py showing that it's coming from setuptools.

@jaraco
Many thanks for sending it upstream already.

I forgot the workaround in case someone else runs into the same issue:

pip3 uninstall -y setuptools
python3 ./get-pip.py

Of course if pip is installed already, one usually wouldn't use get-pip.py again, but we kept calling it as a generic install/upgrade/repair step on scripted reinstall.

@MichaIng
Copy link

MichaIng commented Jan 10, 2022

Hmm, while setuptools v60.3 solved the reinstall failure, it became even worse as while get-pip.py run through without error pip remains uninstalled:

# apt install python3-dev
# curl -O https://bootstrap.pypa.io/pip/get-pip.py
# python3 get-pip.py
# pip3 -V
pip 21.3.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)
# python3 get-pip.py
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Collecting pip
  Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Successfully installed pip-21.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
# pip3 -V
-bash: /usr/local/bin/pip3: No such file or directory

It says Successfully installed pip-21.3.1 but in fact no trace of pip can be found, not the executable and also /usr/local/lib/python3.9/dist-packages contains setuptools and wheel modules only.

@pradyunsg
Copy link
Member

In #10796, I've worked around this by using the standard library distutils. I don't like this at all, but I can't really think of anything lower-effort to unblock making 22.0.

I think we should keep this issue open, until we drop the "hack" added in that PR. I might end up spending some time to modernise our test scaffolding and venv handling, once #10421 winds down. :)

@pradyunsg pradyunsg removed the !release blocker Hold a release until this is resolved label Jan 14, 2022
@pradyunsg pradyunsg removed this from the 22.0 milestone Jan 14, 2022
@pradyunsg
Copy link
Member

Okay, this is no longer a release blocker. :)

@kloczek
Copy link

kloczek commented Feb 28, 2022

Just started updating pip to latest version and found that some new units are failing.
I'm currently setuptools 60.9.3.
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --deselect tests/functional
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pip-22.0.3, configfile: setup.cfg
collected 2319 items / 835 deselected / 1484 selected

tests/lib/test_lib.py EEEEEEEEEEEEEEEEEEEE                                                                                                                           [  1%]
tests/lib/test_wheel.py ..................                                                                                                                           [  2%]
tests/unit/test_appdirs.py ss....ss...sss...                                                                                                                         [  3%]
tests/unit/test_base_command.py ............                                                                                                                         [  4%]
tests/unit/test_cache.py .....                                                                                                                                       [  4%]
tests/unit/test_cmdoptions.py ...........                                                                                                                            [  5%]
tests/unit/test_collector.py .............................................s............s.s...................................                                        [ 12%]
tests/unit/test_command_install.py ...............                                                                                                                   [ 13%]
tests/unit/test_commands.py ........................................                                                                                                 [ 15%]
tests/unit/test_compat.py ....                                                                                                                                       [ 16%]
tests/unit/test_configuration.py ......................                                                                                                              [ 17%]
tests/unit/test_direct_url.py .......                                                                                                                                [ 17%]
tests/unit/test_direct_url_helpers.py .....EE...                                                                                                                     [ 18%]
tests/unit/test_exceptions.py ..............................                                                                                                         [ 20%]
tests/unit/test_finder.py ..............................                                                                                                             [ 22%]
tests/unit/test_format_control.py .........                                                                                                                          [ 23%]
tests/unit/test_index.py ................................................................................................                                            [ 29%]
tests/unit/test_link.py .........................................                                                                                                    [ 32%]
tests/unit/test_locations.py ...........                                                                                                                             [ 33%]
tests/unit/test_logging.py ...............                                                                                                                           [ 34%]
tests/unit/test_models.py .....                                                                                                                                      [ 34%]
tests/unit/test_models_wheel.py .................                                                                                                                    [ 35%]
tests/unit/test_network_auth.py ........................                                                                                                             [ 37%]
tests/unit/test_network_cache.py .....                                                                                                                               [ 37%]
tests/unit/test_network_download.py ...................                                                                                                              [ 39%]
tests/unit/test_network_lazy_wheel.py .                                                                                                                              [ 39%]
tests/unit/test_network_session.py .............................                                                                                                     [ 41%]
tests/unit/test_network_utils.py ...                                                                                                                                 [ 41%]
tests/unit/test_operations_prepare.py ...........                                                                                                                    [ 41%]
tests/unit/test_options.py .............................................................................................................................             [ 50%]
tests/unit/test_packaging.py .....                                                                                                                                   [ 50%]
tests/unit/test_pep517.py ........                                                                                                                                   [ 51%]
tests/unit/test_req.py ................................................sss.......                                                                                    [ 55%]
tests/unit/test_req_file.py .......................................................                                                                                  [ 58%]
tests/unit/test_req_install.py .....                                                                                                                                 [ 59%]
tests/unit/test_req_uninstall.py .............                                                                                                                       [ 60%]
tests/unit/test_resolution_legacy_resolver.py ...........                                                                                                            [ 60%]
tests/unit/test_search_scope.py ..                                                                                                                                   [ 60%]
tests/unit/test_self_check_outdated.py ..........                                                                                                                    [ 61%]
tests/unit/test_target_python.py ...................                                                                                                                 [ 62%]
tests/unit/test_urls.py .....s........s                                                                                                                              [ 63%]
tests/unit/test_utils.py ........................................................................................................................................... [ 73%]
................                                                                                                                                                     [ 74%]
tests/unit/test_utils_compatibility_tags.py ...........                                                                                                              [ 75%]
tests/unit/test_utils_distutils_args.py .................                                                                                                            [ 76%]
tests/unit/test_utils_filesystem.py .......                                                                                                                          [ 76%]
tests/unit/test_utils_subprocess.py ..................                                                                                                               [ 77%]
tests/unit/test_utils_temp_dir.py .....................................                                                                                              [ 80%]
tests/unit/test_utils_unpacking.py ............                                                                                                                      [ 81%]
tests/unit/test_utils_virtualenv.py .....................                                                                                                            [ 82%]
tests/unit/test_utils_wheel.py ............                                                                                                                          [ 83%]
tests/unit/test_vcs.py s....................................................................................................................F..                      [ 91%]
tests/unit/test_vcs_mercurial.py s                                                                                                                                   [ 91%]
tests/unit/test_wheel.py .............................xxxx.................                                                                                          [ 95%]
tests/unit/test_wheel_builder.py ..................................E.....                                                                                            [ 97%]
tests/unit/metadata/test_metadata.py ...                                                                                                                             [ 97%]
tests/unit/metadata/test_metadata_pkg_resources.py .........                                                                                                         [ 98%]
tests/unit/resolution_resolvelib/test_provider.py .                                                                                                                  [ 98%]
tests/unit/resolution_resolvelib/test_requirement.py ....                                                                                                            [ 98%]
tests/unit/resolution_resolvelib/test_resolver.py .................                                                                                                  [100%]

================================================================================== ERRORS ==================================================================================
_______________________________________________________________ ERROR at setup of test_tmp_dir_exists_in_env _______________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
________________________________________________________________ ERROR at setup of test_correct_pip_version ________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_____________________________________________________________________ ERROR at setup of test_as_import _____________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_________________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allowed_stderr[DEBUG] _________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_________________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allowed_stderr[INFO] __________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
__________________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allowed_stderr[FOO] __________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_________________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_warning __________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
____________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_error[DEPRECATION] ____________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
______________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_error[WARNING] ______________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_______________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_error[ERROR] _______________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
____________________________ ERROR at setup of TestPipTestEnvironment.test_run__unexpected_stderr[DEPRECATION-stderr has an unexpected warning] ____________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
______________________________ ERROR at setup of TestPipTestEnvironment.test_run__unexpected_stderr[WARNING-stderr has an unexpected warning] ______________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
________________________________ ERROR at setup of TestPipTestEnvironment.test_run__unexpected_stderr[ERROR-stderr has an unexpected error] ________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_____________________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__logging_error _____________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
___________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_error_false_error_with_expect_error ____________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
__________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_warning_false_error_with_expect_stderr __________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
____________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_warning_false_error[expect_error] _____________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_________________________________ ERROR at setup of TestPipTestEnvironment.test_run__allow_stderr_warning_false_error[allow_stderr_error] __________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
________________________________________ ERROR at setup of TestPipTestEnvironment.test_run__expect_error_fails_when_zero_returncode ________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_____________________________________ ERROR at setup of TestPipTestEnvironment.test_run__no_expect_error_fails_when_nonzero_returncode _____________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
__________________________________________________ ERROR at setup of test_from_link_vcs_with_source_dir_obtains_commit_id __________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_________________________________________________________ ERROR at setup of test_from_link_vcs_without_source_dir __________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
_______________________________________________________________ ERROR at setup of test_should_cache_git_sha ________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f62c0058c10>, _basetemp=PosixPath('/tmp/pytest-of-tkloczko/pytest-67')))
common_wheels = Path('/home/tkloczko/rpmbuild/BUILD/pip-22.0.3/tests/data/common_wheels')

    @pytest.fixture(scope="session")
    def setuptools_install(
        tmpdir_factory: pytest.TempdirFactory, common_wheels: Path
    ) -> Path:
>       return _common_wheel_editable_install(tmpdir_factory, common_wheels, "setuptools")

tests/conftest.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:330: in _common_wheel_editable_install
    Wheel(wheel_candidates[0]).install_as_egg(install_dir)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:95: in install_as_egg
    self._install_as_egg(destination_eggdir, zf)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:103: in _install_as_egg
    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
/usr/lib/python3.8/site-packages/setuptools/wheel.py:164: in _convert_metadata
    setup_dist.get_command_obj('egg_info'),
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:859: in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
/usr/lib/python3.8/site-packages/setuptools/__init__.py:174: in __init__
    super().__init__(dist)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <setuptools.command.egg_info.egg_info object at 0x7f62c15804f0>, dist = <setuptools.dist.Distribution object at 0x7f62bede6df0>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:57: TypeError
================================================================================= FAILURES =================================================================================
______________________________________________________________________ TestSubversionArgs.test_obtain ______________________________________________________________________

self = <tests.unit.test_vcs.TestSubversionArgs testMethod=test_obtain>

    def test_obtain(self) -> None:
>       self.svn.obtain(self.dest, hide_url(self.url), verbosity=0)

tests/unit/test_vcs.py:767:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages/pip/_internal/vcs/versioncontrol.py:569: in obtain
    response = ask_path_exists("What to do?  {}".format(prompt[0]), prompt[1])
../../BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages/pip/_internal/utils/misc.py:171: in ask_path_exists
    return ask(message, options)
../../BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages/pip/_internal/utils/misc.py:186: in ask
    response = input(message)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.capture.DontReadFromInput object at 0x7f62c1f90ca0>, args = ()

    def read(self, *args):
>       raise OSError(
            "pytest: reading from stdin while output is captured!  Consider using `-s`."
        )
E       OSError: pytest: reading from stdin while output is captured!  Consider using `-s`.

/usr/lib/python3.8/site-packages/_pytest/capture.py:217: OSError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
What to do?  (i)gnore, (w)ipe, (b)ackup
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
WARNING: Directory /tmp/test already exists, and is not a svn checkout.
WARNING: The plan is to install the svn repository http://svn.example.com/
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  pip._internal.vcs.versioncontrol:versioncontrol.py:555 Directory /tmp/test already exists, and is not a svn checkout.
WARNING  pip._internal.vcs.versioncontrol:versioncontrol.py:564 The plan is to install the svn repository http://svn.example.com/
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_distutils_hack/__init__.py:30
  /usr/lib/python3.8/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
    warnings.warn("Setuptools is replacing distutils.")

tests/unit/test_finder.py::test_finder_only_installs_data_require
  /home/tkloczko/rpmbuild/BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

tests/unit/test_locations.py::TestDistutilsScheme::test_distutils_config_file_read
tests/unit/test_locations.py::TestDistutilsScheme::test_install_lib_takes_precedence
  /home/tkloczko/rpmbuild/BUILDROOT/python-pip-22.0.3-2.fc35.x86_64/usr/lib/python3.8/site-packages/pip/_internal/locations/__init__.py:383: PipDeprecationWarning: DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    deprecated(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/unit/test_appdirs.py:14: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:31: MacOS-only test
SKIPPED [1] tests/unit/test_appdirs.py:89: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:103: MacOS-only test
SKIPPED [1] tests/unit/test_appdirs.py:147: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:166: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:184: MacOS-only test
SKIPPED [1] tests/unit/test_collector.py:303: condition: sys.platform != 'win32'
SKIPPED [2] tests/unit/test_collector.py:326: condition: sys.platform != 'win32'
SKIPPED [3] tests/unit/test_req.py:714: Test only available on Windows
SKIPPED [1] tests/unit/test_urls.py:31: condition: sys.platform != 'win32'
SKIPPED [1] tests/unit/test_urls.py:66: condition: sys.platform != 'win32'
SKIPPED [1] tests/unit/test_vcs.py:21: Subversion is only required under CI
SKIPPED [1] tests/unit/test_vcs_mercurial.py:14: Mercurial is not available
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello:]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello:]
ERROR tests/lib/test_lib.py::test_tmp_dir_exists_in_env - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::test_correct_pip_version - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::test_as_import - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allowed_stderr[DEBUG] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allowed_stderr[INFO] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allowed_stderr[FOO] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_warning - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_error[DEPRECATION] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_error[WARNING] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_error[ERROR] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__unexpected_stderr[DEPRECATION-stderr has an unexpected warning] - TypeError: dist must be a Distribution i...
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__unexpected_stderr[WARNING-stderr has an unexpected warning] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__unexpected_stderr[ERROR-stderr has an unexpected error] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__logging_error - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_error_false_error_with_expect_error - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_warning_false_error_with_expect_stderr - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_warning_false_error[expect_error] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__allow_stderr_warning_false_error[allow_stderr_error] - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__expect_error_fails_when_zero_returncode - TypeError: dist must be a Distribution instance
ERROR tests/lib/test_lib.py::TestPipTestEnvironment::test_run__no_expect_error_fails_when_nonzero_returncode - TypeError: dist must be a Distribution instance
ERROR tests/unit/test_direct_url_helpers.py::test_from_link_vcs_with_source_dir_obtains_commit_id - TypeError: dist must be a Distribution instance
ERROR tests/unit/test_direct_url_helpers.py::test_from_link_vcs_without_source_dir - TypeError: dist must be a Distribution instance
ERROR tests/unit/test_wheel_builder.py::test_should_cache_git_sha - TypeError: dist must be a Distribution instance
FAILED tests/unit/test_vcs.py::TestSubversionArgs::test_obtain - OSError: pytest: reading from stdin while output is captured!  Consider using `-s`.
================================= 1 failed, 1439 passed, 17 skipped, 835 deselected, 4 xfailed, 4 warnings, 23 errors in 88.43s (0:01:28) ==================================

@ichard26
Copy link
Member

Does this issue still need to be around given we're approaching setuptools 70 and at the moment pip is green?

@pfmoore
Copy link
Member

pfmoore commented Apr 14, 2024

The hack added in #10796 seems to have been removed since (in #11293). As @pradyunsg only wanted this issue kept open until that happened, I agree this can now be closed - @pradyunsg do you object?

@ichard26
Copy link
Member

I'll close this for now. We can revisit this if needed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants