You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying that I'm not sure this is a bug, but this is most likely something I misunderstand about setuptools. I searched about it in the docs but couldn't find an answer to this.
I have a simple setup.py file containing my dependencies in install_requires. Let's say my package has 2 different dependencies: A and B. This means that, in my package, I use some code from A and I use some code from B. I don't put any specific versions for those 2 requirements inside install_requires, I only put their name. Now, let's say B actually also depends on A but up to a certain version, so in their own setup.py and ìnstall_requires, they will have something like: A<2.24.0. This works fine as long as A actually has no such version or above, but as soon as A releases the version 2.24.0 (and B doesn't/cannot update its setup.py`), then when installing our package using pip, we will use a version that is not allowed by B (thus B is broken). When installing with pip, we will actually see a warning like this one:
B has requirement A<2.24.0, but you'll have A 2.24.0 which is incompatible.
I was wondering if this was normal that setuptools wouldn't find the highest version of A allowed by the other dependencies (i.e. B), instead of directly installing the latest version of A? If yes, then what is the standard way of preventing this kind of problem?
Thanks in advance for the help, this would be very appreciated.
The text was updated successfully, but these errors were encountered:
Thank you for your answer. I went into the issues of pip repo and found questions/comments related to my observation here. From what I understood, this is the expected behavior of the current resolver, but there are discussions around it. See this thread which helped me understand this: pypa/pip#8339.
Hi,
Let me start by saying that I'm not sure this is a bug, but this is most likely something I misunderstand about
setuptools
. I searched about it in the docs but couldn't find an answer to this.I have a simple
setup.py
file containing my dependencies ininstall_requires
. Let's say my package has 2 different dependencies: A and B. This means that, in my package, I use some code from A and I use some code from B. I don't put any specific versions for those 2 requirements insideinstall_requires
, I only put their name. Now, let's say B actually also depends on A but up to a certain version, so in their ownsetup.py
and ìnstall_requires, they will have something like:
A<2.24.0. This works fine as long as A actually has no such version or above, but as soon as A releases the version 2.24.0 (and B doesn't/cannot update its
setup.py`), then when installing our package using pip, we will use a version that is not allowed by B (thus B is broken). When installing with pip, we will actually see a warning like this one:B has requirement A<2.24.0, but you'll have A 2.24.0 which is incompatible.
I was wondering if this was normal that
setuptools
wouldn't find the highest version of A allowed by the other dependencies (i.e. B), instead of directly installing the latest version of A? If yes, then what is the standard way of preventing this kind of problem?Thanks in advance for the help, this would be very appreciated.
The text was updated successfully, but these errors were encountered: