Skip to content

Fix epoll test cleanup on Python 3.15 - #758

Open
honglei wants to merge 5 commits into
MagicStack:masterfrom
honglei:fix-python315-epoll-test
Open

honglei wants to merge 5 commits into
MagicStack:masterfrom
honglei:fix-python315-epoll-test

Conversation

@honglei

@honglei honglei commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Keep the test-owned epoll wrapper on a duplicate of uvloop's backend descriptor. The loop retains ownership of its descriptor and closes it itself.

This preserves the existing assertion that remove_reader() removes the socket from the same epoll instance, while avoiding a second close after loop.close() on Python 3.15.

Validation

On Ubuntu 24.04 with locally built uvloop master:

  • Python 3.14.7 free-threaded: TestUVSockets.test_socket_sync_remove passes
  • Python 3.15.0rc1: test passes
  • Python 3.15.0rc1 free-threaded: test passes

Why draft

Current source builds and basic loop smoke tests on 3.15/3.15t, but this is only a test-cleanup prerequisite, not a claim of complete 3.15 support. The full 3.15t optional test dependencies are currently blocked upstream: pyOpenSSL~=25.3.0 resolves to cryptography 46.0.7, whose PyO3 build rejects Python 3.15 free-threaded. I will not add 3.15/3.15t CI or release-wheel targets until that complete suite can run green.

Serialize foreign-thread scheduling calls with the running loop in test_check_thread to avoid corrupting libuv state on free-threaded Python. Wait for the subprocess protocol connection_lost callback before asserting pipe shutdown stages.
@fantix

fantix commented Sep 29, 2026

Copy link
Copy Markdown
Member

Thank you for the PR! I added 3.15 in the CI matrix and fixed some more racing/flaky tests in freethread interpreters.

@fantix
fantix marked this pull request as ready for review September 29, 2026 19:09
Use cibuildwheel 4.2 for Python 3.9+ while retaining 3.2 for Python 3.8. Build and test macOS wheels on an Intel runner with native OpenSSL and native test dependency flags for universal2 builds.
Keep Python 3.8 on cibuildwheel 3.2 and use 4.2 for newer versions. Pair runners with architectures explicitly and test universal2 wheels on arm64.

Prepare OpenSSL and Linux container dependencies for wheel tests, and pass the GitHub CI marker into Linux containers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants