[Django] #33173: Python 3.11 compatibility

369 views
Skip to first unread message

Django

unread,
Oct 5, 2021, 2:27:14 PM10/5/21
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
--------------------------------------------+------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Keywords:
Triage Stage: Someday/Maybe | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
Python 3.11 final is scheduled for October 2022 (see
[https://www.python.org/dev/peps/pep-0664/ ​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.

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

Django

unread,
Oct 12, 2021, 3:37:33 PM10/12/21
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------

Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Johnson):

* cc: Adam Johnson (added)


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

Django

unread,
Nov 1, 2021, 3:27:07 AM11/1/21
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Abhyudai):

* cc: Abhyudai (added)


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

Django

unread,
Dec 27, 2021, 11:31:12 AM12/27/21
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by אורי):

* cc: אורי (added)


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

Django

unread,
Feb 19, 2022, 2:36:13 PM2/19/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"fac3dd7f390d372736e05974cc5c3ef1a3768fbb" fac3dd7f]:
{{{
#!CommitTicketReference repository=""
revision="fac3dd7f390d372736e05974cc5c3ef1a3768fbb"
Refs #33173 -- Fixed MailTests.test_backend_arg() on Windows and Python
3.11+.
}}}

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

Django

unread,
Mar 8, 2022, 7:17:29 AM3/8/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"d4fd31684ad5a7b9be8a9d26c5a8796f96c8d80b" d4fd316]:
{{{
#!CommitTicketReference repository=""
revision="d4fd31684ad5a7b9be8a9d26c5a8796f96c8d80b"
Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale().

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

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

Django

unread,
Apr 7, 2022, 1:03:05 AM4/7/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"2ee4caf56b8e000cabbb73ad81ff05738d6d0a35" 2ee4caf5]:
{{{
#!CommitTicketReference repository=""
revision="2ee4caf56b8e000cabbb73ad81ff05738d6d0a35"
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
}}}

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

Django

unread,
May 9, 2022, 4:39:02 AM5/9/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"439cd73c1670a2af25837149a68526fe5555399d" 439cd73c]:
{{{
#!CommitTicketReference repository=""
revision="439cd73c1670a2af25837149a68526fe5555399d"
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.
}}}

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

Django

unread,
May 10, 2022, 3:57:55 AM5/10/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"441103a04d1d167dc870eaaf90e3fba974f67c93" 441103a]:
{{{
#!CommitTicketReference repository=""
revision="441103a04d1d167dc870eaaf90e3fba974f67c93"
Refs #33173, Refs #30451 -- Fixed ResourceWarning from unclosed body files
in ASGI handler on Python 3.11+.
}}}

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

Django

unread,
May 11, 2022, 8:07:22 AM5/11/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"34e2148fc725e7200050f74130d7523e3cd8507a" 34e2148f]:
{{{
#!CommitTicketReference repository=""
revision="34e2148fc725e7200050f74130d7523e3cd8507a"
Refs #33173 -- Removed use of deprecated cgi module.

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

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

Django

unread,
Aug 4, 2022, 4:01:10 AM8/4/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"f476c8847a0bf1a4e20becfb3dc66f4da0dbf579" f476c884]:
{{{
#!CommitTicketReference repository=""
revision="f476c8847a0bf1a4e20becfb3dc66f4da0dbf579"
Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed files in
ASGI tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:10>

Django

unread,
Aug 4, 2022, 4:15:58 AM8/4/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"7b0ed458d960f1b0bf5c46a74b2fef0e0def71b8" 7b0ed458]:
{{{
#!CommitTicketReference repository=""
revision="7b0ed458d960f1b0bf5c46a74b2fef0e0def71b8"
[4.1.x] Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed
files in ASGI tests.

Backport of f476c8847a0bf1a4e20becfb3dc66f4da0dbf579 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:11>

Django

unread,
Oct 17, 2022, 4:34:39 PM10/17/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bcail):

* cc: bcail (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:12>

Django

unread,
Oct 24, 2022, 11:41:32 PM10/24/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned
* stage: Someday/Maybe => Accepted


Comment:

https://www.python.org/downloads/release/python-3110/

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:13>

Django

unread,
Oct 26, 2022, 3:43:33 AM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"80777d30b34968c39479d943822d2d335aba1571" 80777d3]:
{{{
#!CommitTicketReference repository=""
revision="80777d30b34968c39479d943822d2d335aba1571"
Refs #33173 -- Fixed destroying test databases when running tests in
parallel using spawn on Windows.

Thanks Simon Willison for inspiration.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:14>

Django

unread,
Oct 26, 2022, 3:43:33 AM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"2e82fa54ca732948f3ad3f723acb341f60e45f19" 2e82fa5]:
{{{
#!CommitTicketReference repository=""
revision="2e82fa54ca732948f3ad3f723acb341f60e45f19"
Refs #33173 -- Used Python 3.11 for GitHub actions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:15>

Django

unread,
Oct 26, 2022, 4:02:02 AM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16228 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:16>

Django

unread,
Oct 26, 2022, 4:25:47 AM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"e51c998f8d6fbc9421e4a1226c144d8035c126e0" e51c998]:
{{{
#!CommitTicketReference repository=""
revision="e51c998f8d6fbc9421e4a1226c144d8035c126e0"
Refs #33173 -- Added Python 3.11 to classifiers and tox.ini.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:17>

Django

unread,
Oct 26, 2022, 4:26:31 AM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed

Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:18>

Django

unread,
Oct 26, 2022, 1:09:58 PM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7b208d7e933bb72d09d289af173712338443ccb7" 7b208d7e]:
{{{
#!CommitTicketReference repository=""
revision="7b208d7e933bb72d09d289af173712338443ccb7"
[4.1.x] Refs #33173 -- Added Python 3.11 to classifiers and tox.ini.

Backport of e51c998f8d6fbc9421e4a1226c144d8035c126e0 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:20>

Django

unread,
Oct 26, 2022, 1:10:00 PM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"72f08f35755c62cdd9f049d4440fa7f5cd9a0171" 72f08f35]:
{{{
#!CommitTicketReference repository=""
revision="72f08f35755c62cdd9f049d4440fa7f5cd9a0171"
[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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:19>

Django

unread,
Oct 26, 2022, 2:11:12 PM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"eb6cc01d0f62c73441a3610193ba210176d0935f" eb6cc01d]:
{{{
#!CommitTicketReference repository=""
revision="eb6cc01d0f62c73441a3610193ba210176d0935f"
Refs #33173 -- Doc'd Python 3.11 compatibility in Django 4.1.x.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:21>

Django

unread,
Oct 26, 2022, 2:14:42 PM10/26/22
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"ddf3ee6f9e6a0b87dd3ce498f53d7c9d7756f486" ddf3ee6f]:
{{{
#!CommitTicketReference repository=""
revision="ddf3ee6f9e6a0b87dd3ce498f53d7c9d7756f486"
[4.1.x] Refs #33173 -- Doc'd Python 3.11 compatibility in Django 4.1.x.

Backport of eb6cc01d0f62c73441a3610193ba210176d0935f from main.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:22>

Django

unread,
Apr 10, 2024, 11:57:04 AM4/10/24
to django-...@googlegroups.com
#33173: Python 3.11 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"338ec052b4824d3f621629b3bf0f344c7a43c3dc" 338ec052]:
{{{#!CommitTicketReference repository=""
revision="338ec052b4824d3f621629b3bf0f344c7a43c3dc"
Refs #35361 -- Added test for Email line length checks when dealing with
surrogate pairs.

Refs #33173, #34118 and #34900.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33173#comment:23>
Reply all
Reply to author
Forward
0 new messages