#1149678 python3-deprecated: When pypy3 is installed, installing python3-deprecated show SyntaxErrors

#1149678#5
Date:
2026-10-02 07:40:03 UTC
From:
To:
Dear Maintainer,

When installing python3-deprecated, if and only if pypy3 is installed, I'm getting the following errors:

    Failed to byte-compile /usr/lib/python3/dist-packages/deprecated/classic.py:   File "/usr/lib/python3/dist-packages/deprecated/classic.py", line 33
        type WarningAction = Literal["default", "error", "ignore", "always", "module", "once"]
             ^^^^^^^^^^^^^
    SyntaxError: invalid syntax

    Failed to byte-compile /usr/lib/python3/dist-packages/deprecated/google.py:   File "/usr/lib/python3/dist-packages/deprecated/google.py", line 49
        type GoogleSection = Literal["versionadded", "versionchanged", "deprecated"]
             ^^^^^^^^^^^^^
    SyntaxError: invalid syntax

    Failed to byte-compile /usr/lib/python3/dist-packages/deprecated/numpy.py:   File "/usr/lib/python3/dist-packages/deprecated/numpy.py", line 53
        type NumpySection = Literal["versionadded", "versionchanged", "deprecated"]
             ^^^^^^^^^^^^
    SyntaxError: invalid syntax

    Failed to byte-compile /usr/lib/python3/dist-packages/deprecated/params.py:   File "/usr/lib/python3/dist-packages/deprecated/params.py", line 100
        def __call__[**P, R](self, f: Callable[P, R]) -> Callable[P, R]:
                    ^
    SyntaxError: expected '('

    Failed to byte-compile /usr/lib/python3/dist-packages/deprecated/sphinx.py:   File "/usr/lib/python3/dist-packages/deprecated/sphinx.py", line 35
        type SphinxDirective = Literal["versionadded", "versionchanged", "deprecated"]
             ^^^^^^^^^^^^^^^
    SyntaxError: invalid syntax

This is similar to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1136119

So probably fixable by using an appropriate X-Python3-Version to debian/control.

Versions:

pypy3: 8.0.0+dfsg-1
python3-deprecated: 3.0.0-1

Bests,

#1149678#10
Date:
2026-10-02 07:53:33 UTC
From:
To:
Control: tags -1 pending
Added:

  X-Python3-Version: >= 3.12

to match:

  pyproject.toml:requires-python = ">=3.12"

Kind Regards,

Bas