We will have to change to psycopg 3.x (from psycopg2 2.x) one day but this has pit falls #942
Labels
data model
Affects the data model and/or SQL schema
dependencies
Run `tox -r` before testing locally, dependencies have changed
Django
Upgrading to newer versions of Django
python
Pull requests that update Python code
wat
Bad things waiting to happen: Bad assumptions, bad design
I have been trying and failing to test on Python 3.13 + Django 5.1. I couldn't get psycopg(2) to work.
Turns out, psycopg2 is in maintenance mode and Django recommends psycopg 3.1.8+. However, psycopg 3 does not support
±infinity
as a value of datetimes, which we use forIncident.end_time
(argus.incident.fields.DateTimeInfinityField
) and everywhere in NAV.There is a workaround: https://pypi.org/project/psycopg-infdate/
In order to use
psycopg-infdate
with Django though I suspect we will have to write our own database backend. BTDT. Maybe not this year...The text was updated successfully, but these errors were encountered: