Skip to content

Fix crash on class-level import in protocol definition#14926

Merged
JukkaL merged 1 commit intopython:masterfrom
ilevkivskyi:fix-proto-ceash
Mar 20, 2023
Merged

Fix crash on class-level import in protocol definition#14926
JukkaL merged 1 commit intopython:masterfrom
ilevkivskyi:fix-proto-ceash

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #14889

Fix is straightforward. PEP 544 doesn't say anything about this, but IMO ignoring the import (i.e. not counting it as a member) is the most reasonable thing to do.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@ilevkivskyi ilevkivskyi requested a review from JukkaL March 20, 2023 10:24
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

This seems like a good way to deal with imports. Thanks!

@JukkaL JukkaL merged commit 4a54894 into python:master Mar 20, 2023
@ilevkivskyi ilevkivskyi deleted the fix-proto-ceash branch March 20, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import statements under a parametrised protocol results in a crash

2 participants