| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks @gaogaotiantian for the PR, and @carljm for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
…honGH-105217) (cherry picked from commit 9ad199b) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
GH-105257 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
|
Thanks @gaogaotiantian for the PR, and @carljm for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
|
Sorry, @gaogaotiantian and @carljm, I could not cleanly backport this to 3.11 due to a conflict. |
Sorry, something went wrong.
…es (pythonGH-105217). (cherry picked from commit 9ad199b) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
…es (pythonGH-105217). (cherry picked from commit 9ad199b) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
GH-105274 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
For the code above, inspect.signature(D2) will give a different result than inspect.signature(D1), which is counter-intuitive. This also affects help(D2) vs help(D1).
We should keep the consistency for the signatures for derived classes (of course when the signature is not changed).
This is due to a corner case in inspect.signature() where only the direct defined __init__ and __new__ method on the class takes priority, then __new__ is always used if defined on any base classes. This fix searches __new__ and __init__ based on MRO and prioritize __new__ if both are defined on a base class.