TotalSegmentator
TotalSegmentator copied to clipboard
Hard pin on requests in PyPi release for python 3.10
Currently, the release of TotalSegmentator has a hard pin on requests in the version available on PyPi (2.0.5). However, in the setup.py
, there is some logic to only set this hard pin when installing with python 3.9. The current release is problematic for us using TotalSegmentator when we are trying to install with python3.10 but are hit with the hard pin on requests
that is incompatible with our requirements universe.
Would it be possible to release separate wheels for the package for python versions 3.9 & 3.10, with 3.10 having no hard pin on requests?
Thank you in advance!
The latest release (v2.0.5) should contain the logic in setup.py which uses a fixed requests
only for python <= 3.9. So I do not really understand why your v2.0.5 does not contain this.
The setup.py logic is only run when installing the source distribution. But there is also a built distribution available (see here), and pip favors the built distribution over source distribution. When looking at the metadata for the built distribution, you can see the hard pin there:
wget https://files.pythonhosted.org/packages/e0/44/c99e5b42c7b567f66692cd0af3ae7cb5b8ddac9d7946853b1fa433a705a3/TotalSegmentator-2.0.5-py3-none-any.whl
unzip TotalSegmentator-2.0.5-py3-none-any.whl -d dist
cat dist/TotalSegmentator-2.0.5.dist-info/METADATA
My guess is that the built distribution was generated from a python3.9 process
That is correct: I uploaded the pip packages from python 3.9. Do you know how to create built distributions for each python version?
After digging in some more it looks like there is no need for multiple built distributions, but we can instead make use of inline python constraints for the install_requires
parameter as described here. See my PR for a proposal!
Great. Thanks for the PR. I just merged it.
Thanks for the merge! Are you planning to release a new version to pypi soon?
I am planning a new release soon.