Different versions installed with pip depending on python version
RobLOlson opened this issue · comments
py -3.10 -m pip install survey
installs survey==3.4.0
whereas
py -3.11 -m pip install survey
installs survey==4.3.0
Is this intended?
That's curious, it's not intended but I can understand why it may be happening.
The 4.*
release requires python 3.11
, whereas the 3.*
is happy with python 3.10
. I guess pip is trying to install the latest viable version, rather than the latest (and if the respective python version is not supported, fail with an error). I'm unsure on how to force the latter behavior from the package's end.
That's curious, it's not intended but I can understand why it may be happening.
The
4.*
release requires python3.11
, whereas the3.*
is happy with python3.10
. I guess pip is trying to install the latest viable version, rather than the latest (and if the respective python version is not supported, fail with an error). I'm unsure on how to force the latter behavior from the package's end.
Why it requires Python 3.11?
A few features from python 3.11 are used:
StrEnum
weakref_slot
fordataclasses.dataclass
typing.Unpack
That being said, most of these have workarounds to achieve 3.10 compatibility:
- Can be replaced with
(str, enum.Enum)
- Can be replaced with a simple class implementing
__weakref__
in__slots__
.
However, [3.] has no way of being handled in python 3.10. But, since it is only used in 2 instances - 1 of them being a private function and the other being the signature typehint for Visual.funnel_enter
(an internal mechanism) - They could be removed.
These changes are now part v4.4.0
, which is on pypi.