-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bug(?): GzipFile
typing incompatible with io.TextIOWrapper
#11418
Comments
I/O classes are a bit of a mess, since they predate protocols. In fact, |
Here is what I found:
Some of these are only forwarded, so strictly speaking they are not necessary if the method is not called on the wrapper, but not requiring them would be unsafe. It also checks for |
I've opened a draft PR: #11420. Let's see what our tests – especially primer – say. |
Please see the below code with Python 3.12:
Running
mypy==1.8.0
, I get this error message:However, running this code, it actually works fine.
I am thinking this is a typeshed bug, but I am not 100% positive. #5491 and #6061 are possibly related
The text was updated successfully, but these errors were encountered: