You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foosel opened this issue
Nov 14, 2022
· 3 comments
Labels
approvedIssue has been approved by the bot or manually for further processingdoneDone but not yet releasedtaskA OctoPrint related task that needs to be taken care of as part of a milestone
OctoPrint currently uses an ancient & heavily adjusted versioneer build that is bundled.
That version of versioneer only supports setuptools, which long term will cause problems in switching OctoPrint to pyproject.toml (at some point setup.py will either go away or at the very least become increasingly more difficult to cater to, pyproject.toml based build configurations are what pip is currently pushing towards).
The solution
There are three options I currently see:
Update versioneer to the latest release, which supports pyproject.toml as well as setup.py. However, our customization with .versioneer-lookup that basically creates virtual tags to use for version generation based on the currently checked-out branch is not available in that. That would have to be ported if we want to keep our current branching scheme.
Update versioneer and switch to the use of release branches instead of .versioneer-lookup. We would no longer have maintenance and devel but rather something like 1.9.0 and 2.0.0 as development branches for the respective version. It might even make sense to stop supporting installing stable OctoPrint directly from master and instead use that as bugfix prep branch for the latest tag.
Like 2, but switching to PyPA's own setuptools_scm.
To add to this issue - OctoPrint almost works under Python 3.12, but versioneer uses SafeConfigParser which has been deprecated for a while & removed in 3.12. (At least that's going off the top of my head).
It's easily fixable, but it means that the pip install process is no longer Python 2 compatible so you don't get the nice error message. Some more advanced error handling could probably make it work, I remember having a poke before. At some point we will have to jump ship there I guess, it is widely known that OctoPrint isn't Py2 compatible anymore but there are still some people running older versions that it would be nice to not have them start saying updating/installing is broken.
Instead of customizing an existing tool that does a lot of stuff
that we don't need but lacks what we DO need (branch based virtual
tags), now there's a custom single file implementation that mixes
concepts from versioneer, miniver and the lookup that so far was
implemented in OctoPrint's custom build of versioneer, and does so
with less overhead.
Closes#4685
In the end I decided to replace it with a small tool. Enter _version.py now living in the source tree, heavily influenced by miniver but adjusted to allow the use of virtual tags. It should result in pretty much the same versioning behaviour as versioneer so far did, but of course I might have overlooked some corner cases. We'll see.
approvedIssue has been approved by the bot or manually for further processingdoneDone but not yet releasedtaskA OctoPrint related task that needs to be taken care of as part of a milestone
The problem
OctoPrint currently uses an ancient & heavily adjusted versioneer build that is bundled.
That version of versioneer only supports setuptools, which long term will cause problems in switching OctoPrint to
pyproject.toml
(at some pointsetup.py
will either go away or at the very least become increasingly more difficult to cater to,pyproject.toml
based build configurations are what pip is currently pushing towards).The solution
There are three options I currently see:
Update versioneer to the latest release, which supports
pyproject.toml
as well assetup.py
. However, our customization with.versioneer-lookup
that basically creates virtual tags to use for version generation based on the currently checked-out branch is not available in that. That would have to be ported if we want to keep our current branching scheme.Update versioneer and switch to the use of release branches instead of
.versioneer-lookup
. We would no longer havemaintenance
anddevel
but rather something like1.9.0
and2.0.0
as development branches for the respective version. It might even make sense to stop supporting installing stable OctoPrint directly frommaster
and instead use that as bugfix prep branch for the latest tag.Like 2, but switching to PyPA's own
setuptools_scm
.For reference:
I'm honestly currently not sure which of the options I prefer.
The text was updated successfully, but these errors were encountered: