-
-
Notifications
You must be signed in to change notification settings - Fork 639
feat(toolchain): drop 3.8 and print info level messages about it #3387
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
64f91a7
9b4a71a
f14bea6
37a9b85
27de730
f07c7db
c07bfea
1d8efe1
2fabab1
c0d1d65
a8ed451
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,12 +14,13 @@ | |
|
|
||
| """A small helper to ensure that we are working with full versions.""" | ||
|
|
||
| def full_version(*, version, minor_mapping): | ||
| def full_version(*, version, minor_mapping, err = True): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is If not, I'd recommend Or even better, invert the logic to elif ignore_err:
return None |
||
| """Return a full version. | ||
|
|
||
| Args: | ||
| version: {type}`str` the version in `X.Y` or `X.Y.Z` format. | ||
| minor_mapping: {type}`dict[str, str]` mapping between `X.Y` to `X.Y.Z` format. | ||
| err: {type}`bool` whether to fail on error or return `None` instead. | ||
|
|
||
| Returns: | ||
| a full version given the version string. If the string is already a | ||
|
|
@@ -31,6 +32,8 @@ def full_version(*, version, minor_mapping): | |
| parts = version.split(".") | ||
| if len(parts) == 3: | ||
| return version | ||
| elif not err: | ||
aignas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return None | ||
| elif len(parts) == 2: | ||
| fail( | ||
| "Unknown Python version '{}', available values are: {}".format( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need targets that are for other Python versions, but maybe instead of this hack to make the versions incompatible, we colud do it differently:
That way we'll get the right behaviour. Another option would be to leave
minor_mapping[3.8] = None. That way we might get the right behaviour as well.