8000 gh-103395: Improve `typing._GenericAlias.__dir__` coverage by sobolevn · Pull Request #103396 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-103395: Improve typing._GenericAlias.__dir__ coverage #103396

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

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

sobolevn
Copy link
Member
@sobolevn sobolevn commented Apr 9, 2023

One interesting thing about Callable: #103395 (comment)

Did I cover all magic props / methods that we promise to have?
Do I need to add anything else to the test?

dir_items = set(dir(Annotated[int, 4]))
for required_item in [
'__args__', '__parameters__', '__origin__',
'__metadata__',
Copy link
Member
@AlexWaygood AlexWaygood Apr 9, 2023

Choose a reason for hiding this comment

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

Note that the __metadata__ field is not currently documented, but really should be:

(No change requested here.)

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.

LGTM, thanks!

@AlexWaygood AlexWaygood added the needs backport to 3.11 only security fixes label Apr 10, 2023
@AlexWaygood AlexWaygood merged commit a28e2ce into python:main Apr 10, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 10, 2023
…honGH-103396)

(cherry picked from commit a28e2ce)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

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

8000

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Apr 10, 2023
miss-islington added a commit that referenced this pull request Apr 10, 2023
(cherry picked from commit a28e2ce)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0