Skip to content

.unlock file non-exact duplicate lines #22

@msftcangoblowm

Description

@msftcangoblowm

From many potential causes, an .unlock may contain non-exact duplicate package lines.

#15 dealt with filtering out exact duplicate package lines.

Environment Versions

  • OS Type Void Linux

  • Python version: $ python -V 3.9.16

  • pip version: $ pip --version 24.3.1

  • pip-tools version: $ pip-compile --version 7.4.1

  • wreck version: $ python -m pip list | grep wreck 0.3.1

Steps to replicate

A new pins-*.in is created containing a nudge pin and most importantly
documenting the reason for it.

requirements/pins-validate-pyproject-pep639.in

# pep639 support added
validate-pyproject>=0.23

The constraints .in file is included, so as to constrain the allowed possible versions

requirements/dev.in

-c pins-validate-pyproject-pep639.in
validate-pyproject

Expected result

In dev.unlock expect only the nudge pin

validate-pyproject lines are not an exact duplicate. The constraints file nudge pin constrains the validate release versions. validate-pyproject line is incorrect and should be removed.

validate-pyproject>=0.23

Actual result

validate-pyproject
validate-pyproject>=0.23

Contains both lines. Remove the unconstrained line

Counter argument

package B -- the current package wants to loosen/remove a constraint
package A -- dependency package constrains the dependency version

In package B, do not want the constraint. It's not package B's constraint, it's package A's.

pip install can easily resolve this situation.

package B -- dev.unlock

validate-pyproject

Must check the constraint's origin.

  • In current package -- choose the constraint line

  • Not in current package -- remove the constraint line

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions