src/python/location/database.py imports psycopg2. There is a project called psycopg3 from the same author <https://www.psycopg.org/psycopg3/>. Please consider porting libloc to pyscopg3. One can imagine that in the future psycopg2 will be abandoned in favour of psycopg3. And than distribution will start removing psycopg2 A porting guide <https://www.varrazzo.com/blog/2020/11/07/psycopg3-adaptation/>.
Hello Petr, the database.py file is kind of a standard file that we use in many projects. Generally it is a simple wrapper to make the database API a little bit easier to use and more Pythonic. It is not very complicated and does not rely on any special features as far as I can see. psycopg3 looks a lot more complicated than version 2, but I will probably take the time at some point to migrate - hopefully being able to incorporate any async stuff, too. However, that would be a low priority (compared to the other things on my TODO list) for now. Please keep me updated if psycopg2 is suddenly nearing its EOL.
http://git.ipfire.org/?p=people/ms/libloc.git;a=commit;h=e0baba467c79213c691ba7e6494c3dcf504267f2 Author: Michael Tremer <michael.tremer@ipfire.org> database: Migrate to psycopg3 Fixes: #12953 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>