rbanffy/pip-chill

Version ranges enhancement

Wyrmwood opened this issue · 1 comments

Environment

  • PIP Chill version: 1.0.1
  • Python version: 3.8.16
  • Operating System: Ventura

Description

pip-chill outputs
pip-chill==1.0.1
for example.

Today, I'm then reading the file in and using python to munge the versions into
pip-chill>=1.01,<2
that way I pin the MAJOR (API stays compatible) but get new features and bug fixes (provided the package is property adhering to semver)

What I Did

Something like

                    name, version = re.findall(r"(.*)==(\d.*)", pin)[0]
                    major = version.split(".")[0]
                    package = f"{name}>={version},<{int(major) + 1}"

Just be cool if this was an option in the tool instead of post processing.

Stale issue message