question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setuptools 60 is breaking tests

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
pradyunsgcommented, 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).

0reactions
kloczekcommented, 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) ==================================
Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] latest setuptools release (60.3.0) broke pip? · Issue #3002
You can break python -m pip with setuptools v60.3.0 , but pip by itself will keep working fine, which is not great (though...
Read more >
Python package structure, setup.py for running unit tests
Through some trial and error, I found the cause of this problem. Test names should match module names. If there is a "foo_test.py"...
Read more >
History - setuptools 65.6.3.post20221216 documentation
Breaking Changes#. #3421: Drop setuptools' support for installing an entrypoint extra requirements at load time: - the functionality has been broken since v60....
Read more >
setuptools 3.5.2 - PyPI
Issue #60: On Windows, Setuptools supports deferring to another launcher, ... Distribute #336: setup.py no longer masks failure exit code when tests fail....
Read more >
Changelog — pytest documentation
MonkeyPatch.syspath_prepend() no longer fails when setuptools is not installed. ... This might break test suites which made use of this feature; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found