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.
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>
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>
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/32614#comment:3>
* cc: Andrew Godwin, Carlton Gibson (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/32614#comment:4>
* owner: nobody => Mariusz Felisiak
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32614#comment:5>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/14221 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32614#comment:6>
* 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>
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>
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>
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>
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>