Skip to content

Conversation

@Gouvernathor
Copy link
Contributor

@Gouvernathor Gouvernathor commented Feb 27, 2023

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like we currently have any tests asserting that the inspect.Parameter kinds support ordering. I'm not sure we should document it if it's untested, as that means that it could break in the future without anybody noticing. Would you be interested in adding a test to https://github.com/python/cpython/blob/main/Lib/test/test_inspect.py as part of this PR?

@Gouvernathor
Copy link
Contributor Author

@AlexWaygood I was about to, but actually there is !

self.assertTrue(P.POSITIONAL_ONLY < P.POSITIONAL_OR_KEYWORD < \
P.VAR_POSITIONAL < P.KEYWORD_ONLY < P.VAR_KEYWORD)

@AlexWaygood
Copy link
Member

@AlexWaygood I was about to, but actually there is !

self.assertTrue(P.POSITIONAL_ONLY < P.POSITIONAL_OR_KEYWORD < \
P.VAR_POSITIONAL < P.KEYWORD_ONLY < P.VAR_KEYWORD)

Thanks, not sure how I missed that!

Co-authored-by: Alex Waygood <[email protected]>
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@miss-islington
Copy link
Contributor

Status check is done, and it's a success ✅.

@miss-islington miss-islington merged commit 0db6f44 into python:main Feb 27, 2023
@miss-islington
Copy link
Contributor

Thanks @Gouvernathor for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-102298 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Feb 27, 2023
@bedevere-bot
Copy link

GH-102299 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Feb 27, 2023
@Gouvernathor Gouvernathor deleted the patch-3 branch February 27, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants