Opened 4 years ago

Closed 4 years ago

Last modified 15 months ago

#32355 closed Cleanup/optimization (fixed)

Drop support for Python 3.6 & 3.7.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Core (Other) Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django 3.2 LTS, supported until April 2024, is the last version to support:

  • Python 3.6 (end of life: December 2021)
  • Python 3.7 (end of life: June 2023)

See our policy about Python version support and discussions regarding the Python version support policy:

Change History (22)

comment:1 by Mariusz Felisiak, 4 years ago

Version: 4.0

comment:2 by Claude Paroz, 4 years ago

With my usual conservative hat on, I'd plead to not drop Python 3.7 support too soon. It's still widely used in stable systems (namely Debian) and asking contributors running those systems to install a Python version "by hand" to contribute to Django master branch is not friendly at all.

in reply to:  2 comment:3 by Mariusz Felisiak, 4 years ago

Replying to Claude Paroz:

With my usual conservative hat on, I'd plead to not drop Python 3.7 support too soon. It's still widely used in stable systems (namely Debian) and asking contributors running those systems to install a Python version "by hand" to contribute to Django master branch is not friendly at all.

I understand your concerns, but there's not consensus to change the policy on the mailing list. Also, if not in Django 4.0 then we will need to support Python 3.7 to Django 4.2 LTS (end of life April 2026), so 2 more years, and almost 3 years after the last Python 3.7 release.

comment:4 by Claude Paroz, 4 years ago

I know my practice (using latest released Django on as-much-stable-as-possible systems) is not on the majority side, so you'll never find a consensus to change the policy.

comment:5 by GitHub <noreply@…>, 4 years ago

In 88e972e4:

Fixed #32265, Refs #32355 -- Removed unnecessary ServerHandler.handle_error().

ConnectionAbortedError, BrokenPipeError, ConnectionResetError raised
from SocketServer.BaseServer.finish_request() are already suppressed
by wsgiref.handlers.BaseHandler.run() in Python 3.7+, see
https://github.com/python/cpython/commit/47ffc1a9f6fab1c17cdcc325d4af066317369ed7

comment:6 by Mariusz Felisiak, 4 years ago

Has patch: set

comment:7 by Carlton Gibson, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:8 by Carlton Gibson <carlton@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In ec0ff406:

Fixed #32355 -- Dropped support for Python 3.6 and 3.7

comment:9 by Carlton Gibson <carlton@…>, 4 years ago

In 4372233e:

Refs #32355 -- Restored PY36 and PY37 version constants.

Partially reverts ec0ff406311de88f4e2a135d784363424fe602aa.

PY36 should be removed when Django 2.2 is EOL.
PY37 should be removed when Django 3.2 is EOL.

Thanks to Tim Graham for the report.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In cecdec91:

Refs #32355 -- Corrected comments about Python's _NamespacePath.

_NamespacePath supports indexing in Python 3.8+.

comment:11 by GitHub <noreply@…>, 3 years ago

In 213850b:

Refs #32355 -- Used addClassCleanup() in tests.

Inspired by Adam Johnson talk on DjangoCon Europe 2021.

comment:12 by GitHub <noreply@…>, 3 years ago

In faba5b7:

Refs #32355 -- Used addClassCleanup() in SimpleTestCase and SerializeMixin.

comment:13 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 840ad063:

Refs #32355 -- Modernized subprocess.run() calls.

comment:14 by GitHub <noreply@…>, 3 years ago

In 5bac1719:

Refs #32355 -- Used @functools.lru_cache as a straight decorator.

comment:15 by GitHub <noreply@…>, 3 years ago

In ca04659:

Refs #32355 -- Bumped required psycopg2 version to 2.8.4.

psycopg2 2.8.4 is the first release to support Python 3.8.

comment:16 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In b5f60ef5:

[4.0.x] Refs #32355 -- Bumped required psycopg2 version to 2.8.4.

psycopg2 2.8.4 is the first release to support Python 3.8.
Backport of ca04659b4b3f042c1bc7e557c25ed91e3c56c745 from main

comment:17 by GitHub <noreply@…>, 3 years ago

In 7346c28:

Refs #32355 -- Removed unnecessary list() calls before reversed() on dictviews.

Dict and dictviews are iterable in reversed insertion order using
reversed() in Python 3.8+.

comment:18 by GitHub <noreply@…>, 23 months ago

In 7d93299:

Refs #32355 -- Bumped mysqlclient requirement to >= 1.4.3.

mysqlclient 1.4.3 is the first release to support Python 3.8.

comment:19 by GitHub <noreply@…>, 23 months ago

In 63d1cb0:

Refs #32355 -- Bumped minimum supported versions of 3rd-party packages.

This bumps minimum supported versions of 3rd-party packages to the first
releases to support Python 3.8.

comment:20 by GitHub <noreply@…>, 20 months ago

In fbe85010:

Refs #32355 -- Bumped required version of sqlparse in setup.cfg.

Follow up to 63d1cb0092f8933a92f471c5150d61140f33882c.

comment:21 by Mariusz Felisiak <felisiak.mariusz@…>, 20 months ago

In 69a3890c:

[4.2.x] Refs #32355 -- Bumped required version of sqlparse in setup.cfg.

Follow up to 63d1cb0092f8933a92f471c5150d61140f33882c.

Backport of fbe850106b2e4b85f838219cb9e1df95fba6c164 from main.

comment:22 by GitHub <noreply@…>, 15 months ago

In c74a6fa:

Refs #32355 -- Removed unnecessary getattr() call.

options.test_name_patterns is always defined.

Follow up to ec0ff406311de88f4e2a135d784363424fe602aa.

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