Skip to content

馃摑 Add sniffio dependency to project requirements - #421

Merged
tiangolo merged 1 commit into
fastapi:mainfrom
jujumilk3:main
Dec 1, 2025
Merged

tiangolo merged 1 commit into
fastapi:mainfrom
jujumilk3:main

Conversation

@jujumilk3

@jujumilk3 jujumilk3 commented Nov 29, 2025 •

Copy link
Copy Markdown
Contributor

It fails to import with anyio>=4.12.0 due to missing sniffio dependency.

  • asyncer/_main.py directly imports sniffio (line 27)
  • Previously, sniffio was installed as a transitive dependency of anyio
  • As of anyio 4.12.0 (released 2025-11-28), sniffio was dropped as a dependency
    (https://anyio.readthedocs.io/en/stable/versionhistory.html)
  • Since sniffio is not listed in asyncer's pyproject.toml, it is no longer installed

The most critical issue is that many projects depending on asyncer (without pinning anyio<4.12 or sniffio) are broken. You can easily verify this by pip install asyncer and import asyncer.

@github-actions

Copy link
Copy Markdown
Contributor

馃摑 Docs preview

Last commit 1876898 at: https://1e7c617c.asyncer.pages.dev

@owenlamont

owenlamont commented Nov 29, 2025 •

Copy link
Copy Markdown

I just ran into this too, it'd also be good to set up some lint tooling to confirm all referenced dependencies are added as explicit first order dependencies.

Maybe too much scope creep but adding https://github.com/fpgmaas/deptry as a pre-commit lint to check it flags this as a problem then fix it would be good for preventing this sort of issue reoccurring.

@jujumilk3

Copy link
Copy Markdown
Contributor Author

@svlandeg Sorry to tag you but you guys' package is broken. Could you please check it?

@tiangolo tiangolo added the bug Something isn't working label Dec 1, 2025

@tiangolo tiangolo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 馃檶

This will be available in Asyncer 0.0.11 released in the next hours. 馃殌

@tiangolo
tiangolo merged commit 51dbde5 into fastapi:main Dec 1, 2025
31 of 32 checks passed
@aaronsteers

aaronsteers commented Dec 1, 2025 •

Copy link
Copy Markdown

Thanks, @tiangolo and @jujumilk3 and team for the fast work on this. 馃殌

I have had very good experiences with deptry and I use it in all my projects now. I can probably create a PR to your repo if helpful. Tag me if so and I'll send you something from a personal fork.

davidpoblador added a commit to alltuner/vibetuner that referenced this pull request Dec 2, 2025
asyncer now declares sniffio as a dependency (fastapi/asyncer#421),
so we no longer need to pin it directly.

馃 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
davidpoblador added a commit to alltuner/vibetuner that referenced this pull request Dec 2, 2025
## Summary

- Remove direct `sniffio>=1.3.1` dependency from vibetuner-py
- asyncer now declares sniffio as a dependency (fastapi/asyncer#421
merged Dec 1, 2025)
- sniffio remains available transitively through asyncer

## Test plan

- [x] `uv sync` completes successfully
- [x] Lock files updated correctly

馃 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants