Skip to content
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-92893: Fix issue when dataclassses.is_dataclass returns False #93497

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

uriyyo
Copy link
Member

@uriyyo uriyyo commented Jun 4, 2022

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

No need to test for typing._GenericAlias.

@uriyyo
Copy link
Member Author

@uriyyo uriyyo commented Jun 5, 2022

@serhiy-storchaka Sorry, I didn't get it. Do you mean we don't need this PR or should we exclude check for typing. _GenericAlias?

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 5, 2022

Sorry, I thought that we only need a check for types.GenericAlias. But after your question I looked at t ignore he code again and see now that typing. _GenericAlias should be checked, and it is even the more common case. Please ignore my previous comment.

Lib/test/test_dataclasses.py Outdated Show resolved Hide resolved
Lib/test/test_dataclasses.py Show resolved Hide resolved
@uriyyo uriyyo requested a review from serhiy-storchaka Jun 5, 2022
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

The implementation looks fine, but as noted on the issue I'm not sure we should change anything here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants