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

Use open-ended versions so that downstream projects can pin exact versions #45

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

alastair
Copy link
Collaborator

@alastair alastair commented Dec 1, 2020

The new dependency resolver in pip 20.3 fails where previously it just gave a warning. We are seeing the following error in ListenBrainz:

ERROR: Cannot install -r requirements.txt (line 24) and redis==3.5.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested redis==3.5.3
    brainzutils 1.14.1 depends on redis==2.10.5

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

Because BU is a dependency of other brainzes, it makes sense to make its dependencies flexible so that other projects can pin an exact version.

If this PR works, I will release it as BU 1.16

@alastair
Copy link
Collaborator Author

alastair commented Feb 4, 2021

here's one thing that I'm unsure about:

We have dependencies in BU for things like flask, jinja and werkzeug. As a result of this, I got into the habit of removing them from requirements.txt in downstream projects (e.g. LB). However, a result of this is that dependabot won't give warnings about (last I checked it didn't do transitive dependencies).

Also, because we now have a range here, building LB twice could result in different versions of packages being installed if we don't pin them in LB's requirements.txt.

Any thoughts on how we should do this? I'm tending towards using these ranges in BU, and then adding back in specific versions to LB.

@alastair
Copy link
Collaborator Author

We decided to do what I suggested, and explicitly add dependencies in downstream software (see related PRs)

@alastair alastair merged commit 52f7d6a into master Feb 10, 2021
@alastair alastair deleted the version-ranges branch February 10, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant