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

bpo-44807: Forbid to define __init__ method in Protocol classes #27543

Closed
wants to merge 2 commits into from

Conversation

@uriyyo
Copy link
Member

@uriyyo uriyyo commented Aug 2, 2021

https://bugs.python.org/issue44807

@uriyyo
Copy link
Member Author

@uriyyo uriyyo commented Aug 2, 2021

@Fidget-Spinner Could you please review this PR?

@ambv
Copy link
Contributor

@ambv ambv commented Aug 2, 2021

Looks related to BPO-44806 as well.

@uriyyo
Copy link
Member Author

@uriyyo uriyyo commented Aug 10, 2021

@ambv I am not sure about that.

This issue more about that __init__ method of Protocol is simply replaced with another implementation without any warnings or errors. It's seems not related to BPO-44806

@github-actions
Copy link

@github-actions github-actions bot commented Sep 10, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 10, 2021
@ambv
Copy link
Contributor

@ambv ambv commented Sep 21, 2021

Apart from this conflicting with current typing.py and tests, I'm honestly not sure what to do with this PR. Discussion on the issue.

# Conflicts:
#	Lib/test/test_typing.py
#	Lib/typing.py
@uriyyo uriyyo requested a review from Fidget-Spinner as a code owner Sep 21, 2021
@ambv
Copy link
Contributor

@ambv ambv commented Sep 21, 2021

Per issue resolution, we're leaving this for now as it's unclear if __init__() shouldn't be instead treated as part of a protocol definition.

@ambv ambv closed this Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants