Skip to content

Fix asyncio handle implementation#840

Open
BobTheBuidler wants to merge 8 commits intomasterfrom
handle
Open

Fix asyncio handle implementation#840
BobTheBuidler wants to merge 8 commits intomasterfrom
handle

Conversation

@BobTheBuidler
Copy link
Owner

@BobTheBuidler BobTheBuidler commented Dec 10, 2025

Summary

  • implement Cython Handle/TimerHandle with asyncio-aligned cancel/debug/context behavior and expose internal fields for asyncio.base_events
  • use a_sync.a_sync._helpers.get_event_loop in iter/method/property to safely create per-thread loops

Testing

  • python setup.py build_ext --inplace
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest -p pytest_asyncio_cooperative.plugin tests/asyncio -q (fails: test_create_task_skip_gc_until_done, test_create_task_with_smart_task_factory due to persisted task pruning + asyncio.get_event_loop missing default loop in Python 3.14; unrelated to handle changes)
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest -p pytest_asyncio_cooperative.plugin tests/iter tests/a_sync -q (fails: 16 docstring/typevar tests in tests/iter/test_iterables.py where docstrings still show :obj:T`` and __orig_bases__ is missing; unrelated to get_event_loop change)

@BobTheBuidler BobTheBuidler changed the title Create handle.pyx Fix asyncio handle implementation Jan 16, 2026
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.

1 participant