[Django] #34118: Python 3.12 compatibility

260 views
Skip to first unread message

Django

unread,
Oct 24, 2022, 11:51:05 PM10/24/22
to django-...@googlegroups.com
#34118: Python 3.12 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.12 final is scheduled for October 2023 (see
[https://peps.python.org/pep-0693/ ​PEP 693]). This is a tracking ticket
for compatibility fixes for Django submitted in the meantime.

Django 4.2 will be the first version to support Python 3.12, because
Django 4.1 will end the mainstream support in April 2023.

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

Django

unread,
Oct 25, 2022, 2:22:47 PM10/25/22
to django-...@googlegroups.com
#34118: Python 3.12 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/34118#comment:1>

Django

unread,
Oct 25, 2022, 11:22:17 PM10/25/22
to django-...@googlegroups.com
#34118: Python 3.12 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 David Sanders):

* cc: David Sanders (added)


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

Django

unread,
Oct 25, 2022, 11:24:40 PM10/25/22
to django-...@googlegroups.com
#34118: Python 3.12 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 David Sanders):

I'm getting errors on the following which was working for 3.11.0

{{{
tests main % python --version
Python 3.11.0
tests main % ./runtests.py
queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries
Testing against Django installed in
'/Users/dsanders/projects/django/django' with up to 10 processes
Found 1 test(s).
Creating test database for alias 'default'...
System check identified no issues (1 silenced).
.
----------------------------------------------------------------------
Ran 1 test in 0.295s

OK
Destroying test database for alias 'default'...


… 8< … switch venvs


tests main % python --version
Python 3.12.0a1
tests main % ./runtests.py
queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries
Testing against Django installed in
'/Users/dsanders/projects/django/django' with up to 10 processes
Found 1 test(s).
Creating test database for alias 'default'...
System check identified no issues (1 silenced).
F
======================================================================
FAIL: test_avoid_infinite_loop_on_too_many_subqueries
(queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries)
----------------------------------------------------------------------
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/dsanders/projects/django/tests/queries/tests.py", line 550,
in test_avoid_infinite_loop_on_too_many_subqueries
with self.assertRaisesMessage(RecursionError, msg):
File
"/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py",
line 155, in __exit__
self.gen.throw(value)
File "/Users/dsanders/projects/django/django/test/testcases.py", line
890, in _assert_raises_or_warns_cm
self.assertIn(expected_message, str(getattr(cm, cm_attr)))
AssertionError: 'Maximum recursion depth exceeded: too many subqueries.'
not found in 'maximum recursion depth exceeded'

----------------------------------------------------------------------
Ran 1 test in 0.207s

FAILED (failures=1)
Destroying test database for alias 'default'...
}}}

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

Django

unread,
Oct 26, 2022, 2:27:31 PM10/26/22
to django-...@googlegroups.com
#34118: Python 3.12 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 bcail):

Another data point: SQLite and Postgres tests pass for me on Linux with
Python 3.12 alpha 1.

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

Django

unread,
Nov 16, 2022, 2:16:52 AM11/16/22
to django-...@googlegroups.com
#34118: Python 3.12 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:"67504ea505797f515fb51c9688ce746c0997e9b2" 67504ea5]:
{{{
#!CommitTicketReference repository=""
revision="67504ea505797f515fb51c9688ce746c0997e9b2"
Refs #34118 -- Skipped not compatible requirements on daily builds for
Python 3.12.
}}}

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

Django

unread,
Nov 16, 2022, 5:31:36 AM11/16/22
to django-...@googlegroups.com
#34118: Python 3.12 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:"2848e5d0ce5cf3c31fe87525536093b21d570f69" 2848e5d]:
{{{
#!CommitTicketReference repository=""
revision="2848e5d0ce5cf3c31fe87525536093b21d570f69"
Refs #34118 -- Used smtplib's context parameter instead of keyfile and
certfile.

keyfile and certfile parameters were removed in Python 3.12, see
https://github.com/python/cpython/commit/ef0e72b31d22f780d3a165d7d0471806061fe380
}}}

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

Django

unread,
Dec 20, 2022, 5:11:40 AM12/20/22
to django-...@googlegroups.com
#34118: Python 3.12 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:"32d70b2f55b1f74736fd11bc8efce890ad5fa2f0" 32d70b2]:
{{{
#!CommitTicketReference repository=""
revision="32d70b2f55b1f74736fd11bc8efce890ad5fa2f0"
Refs #34118 -- Adopted asgiref coroutine detection shims.

Thanks to Mariusz Felisiak for review.
}}}

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

Django

unread,
Jan 10, 2023, 11:37:28 PM1/10/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"829f4d1448f7b40238b47592fc17061bf77b0f23" 829f4d1]:
{{{
#!CommitTicketReference repository=""
revision="829f4d1448f7b40238b47592fc17061bf77b0f23"
Refs #31546, Refs #34118 -- Corrected
CommandTests.test_requires_system_checks_specific().

System checks are never called without skip_checks=False. Moreover,
called_once_with() is not a proper assertion and raise AttributeError
on Python 3.12.
}}}

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

Django

unread,
Apr 5, 2023, 7:59:59 AM4/5/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"38e63c9e61152682f3ff982c85a73793ab6d3267" 38e63c9]:
{{{
#!CommitTicketReference repository=""
revision="38e63c9e61152682f3ff982c85a73793ab6d3267"
Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on Python
3.12+.

https://github.com/python/cpython/commit/2a4d8c0a9e88f45047da640ce5a92b304d2d39b1
}}}

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

Django

unread,
Apr 5, 2023, 8:00:31 AM4/5/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"32cfa73c6a7264a0b6365cc380ca0b257b6fc07a" 32cfa73c]:
{{{
#!CommitTicketReference repository=""
revision="32cfa73c6a7264a0b6365cc380ca0b257b6fc07a"
[4.2.x] Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on
Python 3.12+.

https://github.com/python/cpython/commit/2a4d8c0a9e88f45047da640ce5a92b304d2d39b1
Backport of 38e63c9e61152682f3ff982c85a73793ab6d3267 from main
}}}

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

Django

unread,
Apr 7, 2023, 12:45:39 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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 thesamesam):

Hi folks,

https://github.com/django/django/commit/38e63c9e61152682f3ff982c85a73793ab6d3267
was applied to fix Python 3.12, but cpython upstream have backported the
fix for https://github.com/python/cpython/issues/102549 to Python 3.11
too.

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

Django

unread,
Apr 7, 2023, 12:47:34 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak):

Replying to [comment:11 thesamesam]:


> Hi folks,
>
>
https://github.com/django/django/commit/38e63c9e61152682f3ff982c85a73793ab6d3267
was applied to fix Python 3.12, but cpython upstream have backported the
fix for https://github.com/python/cpython/issues/102549 to Python 3.11
too.
>

> The Django patch will need adjusting to probably just allow both output
messages (or sniff the Python minor/patch version).

Thanks! It's unfortunate, will fix this.

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

Django

unread,
Apr 7, 2023, 1:00:15 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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 thesamesam):

* cc: thesamesam (added)


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

Django

unread,
Apr 7, 2023, 5:08:43 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489" 2eb1f372]:
{{{
#!CommitTicketReference repository=""
revision="2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489"


Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on Python

3.11.4+.

https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e

Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267.
}}}

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

Django

unread,
Apr 7, 2023, 5:09:00 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f6e0029fcd24b476cee703ba69e153ff79b202b9" f6e0029]:
{{{
#!CommitTicketReference repository=""
revision="f6e0029fcd24b476cee703ba69e153ff79b202b9"
[4.2.x] Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on
Python 3.11.4+.

https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e

Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267.
Backport of 2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489 from main
}}}

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

Django

unread,
Apr 7, 2023, 5:10:34 AM4/7/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f55bcff9dcac1d0cb1f927f9fd543cfd567400c4" f55bcff9]:
{{{
#!CommitTicketReference repository=""
revision="f55bcff9dcac1d0cb1f927f9fd543cfd567400c4"
[4.1.x] Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on
Python 3.11.4+.

https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e

Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267.

Backport of 2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489 from main
}}}

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

Django

unread,
Apr 28, 2023, 7:04:35 AM4/28/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"5a6d4d3bfde07daab9777545694beb014c832264" 5a6d4d3b]:
{{{
#!CommitTicketReference repository=""
revision="5a6d4d3bfde07daab9777545694beb014c832264"
Refs #34118, Refs #34504 -- Added backward incompatibility note about
EmailBackend.ssl_context.

Follow up to 2848e5d0ce5cf3c31fe87525536093b21d570f69.
}}}

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

Django

unread,
Apr 28, 2023, 7:05:18 AM4/28/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4f343a10f765c4a6672c8ef4c39d044dd7d6653f" 4f343a1]:
{{{
#!CommitTicketReference repository=""
revision="4f343a10f765c4a6672c8ef4c39d044dd7d6653f"
[4.2.x] Refs #34118, Refs #34504 -- Added backward incompatibility note
about EmailBackend.ssl_context.

Follow up to 2848e5d0ce5cf3c31fe87525536093b21d570f69.
Backport of 5a6d4d3bfde07daab9777545694beb014c832264 from main
}}}

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

Django

unread,
May 23, 2023, 6:56:51 AM5/23/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"fc9c90d9c4611d441d2617a7d74f622b1f520f7c" fc9c90d9]:
{{{
#!CommitTicketReference repository=""
revision="fc9c90d9c4611d441d2617a7d74f622b1f520f7c"
Refs #34118 -- Fixed
FunctionalTests.test_cached_property_reuse_different_names() on Python
3.12+.

Python 3.12+ no longer wraps exceptions in __set_name__, see
https://github.com/python/cpython/commit/55c99d97e14618dfce41472dd4446f763b0da13f
}}}

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

Django

unread,
May 23, 2023, 6:59:27 AM5/23/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"bf5249fc8e0dd6e0c4c3101fda500d6966b6dcfc" bf5249fc]:
{{{
#!CommitTicketReference repository=""
revision="bf5249fc8e0dd6e0c4c3101fda500d6966b6dcfc"
[4.2.x] Refs #34118 -- Fixed
FunctionalTests.test_cached_property_reuse_different_names() on Python
3.12+.

Python 3.12+ no longer wraps exceptions in __set_name__, see
https://github.com/python/cpython/commit/55c99d97e14618dfce41472dd4446f763b0da13f

Backport of fc9c90d9c4611d441d2617a7d74f622b1f520f7c from main
}}}

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

Django

unread,
Jul 17, 2023, 5:03:51 AM7/17/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"da2f8e8257d1bea4215381684ca4abfcee333c43" da2f8e8]:
{{{
#!CommitTicketReference repository=""
revision="da2f8e8257d1bea4215381684ca4abfcee333c43"
Refs #34118 -- Improved sanitize_address() error message for tuple with
empty strings.
}}}

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

Django

unread,
Jul 21, 2023, 3:18:34 PM7/21/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"62b83889e066b8270854f7560e0498944efd7689" 62b83889]:
{{{
#!CommitTicketReference repository=""
revision="62b83889e066b8270854f7560e0498944efd7689"
Fixed #34731, Refs #34118 -- Replaced assertEquals() with assertEqual() in
test_condition_with_func_and_lookup_outside_relation_name().

Signed-off-by: Michel Alexandre Salim <sal...@fedoraproject.org>
}}}

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

Django

unread,
Oct 2, 2023, 2:53:00 PM10/2/23
to django-...@googlegroups.com
#34118: Python 3.12 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-3120/

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:23>

Django

unread,
Oct 16, 2023, 12:27:37 AM10/16/23
to django-...@googlegroups.com
#34118: Python 3.12 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 GitHub <noreply@…>):

In [changeset:"20b7aac7ca60b0352d926340622e618bcbee54a8" 20b7aac7]:
{{{
#!CommitTicketReference repository=""
revision="20b7aac7ca60b0352d926340622e618bcbee54a8"
Refs #34900, Refs #34118 -- Updated assertion in
test_skip_class_unless_db_feature() test on Python 3.12.1+.

Python 3.12.1+ no longer includes skipped tests in the number of
running tests. Check out:

https://github.com/python/cpython/issues/110890#issuecomment-1763458686
https://github.com/python/cpython/pull/106588
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:24>

Django

unread,
Oct 16, 2023, 12:28:46 AM10/16/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"448510a94b9af30e1d9384166f830e8da2ef0438" 448510a9]:
{{{
#!CommitTicketReference repository=""
revision="448510a94b9af30e1d9384166f830e8da2ef0438"
[5.0.x] Refs #34900, Refs #34118 -- Updated assertion in


test_skip_class_unless_db_feature() test on Python 3.12.1+.

Python 3.12.1+ no longer includes skipped tests in the number of
running tests. Check out:

https://github.com/python/cpython/issues/110890#issuecomment-1763458686
https://github.com/python/cpython/pull/106588
Backport of 20b7aac7ca60b0352d926340622e618bcbee54a8 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:25>

Django

unread,
Oct 16, 2023, 12:29:10 AM10/16/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"a576ef98aea2709741f32a863cff3c7a54172ded" a576ef9]:
{{{
#!CommitTicketReference repository=""
revision="a576ef98aea2709741f32a863cff3c7a54172ded"
[4.2.x] Refs #34900, Refs #34118 -- Updated assertion in


test_skip_class_unless_db_feature() test on Python 3.12.1+.

Python 3.12.1+ no longer includes skipped tests in the number of
running tests. Check out:

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:26>

Django

unread,
Oct 23, 2023, 4:04:02 AM10/23/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"e2922b0d5f18169d1d0115a6db5d2ed8c42d0692" e2922b0]:
{{{
#!CommitTicketReference repository=""
revision="e2922b0d5f18169d1d0115a6db5d2ed8c42d0692"
Refs #34118 -- Avoided repeat coroutine checks in MiddlewareMixin.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:27>

Django

unread,
Nov 18, 2023, 10:58:35 AM11/18/23
to django-...@googlegroups.com
#34118: Python 3.12 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 GitHub <noreply@…>):

In [changeset:"19c4052f98e5dc4fe9d7edd7125df6a66efbd79f" 19c4052f]:
{{{
#!CommitTicketReference repository=""
revision="19c4052f98e5dc4fe9d7edd7125df6a66efbd79f"
Refs #34118 -- Used Python 3.12 for GitHub actions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:28>

Django

unread,
Nov 18, 2023, 1:34:18 PM11/18/23
to django-...@googlegroups.com
#34118: Python 3.12 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/17488 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:29>

Django

unread,
Nov 19, 2023, 10:29:25 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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:"b5750b9f6414865200221d9c0dc568ae6b551294" b5750b9f]:
{{{
#!CommitTicketReference repository=""
revision="b5750b9f6414865200221d9c0dc568ae6b551294"
[4.2.x] Refs #34118 -- Fixed stacklevel in complex_setting_changed on
Python 3.12.

This fix is unnecessary in Django 5.0 since
e83a88566a71a2353cebc35992c110be0f8628af because signals no longer use
sync_to_async().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:30>

Django

unread,
Nov 19, 2023, 10:31:56 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f955c90488e1f32e6e38b3c956e937579d389fb2" f955c90]:
{{{
#!CommitTicketReference repository=""
revision="f955c90488e1f32e6e38b3c956e937579d389fb2"
Refs #34118 -- Added Python 3.12 to classifiers and tox.ini.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:31>

Django

unread,
Nov 19, 2023, 10:31:56 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"ecfea054ee2b8ddfa027459ff8b6aecba05facf7" ecfea05]:
{{{
#!CommitTicketReference repository=""
revision="ecfea054ee2b8ddfa027459ff8b6aecba05facf7"
Refs #34118 -- Doc'd Python 3.12 compatibility in Django 4.2.x.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:32>

Django

unread,
Nov 19, 2023, 10:33:35 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f721fb937c6e41fab3cc1451f7170e8d9ab4940d" f721fb93]:
{{{
#!CommitTicketReference repository=""
revision="f721fb937c6e41fab3cc1451f7170e8d9ab4940d"
[5.0.x] Refs #34118 -- Doc'd Python 3.12 compatibility in Django 4.2.x.

Backport of ecfea054ee2b8ddfa027459ff8b6aecba05facf7 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:34>

Django

unread,
Nov 19, 2023, 10:33:35 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"c342b58243fac5019290bb328d68093462066535" c342b58]:
{{{
#!CommitTicketReference repository=""
revision="c342b58243fac5019290bb328d68093462066535"
[5.0.x] Refs #34118 -- Added Python 3.12 to classifiers and tox.ini.

Backport of f955c90488e1f32e6e38b3c956e937579d389fb2 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:33>

Django

unread,
Nov 19, 2023, 10:39:08 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"233e2a9e31ba7acbad4a0f5131ed2bcdcdba3b02" 233e2a9e]:
{{{
#!CommitTicketReference repository=""
revision="233e2a9e31ba7acbad4a0f5131ed2bcdcdba3b02"
[4.2.x] Refs #34118 -- Added Python 3.12 to classifiers and tox.ini.

Backport of f955c90488e1f32e6e38b3c956e937579d389fb2 from main.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:35>

Django

unread,
Nov 19, 2023, 10:39:08 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"9afeb6b9b6d4e025306c918e7e717288049cbdfd" 9afeb6b9]:
{{{
#!CommitTicketReference repository=""
revision="9afeb6b9b6d4e025306c918e7e717288049cbdfd"
[4.2.x] Refs #34118 -- Doc'd Python 3.12 compatibility in Django 4.2.x.

Backport of ecfea054ee2b8ddfa027459ff8b6aecba05facf7 from main.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:36>

Django

unread,
Nov 19, 2023, 10:40:29 AM11/19/23
to django-...@googlegroups.com
#34118: Python 3.12 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/34118#comment:37>

Django

unread,
Feb 10, 2024, 11:07:55 AMFeb 10
to django-...@googlegroups.com
#34118: Python 3.12 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:"bc8471f0aac8f0c215b9471b594d159783bac19b" bc8471f0]:
{{{#!CommitTicketReference repository=""
revision="bc8471f0aac8f0c215b9471b594d159783bac19b"


Refs #34900, Refs #34118 -- Updated assertion in

test_skip_class_unless_db_feature() test on Python 3.12.2+.

Python 3.12.2 bring back the skipped tests in the number of running
tests. Refs
https://github.com/python/cpython/commit/0a737639dcd3b7181250f5d56694b192eaddeef0
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:38>

Django

unread,
Feb 10, 2024, 11:08:29 AMFeb 10
to django-...@googlegroups.com
#34118: Python 3.12 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:"1ba5afa0f21f10843bb530b443687e07a511516a" 1ba5afa]:
{{{#!CommitTicketReference repository=""
revision="1ba5afa0f21f10843bb530b443687e07a511516a"
[5.0.x] Refs #34900, Refs #34118 -- Updated assertion in


test_skip_class_unless_db_feature() test on Python 3.12.2+.

Python 3.12.2 bring back the skipped tests in the number of running
tests. Refs
https://github.com/python/cpython/commit/0a737639dcd3b7181250f5d56694b192eaddeef0

Backport of bc8471f0aac8f0c215b9471b594d159783bac19b from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:39>

Django

unread,
Feb 10, 2024, 11:09:28 AMFeb 10
to django-...@googlegroups.com
#34118: Python 3.12 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:"86d8034972db5014769cdd4832125067f31b3e8b" 86d8034]:
{{{#!CommitTicketReference repository=""
revision="86d8034972db5014769cdd4832125067f31b3e8b"
[4.2.x] Refs #34900, Refs #34118 -- Updated assertion in


test_skip_class_unless_db_feature() test on Python 3.12.2+.

Python 3.12.2 bring back the skipped tests in the number of running
tests. Refs
https://github.com/python/cpython/commit/0a737639dcd3b7181250f5d56694b192eaddeef0

Backport of bc8471f0aac8f0c215b9471b594d159783bac19b from main
}}}
--

Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:40>

Django

unread,
Apr 10, 2024, 11:57:04 AMApr 10
to django-...@googlegroups.com
#34118: Python 3.12 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/34118#comment:41>
Reply all
Reply to author
Forward
0 new messages