Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrioChildWatcher inherits asyncio.AbstractChildWatcher, which is deprecated as of Python 3.12 #152

Open
mikenerone opened this issue May 24, 2024 · 1 comment

Comments

@mikenerone
Copy link
Member

Per deprecations listed in What's New In Python 3.12, asyncio.AbstractChildWatcher is deprecated. TrioChildWatcher in trio-asyncio inherits it, leading to warnings with Python 3.12.

This is demonstrated in any 3.12 environment:

❯ python -W error -c "import trio_asyncio"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mikenerone/dev/nexhealth/nexhealth-sync-system/nexhealth-sync-modmed/.venv/lib/python3.12/site-packages/trio_asyncio/__init__.py", line 19, in <module>
    from ._loop import (
  File "/Users/mikenerone/dev/nexhealth/nexhealth-sync-system/nexhealth-sync-modmed/.venv/lib/python3.12/site-packages/trio_asyncio/_loop.py", line 365, in <module>
    class TrioChildWatcher(
  File "/Users/mikenerone/Library/Application Support/pdm/python/[email protected]/lib/python3.12/asyncio/unix_events.py", line 858, in __init_subclass__
    warnings._deprecated("AbstractChildWatcher",
  File "/Users/mikenerone/Library/Application Support/pdm/python/[email protected]/lib/python3.12/warnings.py", line 530, in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
DeprecationWarning: 'AbstractChildWatcher' is deprecated as of Python 3.12 and will be removed in Python 3.14.
@jmehnle
Copy link

jmehnle commented Jun 6, 2024

Context for the deprecation is at python/cpython#94597.

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

No branches or pull requests

2 participants