Opened 2 years ago
Closed 2 years ago
#34203 closed Cleanup/optimization (wontfix)
Drop support for psycopg2 2.8
Reported by: | Paolo Melchiorre | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | postgresql, psycopg |
Cc: | Carlton Gibson, Florian Apolloner | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Psycopg2 2.8.6 was released over 2 years ago and is the latest release of the 2.8 series which is now EOL.
The 2.8 series supports very old versions of Python 3 and still has support for Python 2.7.
Django 4.2 (which supports Python from 3.8 to 3.11) may set Psycopg2 2.9.5 (with Python 3.11 support) as the minimum version it supports, or at least Psycopg2 2.9.2 (with preliminary Python 3.11 support).
In any case, the important thing would be to switch to using the 2.9 series of Psycopg2 which drops support for Python 2.7 and older versions of Python 3.
Change History (9)
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
comment:3 by , 2 years ago
TBH, I don't see a reason to drop support for psycopg2
2.8.4
as it supports Python 3.8 and brings us no difference in maintenance.
comment:4 by , 2 years ago
Cc: | added |
---|
I don't see much value in bumping the minimum supported version of psycopg2
to 2.9.5
. I'd rather completely deprecate support for psycopg2
in Django 5.0 (and remove in Django 6.0) if we fix #33308 in Django 4.2.
follow-up: 6 comment:5 by , 2 years ago
I agree to deprecate Psycopg2
in Django 5.0
, but Django 4.2 LTS
will be supported until April 2026 and I think there will be many Django 4.2
users who will continue to use Psycopg2
.
Since Psycopg2 2.8
is EOL , hasn't been updated for over 2 years and barely supports Python 3.8
, I only see benefits in removing its support from Django 4.2
and forcing Psycopg2
users to at least use the latest 2.9 series which dropped support for Python 2.7
/ Python 3
< 3.6 and added support for Python 3
from 3.6 to 3.11.
What do you think are the cons of removing Psycopg2 2.8
support from Django 4.2
?
follow-up: 7 comment:6 by , 2 years ago
What do you think are the cons of removing
Psycopg2 2.8
support fromDjango 4.2
?
Normally we don't bump minimum supported versions of 3rd party packages when it's not necessary (e.g. they're not compatible with the current Django version, or they require some workarounds in Django). I'd ask what are the pros for Django itself?
Since
Psycopg2 2.8
is EOL
What is the source of this information? There are commits in the maint_2_8 branch after the 2.8.6 release, so as far as I'm aware, we cannot assume that 2.8.7
will not be released in the future.
comment:7 by , 2 years ago
Replying to Mariusz Felisiak:
What do you think are the cons of removing
Psycopg2 2.8
support fromDjango 4.2
?
Normally we don't bump minimum supported versions of 3rd party packages when it's not necessary...
I'd ask what are the pros for Django itself?
The advantage of dropping support for Psycopg2 2.8 for Django is to avoid that users would open issues related to a version of Psycopg2 that hasn't received new updates for more than 2 years and still supports EOL Python versions (e.g. Python 2.7 and < 3.6)
Since
Psycopg2 2.8
is EOL
What is the source of this information?
There are commits in the maint_2_8 branch after the 2.8.6 release, so as far as I'm aware, we cannot assume that2.8.7
will not be released in the future.
In the history of Psycopg2 I have never seen a bugfix release after the release of a subsequent major release. Psycopg2 has no official EOL statement, but after more than 2 years since the last release and 3 major versions (2.9, 3.0, 3.1) I find a new 2.8 release highly unlikely.
I still don't see any drawbacks for Django to drop support for Psycopg2 2.8 , and I think it could be a gradual way to deprecate Psycopg2 2.9 in Django 5.0, but if you think otherwise, please close this issue, because I understand that the priority right now is to complete support for Psycop 3.1.
comment:8 by , 2 years ago
Debian stable still has 2.8.6
currently, and works fine with Python 3.9. Dropping it for 4.2 looks too quick in my opinion.
comment:9 by , 2 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I still don't see any drawbacks for Django to drop support for Psycopg2 2.8
Maybe not for Django itself, but for our users that would be forced to bump a psycopg2
version. Closing as "wontfix". Please feel-free, to start a discussion on DevelopersMailingList if you don't agree, thanks!
I submitted the PR 16370 with Psycopg2 2.9.5 as minimum version.