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

Handle NotImplementedError: unsupported platform case. #946

Open
tomchristie opened this issue Aug 27, 2024 · 0 comments
Open

Handle NotImplementedError: unsupported platform case. #946

tomchristie opened this issue Aug 27, 2024 · 0 comments

Comments

@tomchristie
Copy link
Member

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...
    except ImportError: # pragma: nocover
  • Ideally we ensure that we don't run import trio or import anyio unless we're actually running async.
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

1 participant