-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert use of
ParamSpec
for functools.wraps
- Loading branch information
1 parent
2816b97
commit 7d987a1
Showing
1 changed file
with
14 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7d987a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hauntsaninja @AlexWaygood Is this commit still needed for typeshed syncs? What was the original problem that made us add this? I made a bunch of
ParamSpec
fixes recently, may be this was fixed as well? If not, I am curious what is the repro, maybe this is something I can fix as well?7d987a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilevkivskyi I think this was the problem: python/typeshed#6670 (comment). More discussion in #14815. I haven't looked at the hits in detail, but it seems worth undoing this change and seeing what mypy-primer says.
7d987a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilevkivskyi as it happens, I experimented just the other day on my local fork to see what happens if we stop reverting this fix: AlexWaygood#11.
I didn't look too deeply at the primer output on that PR, but it looks to me like it's probably still worth it to continue reverting this change for now. The negative impact of using
ParamSpec
is now much less than it was when it was originally made to typeshed (python/typeshed#6670 (comment)). But it still looks to me like usingParamSpec
might cause some issues for mypy users.7d987a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here was the original rationale for adding this commit to the ones we revert whenever we sync typeshed, by the way: #14815 (comment)
7d987a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this was finally undone in a00fcba.