Skip to content

80.9.0 [testing] test_universal_deprecated fails #5097

@mtelka

Description

@mtelka

The test_universal_deprecated test fails for setuptools 80.9.0.

Steps to reproduce:

$ wget https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-80.9.0.tar.gz
$ gtar xf setuptools-80.9.0.tar.gz
$ cd setuptools-80.9.0
$ sed -i -e '/check$/d' -e '/type$/d' -e '/^.cover$/d' tox.ini
$ tox -e py39

Here is the failure:

__________________________ test_universal_deprecated ___________________________
[gw4] sunos5 -- Python 3.9.24 /tmp/test/setuptools-80.9.0/.tox/py39/bin/python

dummy_dist = PosixPath('/tmp/pytest-of-marcel/pytest-2/popen-gw4/dummy-dist8')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fffaae8c4c0>
tmp_path = PosixPath('/tmp/pytest-of-marcel/pytest-2/popen-gw4/test_universal_deprecated0')

    def test_universal_deprecated(dummy_dist, monkeypatch, tmp_path):
        monkeypatch.chdir(dummy_dist)
        with pytest.warns(SetuptoolsDeprecationWarning, match=".*universal is deprecated"):
>           bdist_wheel_cmd(bdist_dir=str(tmp_path), universal=True).run()

/tmp/test/setuptools-80.9.0/setuptools/tests/test_bdist_wheel.py:404:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/test/setuptools-80.9.0/setuptools/tests/test_bdist_wheel.py:227: in bdist_wheel_cmd
    cmd.finalize_options()
/tmp/test/setuptools-80.9.0/setuptools/command/bdist_wheel.py:262: in finalize_options
    SetuptoolsDeprecationWarning.emit(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'setuptools.warnings.SetuptoolsDeprecationWarning'>
summary = 'bdist_wheel.universal is deprecated'
details = '\n                With Python 2.7 end-of-life, support for building universal wheels\n                (i.e., wheels t... if you still need it,\n                file an issue with pypa/setuptools describing your use case.\n                '
due_date = (2025, 8, 30), see_docs = None, see_url = None, stacklevel = 2
kwargs = {}, summary_ = 'bdist_wheel.universal is deprecated'
details_ = '\n                With Python 2.7 end-of-life, support for building universal wheels\n                (i.e., wheels t... if you still need it,\n                file an issue with pypa/setuptools describing your use case.\n                '
docs_ref = None, docs_url = None, due = datetime.date(2025, 8, 30)
text = 'bdist_wheel.universal is deprecated\n!!\n\n        ******************************************************************... errors in the future.\n        ********************************************************************************\n\n!!'

    @classmethod
    def emit(
        cls,
        summary: str | None = None,
        details: str | None = None,
        due_date: _DueDate | None = None,
        see_docs: str | None = None,
        see_url: str | None = None,
        stacklevel: int = 2,
        **kwargs,
    ) -> None:
        """Private: reserved for ``setuptools`` internal use only"""
        # Default values:
        summary_ = summary or getattr(cls, "_SUMMARY", None) or ""
        details_ = details or getattr(cls, "_DETAILS", None) or ""
        due_date = due_date or getattr(cls, "_DUE_DATE", None)
        docs_ref = see_docs or getattr(cls, "_SEE_DOCS", None)
        docs_url = docs_ref and f"https://setuptools.pypa.io/en/latest/{docs_ref}"
        see_url = see_url or getattr(cls, "_SEE_URL", None)
        due = date(*due_date) if due_date else None

        text = cls._format(summary_, details_, due, see_url or docs_url, kwargs)
        if due and due < date.today() and _should_enforce():
>           raise cls(text)
E           setuptools.warnings.SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
E           !!
E
E                   ********************************************************************************
E                   With Python 2.7 end-of-life, support for building universal wheels
E                   (i.e., wheels that support both Python 2 and Python 3)
E                   is being obviated.
E                   Please discontinue using this option, or if you still need it,
E                   file an issue with pypa/setuptools describing your use case.
E
E                   This deprecation is overdue, please update your project and remove deprecated
E                   calls to avoid build errors in the future.
E                   ********************************************************************************
E
E           !!

/tmp/test/setuptools-80.9.0/setuptools/warnings.py:51: SetuptoolsDeprecationWarning

During handling of the above exception, another exception occurred:

dummy_dist = PosixPath('/tmp/pytest-of-marcel/pytest-2/popen-gw4/dummy-dist8')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fffaae8c4c0>
tmp_path = PosixPath('/tmp/pytest-of-marcel/pytest-2/popen-gw4/test_universal_deprecated0')

    def test_universal_deprecated(dummy_dist, monkeypatch, tmp_path):
        monkeypatch.chdir(dummy_dist)
        with pytest.warns(SetuptoolsDeprecationWarning, match=".*universal is deprecated"):
>           bdist_wheel_cmd(bdist_dir=str(tmp_path), universal=True).run()
E           Failed: DID NOT WARN. No warnings of type (<class 'setuptools.warnings.SetuptoolsDeprecationWarning'>,) were emitted.
E            Emitted warnings: [].

/tmp/test/setuptools-80.9.0/setuptools/tests/test_bdist_wheel.py:404: Failed

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions