Closed
Description
- asyncpg version: 0.14.0
- PostgreSQL version: 10.1
- Python version: 3.6.4
- Platform: Linux Debian sid
- Do you use pgbouncer?: no
- Did you install asyncpg with pip?: yes
- If you built asyncpg locally, which version of Cython did you use?:
- Can the issue be reproduced under both asyncio and
uvloop?: not related to event loop
I experience an issue when trying to connect to my local postgresql cluster. The error is :
File "/home/ludo/.virtualenvs/pyvt/lib/python3.6/site-packages/asyncpg/serverversion.py", line 49, in <listcomp>
versions = [int(p) for p in parts][:3]
ValueError: invalid literal for int() with base 10: '1 (Debian 10'
PostgreSQL version given by the server itself :
[ludo@postgres] # select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 (Debian 10.1-3) on x86_64-pc-linux-gnu, compiled by gcc (Debian 7.2.0-19) 7.2.0, 64-bit
(1 ligne)
PostgreSQL was installed from the main debian repositories :
apt-cache policy postgresql-10
postgresql-10:
Installé : 10.1-3
Candidat : 10.1-3
Table de version :
*** 10.1-3 500
500 http://httpredir.debian.org/debian sid/main amd64 Packages
100 /var/lib/dpkg/status
I looked into the code but failed to find where the version is fetched from PG.
The version_string
received in the split_server_version_string
function is equal to "10.1 (Debian 10.1-3)"
but it should be only "10.1"
according to the rest of the function.
Any ideas to fix it ?
Metadata
Metadata
Assignees
Labels
No labels