asyncpg fails to build against postgresql 10.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
asyncpg (Debian) |
Fix Released
|
Unknown
|
|||
asyncpg (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
I tried to fulfil to the promise that dpb made and tried to help with som eolder proposed migrations.
After a while I found something I can actually help, so I looked at asyncpg.
Building version 0.13.0-1 was failing on armhf [1]
Error (all 198 of them):
E ValueError: invalid literal for int() with base 10: '1 (Ubuntu 10'
That seems to do a int conversion with something that gets an "1 (Ubuntu 10" as text.
That is in function split_server_
The failing variable is the argument "version_string"
That could be related to postgres 10 now being to digits.
But why only on armhf then?
It triggers the code on setup when checking for the postgres version.
Function _get_pg_version in asyncpg/cluster.py.
To get it it calls effectively:
/usr/lib/
This is now the string:
"postgres (PostgreSQL) 10.1 (Ubuntu 10.1-3)"
Then it drops the prefix:
"10.1 (Ubuntu 10.1-3)"
Well all that happens on x86 as well.
If I modify the source to be a callable program and iterate a bit I see that:
$ ./test-
Initial 10.1 (Ubuntu 10.1-3)
parts ['10', '1 (Ubuntu 10', '1']
Traceback (most recent call last):
File "./test-
main(
File "./test-
versions = [int(p) for p in parts][:3]
ValueError: invalid literal for int() with base 10: '1 (Ubuntu 10'
I think it was broken by "build time".
On x86 I see:
postgresql-
On armhf I see:
postgresql-
The old version format was "postgres (PostgreSQL) 9.6.6"
A fix would be:
if " (" in version_string:
With all that known I found [2] and [3].
I pinged [3] with the info on [2] and given an upload happens this will resolve and by that unblock part of the proposed-migration.
Further on I found, debugged, fixed and reported [4] which makes it build and work correctly again.
There might be more things that need to be addressed by upstream to follow this pg change, but for now things seem better than before.
I prepared an ubuntu1 upload to get this finally migrating in bionic.
And we can make it a sync once upstream & Debian picked things up.
[1]: https:/
[2]: https:/
[3]: https:/
[4]: https:/
Changed in asyncpg (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in asyncpg (Debian): | |
status: | Unknown → New |
Changed in asyncpg (Debian): | |
status: | New → Fix Released |
Upstream had a fix, but on another place.
So I unrolled the second part of the fix and used the upstream fix for an ubuntu2 upload.