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

@uriyyo
Copy link
Member Author

uriyyo commented Aug 2, 2021

@Fidget-Spinner Could you please review this PR?

@ambv
Copy link
Contributor

ambv commented Aug 2, 2021

Looks related to BPO-44806 as well.

@uriyyo
Copy link
Member Author

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

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

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Sep 10, 2021
@ambv
Copy link
Contributor

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
@ambv
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants