Skip to content
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

Fix spelling of Python 3.5-specific requirements #591

Merged
merged 5 commits into from
Jan 10, 2023

Conversation

cjwatson
Copy link
Contributor

@cjwatson cjwatson commented Jan 6, 2023

According to PEP 440, ~="3.5" is equivalent to >="3.5", =="3.*" - that is, any 3.x version from 3.5 on. I don't think that's what was intended in most of these cases, and the effect is that resolvers on recent versions of Python end up pinning to the versions that work on 3.5, which is pretty excessive.

In most of these cases, ~="3.5.0" is a better spelling, restricting these pins to Python 3.5.x. The exceptions seem to be aiocontextvars and contextvars, which were needed in Python 3.5 and 3.6, but aren't needed as of 3.7 since contextvars is in the standard library there; I think >="3.5" plus <"3.7" and similar makes more sense for those cases. (Comments in talisker.context indicate that aiocontextvars specifically requires at least 3.5.3.)

According to PEP 440, `~="3.5"` is equivalent to `>="3.5", =="3.*"` -
that is, any 3.x version from 3.5 on.  I don't think that's what was
intended in most of these cases, and the effect is that resolvers on
recent versions of Python end up pinning to the versions that work on
3.5, which is pretty excessive.

In most of these cases, `~="3.5.0"` is a better spelling, restricting
these pins to Python 3.5.x.  The exceptions seem to be `aiocontextvars`
and `contextvars`, which were needed in Python 3.5 and 3.6, but aren't
needed as of 3.7 since `contextvars` is in the standard library there; I
think `>="3.5"` plus `<"3.7"` and similar makes more sense for those
cases.  (Comments in `talisker.context` indicate that `aiocontextvars`
specifically requires at least 3.5.3.)
tox 4 drops Python 3.6 support, which is inconvenient.
Copy link

@tartley tartley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Contributor

@verterok verterok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Contributor

@maxiberta maxiberta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cjwatson cjwatson merged commit f13b91e into canonical-ols:master Jan 10, 2023
@cjwatson cjwatson deleted the fix-py35-requirements branch January 10, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants