Fix getting callback params on py3.14+ (#1741)

* Add test to reproduce `TypeError: unsupported callable` on `python >=3.14`

* Fix getting callback params on py3.14+

Add 1741.bugfix.rst

* Code optimization
This commit is contained in:
Andrew 2026-01-01 23:42:40 +02:00 committed by GitHub
parent 79ee135331
commit b27ca9a45d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 63 additions and 5 deletions

3
CHANGES/1741.bugfix.rst Normal file
View file

@ -0,0 +1,3 @@
`inspect.getfullargspec(callback)` can't process callback if it's arguments have "ForwardRef" annotations in Py3.14+
This PR replaces the old way with `inspect.signature(callback)` and add `annotation_format = annotationlib.Format.FORWARDREF` argument to it if runtime python version >=3.14.