-
Notifications
You must be signed in to change notification settings - Fork 27
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
Too-strict version check causes problems for wheels #16
Comments
I agree that it's a problem, but I don't see any easy solution:
I suggest a third approach which might be worth investigating: what about modifying the output wheel after it has been generated, and "fix" the required capnpy version there? |
Do you mean e.g. in |
oh sorry, I didn't understand the actual problem at first. Indeed, if |
There is a beta of a new dependency resolver in pip 20.2 -- perhaps you could see whether that helps? |
pip 20.3 has the new dependency resolver on by default; please see the documentation on how to test and migrate in case it helps you address this problem. |
A typical use case for
capnpy
is the following chains of requirements (lib
,app
are Python packages):i.e.
lib
contains a.capnproto
schema (and so hascapnpy
as a compile-time requirement) andapp
makes use of the compiled schema provided bylib
(and so has bothcapnpy
andlib
as run-time requirements).Schema compilation can be slow, so it is desirable to publish a wheel for
lib
. If so, then compile-time != run-time in general, and the versions ofcapnpy
used bylib
andapp
may be different, bututil.check_version
insists that these versions be identical. This means that new releases ofcapnpy
will break the existing wheel(s) forlib
, and require a new versions to be built and published with the latestcapnpy
.Pinning the
capnpy
version inlib
unfortunately is not a solution, aspip
is too dumb to notice the conflict; it first installs the unconstrained version requested byapp
, and later happily reports "Requirement already satisfied" when being asked to install the pinned version required bylib
. A possible workaround would be to omitcapnpy
from the requirements ofapp
altogether, and rely on thelib
requirement to bring in the pinned version, but this seems like bad practice.Possible solutions I can see:
Provide compatibility (between minor releases), such that
app
andlib
can both specifycapnpy<N+1.0.0
. This really just reduces the frequency of breakages, but may be good enough.Bundle the "incompatible" parts of the
capnpy
run-time library into wheels at compile-time. I have no idea how hard this would be!The text was updated successfully, but these errors were encountered: