-
Notifications
You must be signed in to change notification settings - Fork 257
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
asyncio.streams.IncompleteReadError is removed from python3.8 #454
Comments
Upon running a stress test, I keep getting the error "AttributeError: module 'asyncio.streams' has no attribute 'IncompleteReadError'" and then my aiohttp server crashes. I installed aiomysql from master but did not fix. |
Nevermind that. I see the branch referenced in the requirements file. It fixed my issue. She must be merged here. |
Manky path: def aiomysql_path():
try:
from aiomysql.connection import IncompleteReadError
return
except:
pass
try:
from asyncio.streams import IncompleteReadError
return
except:
pass
import asyncio
from pymysql import OperationalError
async def _read_bytes(self, num_bytes):
try:
data = await self._reader.readexactly(num_bytes)
except asyncio.exceptions.IncompleteReadError as e:
msg = "Lost connection to MySQL server during query"
raise OperationalError(2013, msg) from e
except (IOError, OSError) as e:
msg = "Lost connection to MySQL server during query (%s)" % (e,)
raise OperationalError(2013, msg) from e
return data
from aiomysql.connection import Connection
Connection._read_bytes = _read_bytes |
Can you up lib version? Cause current version is too old and no fix at last release (0.0.20) |
@webknjaz can you help? |
Ask @terrycain and @jettify @ #466 |
BUMP |
@ndavydovdev release published 14 days ago: #466 (comment) |
Hmmm, I think, databases uses older version, thanks |
* commit '0a8af2355562ea961477738d66b3334332447186': Bump version and tweak setup.py (aio-libs#540) Fill changelog for 0.0.21 release (aio-libs#538) Support python 3.7 and 3.8 in tests and travis CI Update dependencies (aio-libs#485) chore(flake8): fixed flake8 errors (aio-libs#484) added support for sqlalchemy default parameters aio-libs#455 (aio-libs#456) Fix flake Fixed invalid datatime for MySQL 5.7 Rewrote tests to use pytest exclusively Fixed linting Attempted to move db completely to docker Fix Travis attempt 1 Fix aio-libs#454
https://github.com/aio-libs/aiomysql/blob/master/aiomysql/connection.py#L599 exception should be replaced
The text was updated successfully, but these errors were encountered: