[Django] #31040: Python 3.9 compatibility

38 views
Skip to first unread message

Django

unread,
Nov 27, 2019, 8:28:26 AM11/27/19
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
-----------------------------------------+------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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.9 final is scheduled for October 2020. This is a tracking ticket
for compatibility fixes for Django submitted in the meantime.

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

Django

unread,
Jan 3, 2020, 1:47:22 AM1/3/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------

Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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:"1960d55f8baa412b43546d15a8342554808fff57" 1960d55]:
{{{
#!CommitTicketReference repository=""
revision="1960d55f8baa412b43546d15a8342554808fff57"
Refs #31040 -- Fixed crypt.crypt() call in test_hashers.py.

An empty string is invalid salt in Python 3 and raises exception since
Python 3.9, see https://bugs.python.org/issue38402.
}}}

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

Django

unread,
Mar 31, 2020, 6:09:31 AM3/31/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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:"195e0cb1709e96144ccbb9863ff8526f4c733f63" 195e0cb]:
{{{
#!CommitTicketReference repository=""
revision="195e0cb1709e96144ccbb9863ff8526f4c733f63"
Refs #31040 -- Used 402 HTTP status in middleware_exceptions tests.

HTTP status code 418 - "I'm a Teaport" was added to http.HTTPStatus in
Python 3.9.0a5 [1] that caused failures in middleware_exceptions tests.

This changes HTTP status used in middleware_exceptions tests to 402,
which exists in all supported versions of Python.

[1] https://docs.python.org/3.9/whatsnew/3.9.html#http
}}}

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

Django

unread,
May 20, 2020, 4:14:43 AM5/20/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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 felixxm):

`handlers.tests.AsyncHandlerRequestTests.test_suspiciousop_in_view_returns_400`
hangs on Python 3.9.0b1 (it works on Python 3.9.0.a6), see
https://bugs.python.org/issue40696.

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

Django

unread,
May 22, 2020, 6:02:10 AM5/22/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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 Chris Jerdonek):

While the cause of the `test_suspiciousop_in_view_returns_400` failure
will be fixed in CPython, I recommend that you review the Django code that
was triggering it. Django's exception handling code was raising an
exception that was creating a cycle in the exception chain (by re-raising
an exception that was already being handled). You might want to reconsider
whether there is a better solution. You can see the linked Python issue
for some analysis I did of the code on the Django side.

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

Django

unread,
May 26, 2020, 2:24:44 AM5/26/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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 felixxm):

[https://github.com/django/django/pull/12978 PR] for preventing cycles in
exception chains.

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

Django

unread,
May 28, 2020, 7:05:28 AM5/28/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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:"d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0" d94a9aa]:
{{{
#!CommitTicketReference repository=""
revision="d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0"
Refs #31040, Refs #31224 -- Prevented cycles in exceptions chain.

Async exception handling was raising an exception that was creating a
cycle in the exception chain (by re-raising an exception in
sync_to_async that was already being handled).

Thanks Chris Jerdonek for detailed analysis.
}}}

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

Django

unread,
May 28, 2020, 7:06:40 AM5/28/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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:"bd389a832aa1480fc76c3fb2bb6f92ea4209e378" bd389a8]:
{{{
#!CommitTicketReference repository=""
revision="bd389a832aa1480fc76c3fb2bb6f92ea4209e378"
[3.1.x] Refs #31040, Refs #31224 -- Prevented cycles in exceptions chain.

Async exception handling was raising an exception that was creating a
cycle in the exception chain (by re-raising an exception in
sync_to_async that was already being handled).

Thanks Chris Jerdonek for detailed analysis.

Backport of d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0 from master
}}}

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

Django

unread,
Oct 13, 2020, 2:38:49 AM10/13/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned

Component: Core (Other) | Version: master
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:"84685e5132718ea700acc7cb9c7168fb4a915cd4" 84685e51]:
{{{
#!CommitTicketReference repository=""
revision="84685e5132718ea700acc7cb9c7168fb4a915cd4"
[3.1.x] Refs #31040 -- Doc'd Python 3.9 compatibility.

Backport of e18156b6c35908f2a4026287b5225a6a4da8af1a from master.
}}}

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

Django

unread,
Oct 13, 2020, 2:42:27 AM10/13/20
to django-...@googlegroups.com
#31040: Python 3.9 compatibility
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
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:"301bca9394cd977bc085c5cc50bd0ef9f6af52d7" 301bca9]:
{{{
#!CommitTicketReference repository=""
revision="301bca9394cd977bc085c5cc50bd0ef9f6af52d7"
[3.0.x] Refs #31040 -- Doc'd Python 3.9 compatibility.

Backport of e18156b6c35908f2a4026287b5225a6a4da8af1a from master.
}}}

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

Reply all
Reply to author
Forward
0 new messages