Ofey Chan added the comment:
I updated NEWS and all checks have passed!
--
___
Python tracker
<https://bugs.python.org/issue46761>
___
___
Python-bugs-list m
Ofey Chan added the comment:
> Maybe we can loop in someone who works on a popular runtime function
> introspection library (FastAPI, Pydantic) to see if they have any take on it.
I've checked issues of FastAPI and Pydantic. There is only one issue about
`update_wrapper()`, and
Ofey Chan added the comment:
Thank you Larry. It can never be too careful to deal with language issues!
> why the code behaves like this--is this behavior a genuine bug, or is it
> actually a bugfix for some worse behavior?
In my view, there's rather an concept needing clar
Change by Ofey Chan :
Added file:
https://bugs.python.org/file50639/update_wrapper.breaks.partial.signature.check.__wrapped__.py
___
Python tracker
<https://bugs.python.org/issue46
Ofey Chan added the comment:
I fix the problem.
But sorry for my last message, because it totally miss the point ;)
In `inspect.signature()`, the order of handle `follow_wrapper_chains` and
`functools.partial` cause the problem.
Relevant code:
https://github.com/python/cpython/blob
Change by Ofey Chan :
--
keywords: +patch
pull_requests: +29653
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/31529
___
Python tracker
<https://bugs.python.org/issu
Ofey Chan added the comment:
Hello, I am new to cpython project and want to help.
I dig into `follow_wrapper_chains` feature and found it really interesting.
In `inspect.signature()`, the conversion of `functools.partial` object's
signature is made when going down the unwrap