amoffat / sh

Python process launching

Home Page:https://sh.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requires 3.8.1 specifically, instead of just 3.8

fre-sch opened this issue · comments

Why does sh require 3.8.1 specifically (instead of 3.8)?

In the company I work for, we have a package providing developer and ci/cd tooling. I've been wanting to improve and simplify our tooling by using sh. Most of the 30 total packages we use target "^3.8". This means I'll have to upgrade and release 30 Python packages from "^3.8" to "^3.8.1". That's a decent amount of noise and having some reason why this is required would be very helpful.

Where do you see that requirement?

python = ">=3.8.1,<4.0"
just specifies >=3.8.1

I'm sorry I didn't phrase this more sensibly:

Why is the minimum required version 3.8.1 instead of 3.8.0?

commented

I looked through the issues and found this #659 (comment). We should consider dropping flake8 as a dev dependency though if this version constraint is causing more people problems.

I'm not even sure why poetry interprets the versions like this. It seems like an overly strict interpretation that is only "technically correct" but not really useful.

They state this semantic equivalence in their documentation:

^1.2 >=1.2.0,<2.0.0

They also state PEP 440 in their FAQ and PEP440 has no ^ it uses ~= instead, which has the same semantics.

Technically python = "^3.8" does not match the range of python = ">=3.8.1,<4.0" since it excludes 3.8.0, but I think it could be argued to be a compatible release.

Reading the changelog for 3.8.1 does seem to indicate a bugfix release. I don't see anything there that could absolutely necessitate requiring this particular release.

We should consider dropping flake8 as a dev dependency though if this version constraint is causing more people problems.

So it seems flake8 requires 3.8.1 due to fixes to importlib.metadata, but this comment no longer exists in the current version.

I'm not sure what to make of this, it appears to be a reasonable requirement then, and since the company environment doesn't use 3.8.0 specifically, maybe that's good enough of a reason to provide better version specifications in 30 packages.

Alright, closing. Feel free to reopen if other complications pop up.

As a side note, you don't have to update your other packages to something other than "^3.8". It's just that if you happen to have a Python 3.8.0 virtualenv, you won't be able to install sh >= 2.0 along with your own packages. If you have any other Python 3.8 patch version, then you can install both sh and your own packages.