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

Protocols in wsgiref.types should use @abstractmethod #127678

Open
srittau opened this issue Dec 6, 2024 · 2 comments
Open

Protocols in wsgiref.types should use @abstractmethod #127678

srittau opened this issue Dec 6, 2024 · 2 comments
Labels
stdlib Python modules in the Lib dir topic-typing type-feature A feature request or enhancement

Comments

@srittau
Copy link
Contributor

srittau commented Dec 6, 2024

Feature or enhancement

Proposal:

See this discussion in #127648 for reference.

Cc @JelleZijlstra

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

@srittau srittau added the type-feature A feature request or enhancement label Dec 6, 2024
@picnixz picnixz added the stdlib Python modules in the Lib dir label Dec 6, 2024
@AlexWaygood
Copy link
Member

If it's accepted, I'm not sure this would be backportable -- it could be considered a breaking change. What if a class inherits from one of these protocols but doesn't override one of the methods you're proposing to make abstract?

@srittau
Copy link
Contributor Author

srittau commented Dec 6, 2024

That is indeed a breaking change, and probably one where there's not good deprecation path. But I also assume that the impact is rather small and would point to actual bugs. But checking the top 1000 or so packages for this would be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-typing type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants