Skip to content

stdlib: Use protocols instead of IO for GZipFile #5163

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

Closed
jlost opened this issue Mar 31, 2021 · 2 comments
Closed

stdlib: Use protocols instead of IO for GZipFile #5163

jlost opened this issue Mar 31, 2021 · 2 comments

Comments

@jlost
Copy link

jlost commented Mar 31, 2021

Kicking this problem upstream: #5099

GzipFile is still using IO as argument type, which is discouraged. We prefer custom protocols for argument types, and that would hopefully fix the problem above.

Does it make sense to use custom protocols in GZipFile? Would it be an improvement?

@JelleZijlstra
Copy link
Member

Yes, this is the direction we want in general. You don't necessarily need custom protocols; it's possible that something like _typeshed.SupportsWrite will suffice (I haven't checked).

@srittau
Copy link
Collaborator

srittau commented Apr 1, 2021

What Jelle said. Please ignore the word "custom" in my quote above. That said, this is just a duplicate of #5099.

@srittau srittau closed this as completed Apr 1, 2021
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

No branches or pull requests

3 participants