Skip to content

Handle NotImplementedError: unsupported platform case. #946

Description

@lovelydinosaur

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions