Description
PR #224 adds an exact, optional stubtest allowlist entry for the incorrect introspected signature of PyQt5.sip.dump on Python 3.13+. Track removal of that workaround after correcting the underlying metadata or introspection behavior.
Reproduced with Python 3.13.12, PyQt5 5.15.6, PyQt5-sip 12.20.1, and mypy 2.4.1: the function's bound self is None, its text signature contains an extra self parameter, and inspect.signature reports two positional-only parameters. Runtime accepts exactly one positional argument and rejects both zero and two arguments. The current one-argument stub matches runtime behavior.
Current exception:
PyQt5-stubs/stubtest.allowlist
Lines 5 to 8 in 86957b5
| # On Python 3.13+, signature introspection reports a spurious self parameter | |
| # for this one-argument function. Runtime and typing tests verify its contract. | |
| # Matching the empty string permits this entry to be unused on older Python. | |
| (?:PyQt5\.sip\.dump)? |
Regression coverage verifies the actual signature:
PyQt5-stubs/tests/builtin_signatures.py
Lines 50 to 55 in 86957b5
| obj = QtCore.QObject() | |
| sip.dump(obj) | |
| with pytest.raises(TypeError): | |
| sip.dump(obj=obj) # type: ignore[call-arg] | |
| with pytest.raises(TypeError): | |
| sip.dump(obj, obj) # type: ignore[call-arg] |
Completion criteria:
- Identify and track the underlying SIP, CPython, or stubtest defect upstream as appropriate.
- Verify a correction across the supported Python and platform matrix while preserving the real one-argument API.
- Remove this allowlist entry once the supported dependency versions permit it, retaining the runtime and typing regressions.
Activity