[Django] #32614: MiddlewareSyncAsyncTests test failure due to 3.3.2 asgiref release?

0 views
Skip to first unread message

Django

unread,
Apr 6, 2021, 12:16:19 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests test failure due to 3.3.2 asgiref release?
---------------------------------------------+------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
I see the following test failing on a recent PR:
`middleware_exceptions.tests.MiddlewareSyncAsyncTests.test_async_process_template_response_returns_none_with_sync_client`
https://djangoci.com/job/pr-
mariadb/database=mysql,label=mariadb,python=python3.9/10979/

It looks like it might be because of the 3.3.2 asgiref release, since that
was released today:
https://github.com/django/asgiref/
and the failure is unrelated to what the PR changed.

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

Django

unread,
Apr 6, 2021, 12:20:06 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests test failure due to 3.3.2 asgiref release?
-----------------------------------+--------------------------------------

Reporter: Chris Jerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Description changed by Chris Jerdonek:

Old description:

> I see the following test failing on a recent PR:
> `middleware_exceptions.tests.MiddlewareSyncAsyncTests.test_async_process_template_response_returns_none_with_sync_client`
> https://djangoci.com/job/pr-
> mariadb/database=mysql,label=mariadb,python=python3.9/10979/
>
> It looks like it might be because of the 3.3.2 asgiref release, since
> that was released today:
> https://github.com/django/asgiref/
> and the failure is unrelated to what the PR changed.

New description:

I see the following test failing on a recent PR:
`middleware_exceptions.tests.MiddlewareSyncAsyncTests.test_async_process_template_response_returns_none_with_sync_client`
https://djangoci.com/job/pr-
mariadb/database=mysql,label=mariadb,python=python3.9/10979/

It looks like it might be because of the 3.3.2 asgiref release, since that
was released today:
https://github.com/django/asgiref/
and the failure is unrelated to what the PR changed.

I also see the same failure on a different recent PR:
https://djangoci.com/job/pull-requests-bionic/database=mysql,label=bionic-
pr,python=python3.8/11081/

--

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

Django

unread,
Apr 6, 2021, 12:26:45 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests test failure due to 3.3.2 asgiref release?
-----------------------------------+--------------------------------------

Reporter: Chris Jerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Resolution:

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

Comment (by Chris Jerdonek):

I flagged it in asgiref's tracker:
https://github.com/django/asgiref/issues/250

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

Django

unread,
Apr 6, 2021, 12:30:00 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-----------------------------------+------------------------------------

Reporter: Chris Jerdonek | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | 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):

* type: Uncategorized => Bug
* stage: Unreviewed => Accepted


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

Django

unread,
Apr 6, 2021, 12:57:55 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-----------------------------------+------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | 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):

* cc: Andrew Godwin, Carlton Gibson (added)


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

Django

unread,
Apr 6, 2021, 1:12:12 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned

Component: Testing framework | 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


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

Django

unread,
Apr 6, 2021, 1:35:18 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: Testing framework | 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/14221 PR]

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

Django

unread,
Apr 6, 2021, 2:04:06 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: Testing framework | 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 GitHub <noreply@…>):

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


Comment:

In [changeset:"78fea27f690028204c03c28d821cb0c0240a7398" 78fea27f]:
{{{
#!CommitTicketReference repository=""
revision="78fea27f690028204c03c28d821cb0c0240a7398"
Fixed #32614 -- Fixed MiddlewareSyncAsyncTests tests with asgiref 3.3.2+.
}}}

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

Django

unread,
Apr 6, 2021, 2:04:34 AM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | 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:"eb7c0a7076568aad5ecfd7c01a09a558623ffc01" eb7c0a70]:
{{{
#!CommitTicketReference repository=""
revision="eb7c0a7076568aad5ecfd7c01a09a558623ffc01"
[3.2.x] Fixed #32614 -- Fixed MiddlewareSyncAsyncTests tests with asgiref
3.3.2+.

Backport of 78fea27f690028204c03c28d821cb0c0240a7398 from main
}}}

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

Django

unread,
Apr 6, 2021, 12:31:43 PM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | 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 Chris Jerdonek):

Are the committed changes still needed with the fix that was deployed to
asgiref in 3.3.3? If not, would it be cleaner to revert those?

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

Django

unread,
Apr 6, 2021, 12:33:36 PM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | 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 Andrew Godwin):

I would encourage them to be kept as the middleware ''should'' also be
marked as an async function, regardless or not of how good asgiref is now
at determining if something is async or not.

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

Django

unread,
Apr 6, 2021, 12:35:42 PM4/6/21
to django-...@googlegroups.com
#32614: MiddlewareSyncAsyncTests crashes with asgiref 3.3.2.
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | 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):

Replying to [comment:9 Chris Jerdonek]:


> Are the committed changes still needed with the fix that was deployed to
asgiref in 3.3.3? If not, would it be cleaner to revert those?

Yes, this is a separate issue. Django on the `main` branch doesn't support
Python < 3.8, so the fix in `asgiref` doesn't affect it.

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

Reply all
Reply to author
Forward
0 new messages