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
I've stumbled upon an issue that causes reqwire to drop previously added dependencies to a requirement .in. Steps to reproduce:
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ reqwire init
created /Users/fmontag/test/requirements/src
created /Users/fmontag/test/requirements/lck
created /Users/fmontag/test/requirements/src/docs.in
created /Users/fmontag/test/requirements/src/main.in
created /Users/fmontag/test/requirements/src/qa.in
created /Users/fmontag/test/requirements/src/test.in
bash-3.2$ reqwire add sqlalchemy
Collecting sqlalchemy
Installing collected packages: sqlalchemy
Successfully installed sqlalchemy-1.1.5
saving requirement(s) to main
bash-3.2$ cat requirements/src/main.in
# -*- mode: requirementstxt -*-
# vim: set ft=requirements
# Generated by reqwire on Sun Feb 26 20:12:35 2017
--index-url https://pypi.python.org/simple
SQLAlchemy==1.1.5
Ok, at this point let's add another dependency to main.in:
bash-3.2$ reqwire add sqlalchemy-utils
Collecting sqlalchemy-utils
Requirement already satisfied: six in /Users/fmontag/venv/lib/python3.6/site-packages (from sqlalchemy-utils)
Requirement already satisfied: SQLAlchemy>=1.0 in /Users/fmontag/venv/lib/python3.6/site-packages (from sqlalchemy-utils)
Installing collected packages: sqlalchemy-utils
Successfully installed sqlalchemy-utils-0.32.12
saving requirement(s) to main
bash-3.2$ cat requirements/src/main.in
# -*- mode: requirementstxt -*-
# vim: set ft=requirements
# Generated by reqwire on Sun Feb 26 20:13:03 2017
--index-url https://pypi.python.org/simple
SQLAlchemy-Utils==0.32.12
The first one just vanishes, adding a second dependency drops the first. Maybe it is just because sqlalchemy-utils pulls in sqlalchemy as a dependency but both of them are top level dependencies for my project so I was expecting to have both of them pinned in main.in.
The text was updated successfully, but these errors were encountered:
This is expected behavior for now, as SQLAlchemy is a dependency of SQLAlchemy-Utils. I'm not totally convinced that top-level dependencies should be preserved by default, so for now I've made it configurable with the preserve_toplevel environment configuration.
It's a bit of a hack, as it intersects the initial requirements to the resolved requirements, which were resolved (with pip-tools) through the initial + specified requirements anyway. This results in the version of the common requirements being changed to the resolved version. In your example, SQLAlchemy's version changes to SQLAlchemy==1.1.5,>=1.0.
I think this option should be sufficient for now, let me know if it works for you or if you have any other concerns. (Released as 0.8 btw)
I got your point, preserving all top level dependencies even if they are not actually top level anymore (just like in this case), could lead to some conflicting behaviour, but I have no clear idea about this at the moment.
So for now thank you so much for the great support!
I've stumbled upon an issue that causes
reqwire
to drop previously added dependencies to a requirement.in
. Steps to reproduce:Ok, at this point let's add another dependency to
main.in
:The first one just vanishes, adding a second dependency drops the first. Maybe it is just because
sqlalchemy-utils
pulls insqlalchemy
as a dependency but both of them are top level dependencies for my project so I was expecting to have both of them pinned inmain.in
.The text was updated successfully, but these errors were encountered: