Skip to content

Remove sip.dump signature-introspection workaround #225

Backlog

Description

@altendky

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:

# 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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions