[Django] #30900: ASGI and async tests are failing on Python 3.8 and Windows.

31 views
Skip to first unread message

Django

unread,
Oct 23, 2019, 2:43:37 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------------+------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 3.0
Severity: Release blocker | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
9 ASGI and async tests are failing on Python 3.8 and Windows:

- `asgi.tests.ASGITest.test_disconnect`
- `asgi.tests.ASGITest.test_file_response`
- `asgi.tests.ASGITest.test_get_asgi_application`
- `asgi.tests.ASGITest.test_get_query_string`
- `asgi.tests.ASGITest.test_headers`
- `asgi.tests.ASGITest.test_non_unicode_query_string`
- `asgi.tests.ASGITest.test_wrong_connection_type`
- `async.tests.AsyncUnsafeTest.test_async_unsafe`
- `async.tests.DatabaseConnectionTest.test_get_async_connection`

{{{
File "C:\Python38\lib\asyncio\proactor_events.py", line 679, in close
signal.set_wakeup_fd(-1)
ValueError: set_wakeup_fd only works in main thread
}}}

See https://djangoci.com/view/Main/job/django-
windows/database=sqlite3,label=windows,python=Python38/274/

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

Django

unread,
Oct 23, 2019, 2:43:54 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
---------------------------------+------------------------------------

Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 3.0
Severity: Release blocker | 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 felixxm):

* Attachment "stacktrace.txt" added.

Django

unread,
Oct 23, 2019, 2:46:48 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
---------------------------------+------------------------------------

Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 3.0
Severity: Release blocker | Resolution:

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

Old description:

> 9 ASGI and async tests are failing on Python 3.8 and Windows:
>
> - `asgi.tests.ASGITest.test_disconnect`
> - `asgi.tests.ASGITest.test_file_response`
> - `asgi.tests.ASGITest.test_get_asgi_application`
> - `asgi.tests.ASGITest.test_get_query_string`
> - `asgi.tests.ASGITest.test_headers`
> - `asgi.tests.ASGITest.test_non_unicode_query_string`
> - `asgi.tests.ASGITest.test_wrong_connection_type`
> - `async.tests.AsyncUnsafeTest.test_async_unsafe`
> - `async.tests.DatabaseConnectionTest.test_get_async_connection`
>
> {{{
> File "C:\Python38\lib\asyncio\proactor_events.py", line 679, in close
> signal.set_wakeup_fd(-1)
> ValueError: set_wakeup_fd only works in main thread
> }}}
>
> See https://djangoci.com/view/Main/job/django-
> windows/database=sqlite3,label=windows,python=Python38/274/

New description:

9 ASGI and async tests are failing on Python 3.8 and Windows:

- `asgi.tests.ASGITest.test_disconnect`
- `asgi.tests.ASGITest.test_file_response`
- `asgi.tests.ASGITest.test_get_asgi_application`
- `asgi.tests.ASGITest.test_get_query_string`
- `asgi.tests.ASGITest.test_headers`
- `asgi.tests.ASGITest.test_non_unicode_query_string`
- `asgi.tests.ASGITest.test_wrong_connection_type`
- `async.tests.AsyncUnsafeTest.test_async_unsafe`
- `async.tests.DatabaseConnectionTest.test_get_async_connection`

{{{
File "C:\Jenkins\workspace\django-
windows\database\sqlite3\label\windows\python\Python38\.env\lib\site-
packages\asgiref\sync.py", line 130, in _run_event_loop


File "C:\Python38\lib\asyncio\proactor_events.py", line 679, in close
signal.set_wakeup_fd(-1)
ValueError: set_wakeup_fd only works in main thread
}}}

See https://djangoci.com/view/Main/job/django-
windows/database=sqlite3,label=windows,python=Python38/274/

--

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

Django

unread,
Oct 23, 2019, 3:28:01 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
---------------------------------+------------------------------------

Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 3.0
Severity: Release blocker | 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 Nick Pope):

I suspect this is caused by the change to use `ProactorEventLoop` on
Windows by default.

See https://bugs.python.org/issue34687

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

Django

unread,
Oct 23, 2019, 4:14:32 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Carlton
| Gibson
Type: Bug | Status: assigned

Component: HTTP handling | Version: 3.0
Severity: Release blocker | 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 Carlton Gibson):

* status: new => assigned
* owner: nobody => Carlton Gibson


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

Django

unread,
Oct 23, 2019, 5:56:09 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: HTTP handling | Version: 3.0
Severity: Release blocker | 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 Carlton Gibson):

This'll need a fix in `asgiref`. Tracking at
https://github.com/django/asgiref/issues/132

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

Django

unread,
Oct 23, 2019, 7:57:26 AM10/23/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: HTTP handling | Version: 3.0
Severity: Release blocker | 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 Carlton Gibson):

I created a PR on asgiref, that looks in testing. This may do until a fix
lands in Python (???)

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

Django

unread,
Oct 24, 2019, 4:44:11 AM10/24/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Carlton
| Gibson
Type: Bug | Status: closed

Component: HTTP handling | Version: 3.0
Severity: Release blocker | Resolution: fixed

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 <felisiak.mariusz@…>):

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


Comment:

In [changeset:"e83c300a3312995d46315616f4361dfa110c741b" e83c300]:
{{{
#!CommitTicketReference repository=""
revision="e83c300a3312995d46315616f4361dfa110c741b"
Fixed #30900 -- Skipped async-related tests on Windows using Python 3.8.0.

Refs https://bugs.python.org/issue38563.
}}}

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

Django

unread,
Oct 24, 2019, 4:44:46 AM10/24/19
to django-...@googlegroups.com
#30900: ASGI and async tests are failing on Python 3.8 and Windows.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: HTTP handling | Version: 3.0
Severity: Release blocker | Resolution: fixed

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:"06e3c6db869400fe5ca050eb1e00bcd4503a61f3" 06e3c6d]:
{{{
#!CommitTicketReference repository=""
revision="06e3c6db869400fe5ca050eb1e00bcd4503a61f3"
[3.0.x] Fixed #30900 -- Skipped async-related tests on Windows using
Python 3.8.0.

Refs https://bugs.python.org/issue38563.
Backport of e83c300a3312995d46315616f4361dfa110c741b from master
}}}

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

Reply all
Reply to author
Forward
0 new messages