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
Optional dependency issues #963
Comments
sniffio is a non-optional dependency of trio, and httpcore is a non-optional dependency of httpx, so we don't need to list them as extras. We list h2 as part of the 'doh' extra because h2 is an optional dependency of httpx, but we always want it. Httpcore is in tool.poetry.dependencies as we need at least that version to work due to API changes. I don't think we actually need sniffio in there as I doubt we care about the version at this point. I think it is save to remove the |
Thanks. The problem is the way the Poetry generates the dist-info with this input (I've manually removed the obsolete Python version requirements for clarity):
The generated dist-info metadata shows them as required, there's no indication that they are optional. Sniffio 1.1 has been out for a long time now, so perhaps it could be deleted. Would you be up for adding httpcore to extras doh as a workaround for Poetry not correctly dealing with optional dependencies not connected to an extra? |
Ah, I didn't realize that! I agree with your suggestion, let's add httpcore to doh, and remove sniffio. I figured it would be easier if I just did it rather than doing a PR, so I just did it. Thanks for the clear description! |
Excellent. Thanks. |
I'm submitting this as an issue instead of a PR, because I'm not 100% certain on the resolution. The current pyproject.toml includes:
Is it really necessary to specify a python interpreter version with these that's the same as the minimum required python version? It seems to me that the , python=">=3.8" could be removed. I noticed because Debian's Python dependency generation doesn't handle this well (it's a bug, which I've filed in Debian), but it seems to me it could be cleaned up.
Also, it seems like the optional dependencies ought to be related to one of the extras:
This is currently true with the exception of httpcore and sniffio. I think httpcore should be added to doh and sniffio should be in a new extra, maybe called async?
Scott K
The text was updated successfully, but these errors were encountered: