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. (https://github.com/python-trio/trio/issues/3013) I'd suggest: * We start with a nice simple fix, and catch the case here... https://github.com/encode/httpcore/blob/ba3f94268e9843b1f60bd4699c15b05a9af7a929/httpcore/_synchronization.py#L12 * Ideally we ensure that we don't run `import trio` or `import anyio` unless we're actually running async.
Activity
Handle import of `trio` raising `NotImplementedError` on unsupported …
Handle `trio` raising `NotImplementedError` on unsupported platforms. (…