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
Pin setuptools_scm
to <8
#1346
Pin setuptools_scm
to <8
#1346
Conversation
3a89c1d
to
e25f894
Compare
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.
Yup, type annotation in the version template were added in 8.0: https://github.com/pypa/setuptools_scm/blob/fee09f4cb57de4a50becc4eba0639bbb68d86725/CHANGELOG.md#v800
There are some breaking changes, and this is making it so that the `_version.py` file generated is not compatible with Python 2 anymore. I don't see an obvious or easy way to figure out what version of `setuptools_scm` is in use, so we'll just pin the version for now. I recommend removing `setuptools_scm` entirely in the future.
e25f894
to
ee6de9d
Compare
This actually breaks building the Arch Linux package, which was fine before. The issue there is we have python-3.11.7 which is fine, but also python-setuptools-scm-8.0.4, which is now arbitrarily blocked. I am not a Python ninja but I'm pretty sure there is a way to specify dependencies (including pinning) that are only relevant for specific versions of Python. I think that is needed in this case as you only want to force using an old setuptools if the Python version is old. For rolling-release environments like Arch Linux you definitely don't want to block using the current stable releases of things! |
I don't see why Arch Linux is respecting those pins at all. Package managers usually handle the build dependencies themselves, and if you're in a rolling release distro, how would it even make sense to pin this? |
We do manually provide the dependencies but using a PEP517 build system typically means it checks that what has been provided by the system packages meets the criteria. Pins like this that are not technically correct (much more aggressive than they actually need to be) mean we have to patch them out to build. |
This actually is correct, it is not more aggressive than it needs to be, since If you build from the release sdists you shouldn't need |
Have you considered finally dropping Python 2 support? We're starting to reach the point where adding this kind of pinning breaks things for more people than simply dropping Python 2 support. |
Ya, that makes sense... Type annotations are more valuable than py2 support, though. We should drop py2 support. |
Please stop suggesting that we drop Python 2 support. It isn't like it's something I haven't noticed would make the maintenance of this project easier. Even a cursory search of the open or closed issues would find the relevant information. |
And to be honest, the amount of bitrot I've experienced just trying to do literally the same thing that used to work (run tests) has made me way less enthusiastic about contributing to this by adopting the kinds of aggressive support policies that are the natural conclusion of dropping support for a package when it becomes mildly inconvenient. |
Please don't get worked up. It was just trying to be a helpful suggestion to reduce your work. Currently oldest Python that Python projects are expected to be able to support without having to fork dependencies is 3.8. |
That's not entirely correct. If you build a wheel from the sdist without setuptools_scm, you get the wrong version number:
Luckily, if you don't want to build for python2, you can ignore the pinning and use setuptools_scm 8 just fine. Also, if you need to create a backwards-compatible _version.py you can use |
It might be possible to use Python version identifiers in pyproject.toml for a better workaround |
Not really, because you create a pure py2.py3-none-any.whl which gets uploaded to PyPI and must work for all advertised pythons. |
There are some breaking changes, and this is making it so that the
_version.py
file generated is not compatible with Python 2 anymore. I don't see an obvious or easy way to figure out what version ofsetuptools_scm
is in use, so we'll just pin the version for now.I recommend removing
setuptools_scm
entirely in the future.Closes #1344