You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find a way to ignore TrioDeprecationWarning only. I get the warning while using recent trio-asyncio release (0.11), on Python 3.9:
.../trio_asyncio/_base.py:20: TrioDeprecationWarning: trio.hazmat is deprecated since Trio 0.15.0; use trio.lowlevel instead (https://github.com/python-trio/trio/issues/476)
from trio.hazmat import wait_for_child
(The warning seems to be fixed in the master: python-trio/trio-asyncio#87. But the point about ignoring TrioDeprecationWarning still stands.)
I've tried python -W ignore::trio.TrioDeprecationWarning ..., but I got Invalid -W option ignored: invalid module name: 'trio' error. There is an open Python bug about it.
The filter has to be enabled before trio_asyncio is imported. If this is difficult for whatever reason, a workaround would be to manually import trio.hazmat to trigger the warning. Since imports are cached in Python, the warning will only be triggered once.
(of course, with all that being said, a release of trio-asyncio that fixes this would be nice)
I couldn't find a way to ignore
TrioDeprecationWarning
only. I get the warning while using recent trio-asyncio release (0.11), on Python 3.9:(The warning seems to be fixed in the master: python-trio/trio-asyncio#87. But the point about ignoring
TrioDeprecationWarning
still stands.)I've tried
python -W ignore::trio.TrioDeprecationWarning ...
, but I gotInvalid -W option ignored: invalid module name: 'trio'
error. There is an open Python bug about it.I've tried
PYTHONPATH=/full/path/to/trio
work-around to fix the above, but it fails with core dump:Fatal Python error: init_sys_streams: can't initialize sys standard streams
. There is another open Python bug about it.I've tried
import warnings; warnings.filterwarnings("ignore")
at my entry module, but it doesn't do anything for me.Is there any way to ignore
TrioDeprecationWarning
only?The text was updated successfully, but these errors were encountered: