Audit and update requirements for Python tools. (cherrypick #18431)#18460
Merged
benjyw merged 1 commit intopantsbuild:2.16.xfrom Mar 10, 2023
Merged
Audit and update requirements for Python tools. (cherrypick #18431)#18460benjyw merged 1 commit intopantsbuild:2.16.xfrom
benjyw merged 1 commit intopantsbuild:2.16.xfrom
Conversation
kaos
approved these changes
Mar 9, 2023
Specifically, it added a `requirements` option for each tool that is expected to contain very loose requirements that we expect Pants to support. We initialized the default value for that option from the existing `version` and`extra_requirements` fields. However those were often overly-constrained, sometimes to a single version. This PR audits all the tools' defaults and in various cases does one or both of: 1. Update `default_version` to a newer version so we can regen more up-to-date lockfiles. 2. Explicitly set `default_requirements` to something loose but likely compatible. Of course it's hard to know which currently available tool versions Pants is compatible with, unless we test against them. And it's impossible to know which future versions Pants will remain compatible with. So we assume that tools are semver-adherent, so that floating up in the same major version is safe. Updating to newer versions lets us at least start to test against some newer versions, and is also overdue, since many of our default tool versions are quite old. The proof that these upgrades are compatible is in the passing tests. At some point soon we will `deprecate` `version` and `extra_requirements` in favor of using user lockfiles for custom tool versions.
7ce8f68 to
e5ddea3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Specifically, it added a
requirementsoption for each tool that isexpected to contain very loose requirements that we expect
Pants to support.
We initialized the default value for that option from the existing
versionandextra_requirementsfields. However those were oftenoverly-constrained, sometimes to a single version.
This PR audits all the tools' defaults and in various cases does one or
both of:
default_versionto a newer version so we can regen moreup-to-date lockfiles.
default_requirementsto something loose but likelycompatible.
Of course it's hard to know which currently available tool versions
Pants is compatible with, unless we test against them. And it's impossible
to know which future versions Pants will remain compatible with.
So we assume that tools are semver-adherent, so that floating up in the
same major version is safe. Updating to newer versions lets us at least start
to test against some newer versions, and is also overdue, since many of
our default tool versions are quite old. The proof that these upgrades
are compatible is in the passing tests.
At some point soon we will
deprecateversionandextra_requirementsin favor of using user lockfiles for custom tool versions.