[Django] #34203: Drop support for psycopg2 2.8

14 views
Skip to first unread message

Django

unread,
Dec 8, 2022, 6:31:16 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo | Owner: nobody
Melchiorre |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords: postgresql, psycopg
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
''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).

--
Ticket URL: <https://code.djangoproject.com/ticket/34203>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 8, 2022, 6:40:15 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:

Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Paolo Melchiorre:

Old description:

> ''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).

New description:

''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.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:1>

Django

unread,
Dec 8, 2022, 6:41:31 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Paolo Melchiorre):

I submitted the [https://github.com/django/django/pull/16370 PR 16370]
with Psycopg2 2.9.5 as minimum version.

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:2>

Django

unread,
Dec 8, 2022, 6:43:05 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:3>

Django

unread,
Dec 8, 2022, 6:56:52 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Carlton Gibson, Florian Apolloner (added)


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:4>

Django

unread,
Dec 8, 2022, 8:35:47 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Paolo Melchiorre):

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` ?

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:5>

Django

unread,
Dec 8, 2022, 9:27:31 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by 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 (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
[https://github.com/psycopg/psycopg2/commits/maint_2_8 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:6>

Django

unread,
Dec 8, 2022, 11:10:46 AM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Paolo Melchiorre):

Replying to [comment:6 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
[https://github.com/psycopg/psycopg2/commits/maint_2_8 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 [https://pypi.org/project/psycopg2/#history 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

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:7>

Django

unread,
Dec 8, 2022, 12:24:32 PM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:8>

Django

unread,
Dec 8, 2022, 2:35:41 PM12/8/22
to django-...@googlegroups.com
#34203: Drop support for psycopg2 2.8
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: postgresql, psycopg | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

> 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!

--
Ticket URL: <https://code.djangoproject.com/ticket/34203#comment:9>

Reply all
Reply to author
Forward
0 new messages