You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Asyncpg sensitive to build info in version number #261
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?:
This is easily reproducible with a local PostgreSQL install, either using the docker image linked above or by installing the standard repository version from ubuntu 18.04 (reproduced with 10.2-1 from repository http://us.archive.ubuntu.com/ubuntu bionic/main amd64).
If you built asyncpg locally, which version of Cython did you use?:
n/a
Can the issue be reproduced under both asyncio and uvloop?:
Yes
Whenever a connection is established to the server, the server version string goes through overly stringent parsing that will break if anything remotely unexpected appears in the version string. Several new versions of postgres server I have encountered include build information in parentheses after the numeric version. For example, a real value encountered: '10.2 (Ubuntu 10.2-1)'.
This will cause errors like the following:
ValueError: invalid literal for int() with base 10: '2 (Ubuntu 10'
ValueError: invalid literal for int() with base 10: '2 (Debian 10'
...at line serverversion.py:46, versions = [int(p) for p in parts][:3], in split_server_version_string().
Tiptoeing around this strange restriction by installing from very specific repositories and build versions is becoming cumbersome in CI configuration and deployment, where a minor upgrade to a newer, stable-channel version of postgres server completely breaks Asyncpg's ability to connect to it.
Activity
mumbleskates commentedon Feb 14, 2018
My apologies: #250 05dce25
Make Server Version Extraction More Flexible
Make Server Version Extraction More Flexible (#778)