Skip to content

Heads up: tests/test_setup.py::SetupPyTest::test_metadata fails with setuptools 77.0.3 #1939

@mgorny

Description

@mgorny

Describe the bug
Looks like setuptools introduced new deprecation warnings that break assumptions within the test:

============================================================== FAILURES ===============================================================
______________________________________________________ SetupPyTest.test_metadata ______________________________________________________
[gw0] linux -- Python 3.13.2 /tmp/coveragepy/.venv/bin/python3

self = <tests.test_setup.SetupPyTest object at 0x7f896a594a50>

    def test_metadata(self) -> None:
        status, output = self.run_command_status(
            "python setup.py --description --version --url --author",
        )
        assert status == 0
        out = output.splitlines()
>       assert "measurement" in out[0]
E       AssertionError: assert 'measurement' in '/tmp/coveragepy/.venv/lib/python3.13/site-packages/setuptools/dist.py:760: SetuptoolsDeprecationWarning: License classifiers are deprecated.'

tests/test_setup.py:36: AssertionError
-------------------------------------------------------- Captured stdout call ---------------------------------------------------------
/tmp/coveragepy/.venv/lib/python3.13/site-packages/setuptools/dist.py:760: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: Apache Software License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
Code coverage measurement for Python
7.7.2a0.dev1
https://github.com/nedbat/coveragepy
Ned Batchelder and 236 others

======================================================= short test summary info =======================================================
FAILED tests/test_setup.py::SetupPyTest::test_metadata - AssertionError: assert 'measurement' in '/tmp/coveragepy/.venv/lib/python3.13/site-packages/setuptools/dist.py:760: SetuptoolsDepr...

To Reproduce

uv venv
uv pip install -e . pytest setuptools pytest-xdist flaky
uv run --no-project pytest tests/test_setup.py

Expected behavior
Tests passing.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions