-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
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
gh-103406: Modernize pos-only arguments usage in test_signature
#103407
Merged
Conversation
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
I am not sure about 3.10 backport 🤔 |
@JelleZijlstra would you have time to take a look, please? |
Thank you for the review! 🎉 |
JelleZijlstra
approved these changes
Apr 14, 2023
Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-103536 is a backport of this pull request to the 3.11 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 14, 2023
…e` (pythonGH-103407) (cherry picked from commit 7569781) Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington
added a commit
that referenced
this pull request
Apr 14, 2023
…-103407) (cherry picked from commit 7569781) Co-authored-by: Nikita Sobolev <[email protected]>
carljm
added a commit
to carljm/cpython
that referenced
this pull request
Apr 14, 2023
* main: pythongh-103532: Remove TKINTER_PROTECT_LOADTK code (pythonGH-103535) pythongh-103180: Add CI timeouts to all GitHub Actions jobs (python#103437) Remove double space in import error message (python#103458) ipaddress: Remove non-existent ip_str param from docstring (python#103461) Fix syntax typo in isolating extensions doc (python#103516) pythongh-103406: Modernize pos-only arguments usage in `test_signature` (python#103407) Proofread howto/perf_profiling.rst (python#103530) Fix unused functions warnings in instrumentation.c (pythonGH-103515)
carljm
added a commit
to carljm/cpython
that referenced
this pull request
Apr 14, 2023
* superopt: fix incompatible types update generated cases don't unnecessarily re-find args in error case Apply suggestions from code review pythongh-103532: Remove TKINTER_PROTECT_LOADTK code (pythonGH-103535) pythongh-103180: Add CI timeouts to all GitHub Actions jobs (python#103437) Remove double space in import error message (python#103458) ipaddress: Remove non-existent ip_str param from docstring (python#103461) Fix syntax typo in isolating extensions doc (python#103516) pythongh-103406: Modernize pos-only arguments usage in `test_signature` (python#103407) Proofread howto/perf_profiling.rst (python#103530) Fix unused functions warnings in instrumentation.c (pythonGH-103515)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We can be sure that these
.__signature__
manipulations are safe to removed, because:.replace
calls are required by the test logic (for example, when testingSignature
andParameter
subclasses or invalid states) are not touched.__signature__
change is tested here:cpython/Lib/test/test_inspect.py
Lines 1045 to 1051 in ecad802
Now,
/
is used where it must be used.test_inspect
by adding real pos-only parameters #103406