Opened 3 years ago

Closed 2 years ago

Last modified 7 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 (23)

comment:1 by Adam Johnson, 3 years ago

Cc: Adam Johnson added

comment:2 by Abhyudai, 3 years ago

Cc: Abhyudai added

comment:3 by אורי, 3 years ago

Cc: אורי added

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

In fac3dd7f:

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

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

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 by GitHub <noreply@…>, 3 years ago

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 by GitHub <noreply@…>, 2 years ago

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 by GitHub <noreply@…>, 2 years ago

In 441103a:

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

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

In 34e2148f:

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

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

comment:10 by Carlton Gibson <carlton@…>, 2 years ago

In f476c884:

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

comment:11 by Carlton Gibson <carlton.gibson@…>, 2 years ago

In 7b0ed458:

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

Backport of f476c8847a0bf1a4e20becfb3dc66f4da0dbf579 from main

comment:12 by bcail, 2 years ago

Cc: bcail added

comment:13 by Mariusz Felisiak, 2 years ago

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

comment:14 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 80777d3:

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

Thanks Simon Willison for inspiration.

comment:15 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 2e82fa5:

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

comment:16 by Mariusz Felisiak, 2 years ago

Has patch: set

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

In e51c998:

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

comment:18 by Mariusz Felisiak, 2 years ago

Resolution: fixed
Status: assignedclosed

comment:19 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

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 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 7b208d7e:

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

Backport of e51c998f8d6fbc9421e4a1226c144d8035c126e0 from main

comment:21 by GitHub <noreply@…>, 2 years ago

In eb6cc01d:

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

comment:22 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In ddf3ee6f:

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

Backport of eb6cc01d0f62c73441a3610193ba210176d0935f from main.

comment:23 by Sarah Boyce <42296566+sarahboyce@…>, 7 months ago

In 338ec052:

Refs #35361 -- Added test for Email line length checks when dealing with surrogate pairs.

Refs #33173, #34118 and #34900.

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