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

AsyncBufferedIOBase has no attribute __aenter__ and __aexit__ #91

Closed
fox91 opened this issue Dec 7, 2020 · 2 comments
Closed

AsyncBufferedIOBase has no attribute __aenter__ and __aexit__ #91

fox91 opened this issue Dec 7, 2020 · 2 comments

Comments

@fox91
Copy link

fox91 commented Dec 7, 2020

Running mypy against this code:

import aiofiles
# ...
async with aiofiles.open('filename', 'wb') as file:
    # ...

returns these errors:

error: "AsyncBufferedIOBase" has no attribute "__aenter__"
error: "AsyncBufferedIOBase" has no attribute "__aexit__"

I'm using:

Python 3.8.6
aiofiles          0.6.0
mypy              0.790
@jackton1
Copy link

jackton1 commented Apr 5, 2021

Upgrading to v0.812 should resolve the issue

See: python/mypy#9739

@fox91
Copy link
Author

fox91 commented Apr 6, 2021

Yes, I confirm.
Thanks

@fox91 fox91 closed this as completed Apr 6, 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

2 participants