Opened 2 years ago

Closed 14 months ago

Last modified 14 months ago

#33173 closed New feature (fixed)

Python 3.11 compatibility

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Adam Johnson, Abhyudai, אורי, bcail Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Python 3.11 final is scheduled for October 2022 (see PEP 664). This is a tracking ticket for compatibility fixes for Django submitted in the meantime.

Django 4.1 will be the first version to support Python 3.11, because Django 4.0 will end the mainstream support in August 2022.

Change History (22)

comment:1 Changed 2 years ago by Adam Johnson

Cc: Adam Johnson added

comment:2 Changed 2 years ago by Abhyudai

Cc: Abhyudai added

comment:3 Changed 2 years ago by אורי

Cc: אורי added

comment:4 Changed 22 months ago by GitHub <noreply@…>

In fac3dd7f:

Refs #33173 -- Fixed MailTests.test_backend_arg() on Windows and Python 3.11+.

comment:5 Changed 21 months ago by GitHub <noreply@…>

In d4fd316:

Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale().

locale.getdefaultlocale() was deprecated in Python 3.11, see
https://bugs.python.org/issue46659.

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

In 2ee4caf5:

Refs #33173 -- Fixed test_runner/test_utils tests on Python 3.11+.

Python 3.11 uses fully qualified test name in unittest output. See
https://github.com/python/cpython/commit/755be9b1505af591b9f2ee424a6525b6c2b65ce9

comment:7 Changed 19 months ago by GitHub <noreply@…>

In 439cd73c:

Refs #33173 -- Fixed test_dateparse tests on Python 3.11+.

date/datetime/time.fromisoformat() support any valid ISO 8601 format
in Python 3.11+, see https://github.com/python/cpython/issues/80010.

comment:8 Changed 19 months ago by GitHub <noreply@…>

In 441103a:

Refs #33173, Refs #30451 -- Fixed ResourceWarning from unclosed body files in ASGI handler on Python 3.11+.

comment:9 Changed 19 months ago by Carlton Gibson <carlton@…>

In 34e2148f:

Refs #33173 -- Removed use of deprecated cgi module.

https://peps.python.org/pep-0594/#cgi

comment:10 Changed 16 months ago by Carlton Gibson <carlton@…>

In f476c884:

Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed files in ASGI tests.

comment:11 Changed 16 months ago by Carlton Gibson <carlton.gibson@…>

In 7b0ed458:

[4.1.x] Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed files in ASGI tests.

Backport of f476c8847a0bf1a4e20becfb3dc66f4da0dbf579 from main

comment:12 Changed 14 months ago by bcail

Cc: bcail added

comment:13 Changed 14 months ago by Mariusz Felisiak

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned
Triage Stage: Someday/MaybeAccepted

comment:14 Changed 14 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 80777d3:

Refs #33173 -- Fixed destroying test databases when running tests in parallel using spawn on Windows.

Thanks Simon Willison for inspiration.

comment:15 Changed 14 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 2e82fa5:

Refs #33173 -- Used Python 3.11 for GitHub actions.

comment:16 Changed 14 months ago by Mariusz Felisiak

Has patch: set

comment:17 Changed 14 months ago by GitHub <noreply@…>

In e51c998:

Refs #33173 -- Added Python 3.11 to classifiers and tox.ini.

comment:18 Changed 14 months ago by Mariusz Felisiak

Resolution: fixed
Status: assignedclosed

comment:19 Changed 14 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 72f08f35:

[4.1.x] Refs #33173 -- Fixed destroying test databases when running tests in parallel using spawn on Windows.

Thanks Simon Willison for inspiration.

Backport of 80777d30b34968c39479d943822d2d335aba1571 from main

comment:20 Changed 14 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 7b208d7e:

[4.1.x] Refs #33173 -- Added Python 3.11 to classifiers and tox.ini.

Backport of e51c998f8d6fbc9421e4a1226c144d8035c126e0 from main

comment:21 Changed 14 months ago by GitHub <noreply@…>

In eb6cc01d:

Refs #33173 -- Doc'd Python 3.11 compatibility in Django 4.1.x.

comment:22 Changed 14 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In ddf3ee6f:

[4.1.x] Refs #33173 -- Doc'd Python 3.11 compatibility in Django 4.1.x.

Backport of eb6cc01d0f62c73441a3610193ba210176d0935f from main.

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