Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30900 closed Bug (fixed)

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

Reported by: Mariusz Felisiak 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 Mariusz Felisiak)

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 Mariusz Felisiak 5 years ago.

Download all attachments as: .zip

Change History (8)

by Mariusz Felisiak, 5 years ago

Attachment: stacktrace.txt added

comment:1 by Mariusz Felisiak, 5 years ago

Description: modified (diff)

comment:2 by Nick Pope, 5 years ago

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

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

comment:3 by Carlton Gibson, 5 years ago

Owner: changed from nobody to Carlton Gibson
Status: newassigned

comment:4 by Carlton Gibson, 5 years ago

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

comment:5 by Carlton Gibson, 5 years ago

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

Version 1, edited 5 years ago by Carlton Gibson (previous) (next) (diff)

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

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 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

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