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

Override sub dependency with my own #436

Closed
3 tasks done
miracle2k opened this issue Sep 14, 2018 · 3 comments
Closed
3 tasks done

Override sub dependency with my own #436

miracle2k opened this issue Sep 14, 2018 · 3 comments

Comments

@miracle2k
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: MacOS
  • Poetry version: Poetry 0.11.5

Issue

My app is depending on the wsproto library. wsproto itself is depending on h11 >=0.7.0,<0.8.0.
It happens that h11 has a bug which I fixed; the h11 project has merged this but not yet published an update.

I'd like to therefore install the master branch of h11. I am doing this:

poetry add wsproto
poetry add --git https://github.com/miracle2k/h11.git h11

However, it seems that my "git overrride" is ignored:

$ poetry show
atomicwrites   1.2.1  Atomic file writes.
attrs          18.2.0 Classes Without Boilerplate
h11            0.7.0  A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
more-itertools 4.3.0  More routines for operating on iterables, beyond itertools
pluggy         0.7.1  plugin and hook calling mechanisms for python
py             1.6.0  library with cross-python path, ini-parsing, io, code, log facilities
pytest         3.8.0  pytest: simple powerful testing with Python
six            1.11.0 Python 2 and 3 compatibility utilities
wsproto        0.11.0 WebSockets state-machine based protocol implementation
$ poetry run  pip freeze
atomicwrites==1.2.1
attrs==18.2.0
h11==0.7.0
more-itertools==4.3.0
pluggy==0.7.1
py==1.6.0
pytest==3.8.0
six==1.11.0
wsproto==0.11.0

If I poetry remove wsproto, it installs the correct git dependency and shows as the version h11==0.8.1+dev.

At the very least, I would expect here to be conflict: if wsproto requires a version <0.8, but I require a specific git install with a version >0.8, this should be unresolvable.

Ideally, I'd like a way to to ignore the overlay restrictive wsproto version range and install the version I tell it to.

@techdragon
Copy link

techdragon commented Apr 23, 2019

This looks like the same issue as in #991 where poetry doesn't seem to have any idea what the version provided by a git repo is. The only workaround I've found so far (and it feels like a disappointing one to me) is to fork the package that depends on the git source. I've been forced to fork the problematic packages, add a pyproject.toml with the problematic relationship specified as <package_name> ="*" instead of the correct version specifier, and to use my fork as the source of the package.

@sdispater
Copy link
Member

Tracked in #991. Closing this issue.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants