We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
python
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reprlib.recursive_repr
__type_params__
Repro:
>>> from reprlib import recursive_repr >>> >>> class My: ... @recursive_repr() ... def __repr__[T](self, converter: T | None = None): ... ... >>> My().__repr__.__type_params__ ()
This happens because recursive_repr does not use @wraps, but reinvents it:
recursive_repr
@wraps
cpython/Lib/reprlib.py
Lines 26 to 33 in f2eaa92
And __type_params__ was added in #104600
The text was updated successfully, but these errors were encountered:
pythongh-109818: repllib.recursive_repr copies __type_params__
repllib.recursive_repr
cc26fa4
gh-109818: reprlib.recursive_repr copies __type_params__ (#109819)
f65f9e8
[3.12] pythongh-109818: reprlib.recursive_repr copies `__type_param…
3d8ce93
…s__` (pythonGH-109819). (cherry picked from commit f65f9e8) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
pythongh-109818: reprlib.recursive_repr copies __type_params__ (p…
6a8f67e
…ython#109819)
[3.12] gh-109818: reprlib.recursive_repr copies __type_params__ (… (
9be6a11
#109999) [3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (GH-109819). (cherry picked from commit f65f9e8) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Thanks for the issue and PRs!
Little reminder to close issues when the PRs are merged :)
Sorry, something went wrong.
c79de98
sobolevn
No branches or pull requests
Bug report
Repro:
This happens because
recursive_repr
does not use@wraps
, but reinvents it:cpython/Lib/reprlib.py
Lines 26 to 33 in f2eaa92
And
__type_params__
was added in #104600Linked PRs
reprlib.recursive_repr
copies__type_params__
#109819reprlib.recursive_repr
copies__type_params__
(… #109999The text was updated successfully, but these errors were encountered: