Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-107805: Fix signatures of module-level generated functions inturtle#107807
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sobolevn commentedAug 9, 2023
I think that this can go into rc2, because it fixes a bug which makes |
gpshead left a comment
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.
likely good, but i'll take a closer look tomorrow. one suggestion added.
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedAug 10, 2023
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Lib/test/test_turtle.py Outdated
| 'pen':'(pen=None, **pendict)', | ||
| } | ||
| fornameinturtle.__all__: |
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.
The purpose of this test is only to verify known signatures, correct?
In that case, looping overknown_signatures.items() rather thanturtle.__all__ makes more sense. Otherwise a typo in a known_signatures name key would go silently unnoticed and we're otherwise creating subtests for all names in turtle even though most of them don't test anything.
serhiy-storchaka left a comment
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.
Well, I think that it would be nice to add also tests for the original issue:
- Call
teleport()without arguments. - Call
teleport()with three positional arguments (it should fail).
bedevere-bot commentedAug 18, 2023
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
sobolevn commentedAug 21, 2023
I've addressed@gpshead comments about the test case, but I don't think that I can actually test these functions:
If anyone wants to contribute some |
serhiy-storchaka left a comment
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.
Well, testing module-level turtle function is a non-trivial task.
gpshead left a comment
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.
I manually tested that turtle.Turtle() appears to work and that Turtle.teleport works.
miss-islington commentedSep 1, 2023
…n `turtle` (pythonGH-107807)(cherry picked from commit044b8b3)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
bedevere-bot commentedSep 1, 2023
GH-108749 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Now we are using
inspect.signaturewhich works correct for all possible parameter types.There are no
/params to test it, but it uses the same branch as regular pos-or-keyword params, so it should be fine.Related#103974
turtle.teleporthas incorrect-ish signature #107805