rbanffy / pip-chill

A more relaxed `pip freeze`
Other
555 stars 25 forks source link

Version ranges enhancement #68

Closed Wyrmwood closed 1 year ago

Wyrmwood commented 1 year ago

Environment

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.

github-actions[bot] commented 1 year ago

Stale issue message