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

Mention optional niquests dependencies on the "Installation of Niquests" page #217

Open
andrei-korshikov opened this issue Feb 19, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@andrei-korshikov
Copy link

Current state:

$ python -m pip install niquests section does not mention optional dependencies and does not contain a link to PyPI.

Proposed changes:

(a) add a link to PyPI e.g. in form:

"To install Niquests from PyPI, simply run this simple command in your terminal of choice:"

(b) add list of optional dependencies with links to appropriate documentation pages, e.g.:

"Optional dependencies:

http3 or ocspHTTP/3 over QUIC, OCSP or Certificate Revocation, 3.1.3 (2023-10-19) [See Note below!]
socksSOCKS
speedupsSpeedups
wsWebSockets"

Note: http3 and ocsp dependencies are a bit confusing. To my understanding, their roots are in 3.1.3 (2023-10-19). At this moment they both require the same urllib3.future[qh3], and qh3 in turn is a dependency of urllib3.future itself, so it is installed automatically with niquests.

To avoid confusion, I think it should be clearly documented under what circumstances http3/ocsp might be needed to mention explicitly. Maybe it's a time to just remove them?


(c) Related:

List all speedups explicitly in the Speedups section, e.g.:

"To enable following optimizations

install Niquests with:"


Off-topic:) And, of course, thank you for your work!

@Ousret
Copy link
Member

Ousret commented Feb 20, 2025

Fair enough, yes, I agree we lack some documentation on optional dependencies.

I'll add a dedicated section for it. Incl bellow clarification.

Now, the main concern you raised is about "qh3".

That dependency is BOTH required AND optional.
There's a lot of markers in the requirement definition to prevent someone to accidentally try compile the source.
qh3 is not pure Python and ship a ton of prebuilt wheels, but unfortunately it is impossible to ship every possible combination of system/architecture.

this is why doing pip install niquests on a riscv linux distro will NOT bring qh3. but will for arm64, i686 or x86_64.

the optional dependency groups "ocsp" and "http3" is there to force its installation, but you will need appropriate tools present first.

I hope this help
Regards,

@Ousret Ousret added the documentation Improvements or additions to documentation label Feb 20, 2025
@andrei-korshikov
Copy link
Author

qh3 is BOTH required AND optional.
There's a lot of markers in the requirement definition to prevent someone to accidentally try compile the source.

the optional dependency groups ocsp and http3 is there to force its installation, but you will need appropriate tools present first.

I hope this help

Yes! Now I understand the magic behigh using qh3 in dependencies and optional-dependencies simultaneously. Thanks for your explanations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants