-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Including companion dependency only for specific versions of another dependency #8813
Comments
duplicate #8499, both seem unlikely ever to happen |
It does work with transitive dependencies though, I assume. If I depend on library A version 1 or 2, where version 1 has different dependencies than 2, depending on the version (perhaps based on python version), either the set of 1 or the set of 2 would get installed. Maybe I can create a workaround where I release 2 versions of a private (empty) package: one with |
If I understand correctly this example should resolve because the intersection of the markers of pystark-stubs and pyspark ~ 3.3 is empty. However, this example might be a duplicate of #5506.
You may run into the same solver issue or it may work. I'd like to hear whether this changes anything. 🙂 |
Feature Request
I have an optional dev dependency (a companion package containing stubs), which I only want to include for certain versions of a main dependency.
For example, when using
pyspark~=3.0
, I want to use thepyspark-stubs~=3.0
. However, when usingpyspark~=3.3.
, I don't want to (as that package already includes the stubs).My attempt:
Which fails to resolve, as
pyspark-stubs
depends onpyspark ~3.0
, and the project depends on bothpyspark ~3.0
andpyspark ~3.3
.The problem in this case is of course that for pyspark 3.3, there's no compatible pyspark-stubs specified. But in this case, I want the resolution to not use any
pyspark-stubs
. I tried to enforce this by using the same restriction onpython
, but that didn't work.How can I specify such a companion dependency (like stubs) only for specific versions of my main dependency? Or is there a way to group them together in another way?
The text was updated successfully, but these errors were encountered: