Skip to content

Use inspect.signature for callable argument checks#3820

Open
cyphercodes wants to merge 1 commit into
Pylons:mainfrom
cyphercodes:fix-pep649-signature-3812
Open

Use inspect.signature for callable argument checks#3820
cyphercodes wants to merge 1 commit into
Pylons:mainfrom
cyphercodes:fix-pep649-signature-3812

Conversation

@cyphercodes

Copy link
Copy Markdown

Summary

  • replace inspect.getfullargspec usage in callable argument checks with a shared get_signature helper
  • pass annotation_format=Format.FORWARDREF on Python 3.14+ so Pyramid does not evaluate annotations it does not use
  • add regression coverage ensuring these paths no longer call getfullargspec

Fixes #3812.

Tests

  • python -m pytest tests/test_util.py::Test_takes_one_arg tests/test_util.py::TestUnboundMethods -q
  • python -m pytest tests/test_util.py tests/test_config/test_adapters.py -q
  • python -m pytest -q
  • git diff --check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of inspect.getfullargspec is problematic for PEP 649 robustness in Python 3.14

1 participant