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 Paolo Melchiorre)

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 Paolo Melchiorre, 2 years ago

Description: modified (diff)

comment:2 by Paolo Melchiorre, 2 years ago

I submitted the PR 16370 with Psycopg2 2.9.5 as minimum version.

comment:3 by Mariusz Felisiak, 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 Mariusz Felisiak, 2 years ago

Cc: Carlton Gibson Florian Apolloner 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.

comment:5 by Paolo Melchiorre, 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 ?

in reply to:  5 ; comment:6 by Mariusz Felisiak, 2 years ago

What do you think are the cons of removing Psycopg2 2.8 support from Django 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.

in reply to:  6 comment:7 by Paolo Melchiorre, 2 years ago

Replying to Mariusz Felisiak:

What do you think are the cons of removing Psycopg2 2.8 support from Django 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 removing support for Psycopg2 2.8 for Django is to avoid opening issues related to a version of Psycopg2 that hasn't received new updates for more than 2 years and still supports very old versions of Python.

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.

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 released I find a new version highly unlikely.

I still don't see any drawbacks for Django to remove support for Psycopg2 2.8 , and I think it could be a gradual way to deprecate Psycopg2 2.9 before 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

Version 0, edited 2 years ago by Paolo Melchiorre (next)

comment:8 by Claude Paroz, 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 Mariusz Felisiak, 2 years ago

Resolution: wontfix
Status: newclosed

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!

Note: See TracTickets for help on using tickets.
Back to Top