Closed pquentin closed 1 month ago
Fix was released in https://github.com/python-trio/trio/releases/tag/v0.26.1
As mentioned by @hynek in https://github.com/python-trio/trio/pull/3054#issuecomment-2268379142, there's at least one missing instance of this problem. I'm now seeing this:
ImportError while loading conftest '/Users/runner/work/urllib3/urllib3/test/conftest.py'.
test/conftest.py:14: in <module>
from dummyserver.app import hypercorn_app
dummyserver/app.py:14: in <module>
import trio
.nox/test-3-8/lib/python3.8/site-packages/trio/__init__.py:26: in <module>
from . import abc, from_thread, lowlevel, socket, to_thread
.nox/test-3-8/lib/python3.8/site-packages/trio/from_thread.py:6: in <module>
from ._threads import (
.nox/test-3-8/lib/python3.8/site-packages/trio/_threads.py:143: in <module>
class ThreadPlaceholder:
.nox/test-3-8/lib/python3.8/site-packages/attr/_next_gen.py:402: in wrap
return do_it(cls, True)
.nox/test-3-8/lib/python3.8/site-packages/attr/_next_gen.py:348: in do_it
return attrs(
.nox/test-3-8/lib/python3.8/site-packages/attr/_make.py:1291: in attrs
warnings.warn(
E DeprecationWarning: The `hash` argument is deprecated in favor of `unsafe_hash` and will be removed in or after August 2025.
I'm surprised our CI passed...
OK I'm pretty sure this is because when pytest uses a plugin (which we use) it isn't looking for warnings. And then the warning doesn't happen again next time we import.
This happens to break urllib3's CI which, like trio, fails on warnings.