Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#30900 closed Bug (fixed)

ASGI and async tests are failing on Python 3.8 and Windows.

Reported by: felixxm Owned by: Carlton Gibson
Component: HTTP handling Version: 3.0
Severity: Release blocker Keywords:
Cc: Andrew Godwin, Carlton Gibson Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by felixxm)

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/

Attachments (1)

stacktrace.txt (9.3 KB) - added by felixxm 3 months ago.

Download all attachments as: .zip

Change History (8)

Changed 3 months ago by felixxm

Attachment: stacktrace.txt added

comment:1 Changed 3 months ago by felixxm

Description: modified (diff)

comment:2 Changed 3 months ago by Nick Pope

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

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

comment:3 Changed 3 months ago by Carlton Gibson

Owner: changed from nobody to Carlton Gibson
Status: newassigned

comment:4 Changed 3 months ago by Carlton Gibson

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

comment:5 Changed 3 months ago by Carlton Gibson

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

Tracking on CPython: https://bugs.python.org/issue38563

Last edited 3 months ago by Carlton Gibson (previous) (diff)

comment:6 Changed 3 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In e83c300:

Fixed #30900 -- Skipped async-related tests on Windows using Python 3.8.0.

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

comment:7 Changed 3 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 06e3c6d:

[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

Note: See TracTickets for help on using tickets.
Back to Top