Handle `NotImplementedError: unsupported platform` case.
tomchristie opened this issue · 0 comments
tomchristie commented
If these three things occur...
- The user is using httpcore either with standard sync, or with
asyncio
. - The
trio
package happens to be installed. - We are running on a platform that's unsupported by Trio.
Then there's a case where an import of trio
can occur and trigger a NotImplementedError: unsupported platform
exception. (python-trio/trio#3013)
I'd suggest:
- We start with a nice simple fix, and catch the case here...
httpcore/httpcore/_synchronization.py
Line 12 in ba3f942
- Ideally we ensure that we don't run
import trio
orimport anyio
unless we're actually running async.