Skip to content

Add missing AnyIO import - #1107

Open
EmmanuelNiyonshuti wants to merge 1 commit into
encode:masterfrom
EmmanuelNiyonshuti:fix-anyio-imports
Open

Add missing AnyIO import#1107
EmmanuelNiyonshuti wants to merge 1 commit into
encode:masterfrom
EmmanuelNiyonshuti:fix-anyio-imports

Conversation

@EmmanuelNiyonshuti

Copy link
Copy Markdown

Summary

httpcore/_backends/anyio improperly uses the anyio.abc module without importing it. With AnyIO 4.15.0's lazy re-exports, much fewer modules are imported as a side-effect which then exposed this problem.

This PR add missing AnyIO import used in httpcore/_backends/anyio.
Ref: agronholm/anyio#1308

Checklist

  • [] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [] I've updated the documentation accordingly.

@EmmanuelNiyonshuti

EmmanuelNiyonshuti commented Sep 3, 2026

Copy link
Copy Markdown
Author

I am not sure the ci failure is related to this PR.

@agronholm

Copy link
Copy Markdown
Contributor

This PR is not likely to be ever merged, as httpcore is no longer used by any maintained downstream project.

@lovelydinosaur

Copy link
Copy Markdown
Member

This particular issues looks like it’ll merit a new httpx release. Presumably that changed has broken a large number of async installs.

@agronholm

Copy link
Copy Markdown
Contributor

I do have a workaround PR almost ready.

@EmmanuelNiyonshuti

Copy link
Copy Markdown
Author

AnyIO 4.15.1 includes a workaround for this. It's resolved regardless of whether this PR get merged. I'll go ahead and close this.

@agronholm

Copy link
Copy Markdown
Contributor

It's a trivial change and improves correctness so I'd vote for it being merged anyway.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants