-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Design good distribution extras support #2397
Comments
I like the proposal, please go ahead |
Can we close it? |
Let's keep it for discussion and close upon final edits. It's a public API, we'll end up maintaining it as accepted, remember? |
Agree |
|
Perhaps my type speed is not enough for I'm starting to wonder if we need separate entry points for every feature. One point for installing everything is better maybe? If a user wants something specific -- he can learn from |
@webknjaz @asvetlov why not just
|
To avoid the naming problem we can add only |
I think it would be better to limit support of extras by two cases: all extras on and all extras off. Otherwise we'll be burried by exponential growing combinations of those which need to support. Is there a case when you need just some specific ones? |
👎 for |
PR: #3434 |
@asvetlov @kxepal @WouldYouKindly question: should we also all |
@webknjaz if you decide to do so, it would be nice to mention |
If we're going to make perfomance focused aiohttp installation, uvloop should be used and supported on code side as well. Not use that this is right decision since there could be different event loops, but I don't know any except uvloop and tokyo. |
Not sure if I understand the sentence |
I guess he means that aiohttp should automatically activate it if it's installed. Otherwise adding it as an extra will do nothing (except it'll just install it) |
@kxepal this comment explain why it's bad: #3434 (comment) |
Yeap, it turns complicated /: |
Follow-up #2312 (comment): this issue is intended to encourage discussion about adding extras support.
There's several optional dependencies mentioned in docs, and they instruct users to do
pip install {{dep_name}}
.Common practice is to add feature-flags allowing to depend on certain additional ability of the framework w/o having to install those dependencies manually.
For example, aiohttp could have
speedups
extra and then user's could've justpip install aiohttp[speedups]
instead ofpip install aiodns aiohttp cchardet
.Also, it is possible to use environment markers as extra names, in this case certain dependencies get installed automatically if the environment matches specific expression, which might be useful for windows-only crutches etc.
Please consider treating extras as a public API, because they are exposed to end-users.
/cc: @asvetlov
The text was updated successfully, but these errors were encountered: