Skip to content

Updates reg.arginfo to make direct use of inspect.signature#68

Open
Daverball wants to merge 1 commit into
morepath:masterfrom
seantis:inspect-signature
Open

Updates reg.arginfo to make direct use of inspect.signature#68
Daverball wants to merge 1 commit into
morepath:masterfrom
seantis:inspect-signature

Conversation

@Daverball
Copy link
Copy Markdown

Fixes #67

In the future we probably should consider getting rid of reg.arginfo in favor of inspect.signature and properly support signatures with positional only and keyword only parameters in reg, but this should be good enough as a backwards-compatible implementation for now, that better supports Python 3.14+. Although there are some open questions around performance, so we may still want to provide a simple wrapper.

I decided to get rid of the internal get_callable_info helper, since the info we need for inspect.signature is different enough, that keeping the function around, would have been confusing for anyone, that for whatever reason tried to rely on this internal helper. So it seemed better to inline the new logic into arginfo.

This also updates the supported python versions.
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