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
I think Semantic Versioning (semver.org) is not just a superior versioning scheme, but also the gold standard in the open source community:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backward compatible manner
PATCH version when you make backward compatible bug fixes
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Discussion
I'm proposing a change to Semantic Versioning 2.0.0, not for the upcoming 1.9.5 release but for 2.0.0, where we would also (likely) drop python2 support.
What do you think? Is it a good idea to switch or not? Would there be any harm in changing the versioning scheme?
Another thing that's worth specifying is how to call development versions. I think it's unacceptable that the most up-to-date version on the master branch (as of writing) is ranger-master v1.9.3-979-gd45f14c0 (see output of ranger --version) while the 2-year-old bugfix release is ranger 1.9.4.
As you see, the newer version with more features and more bugfixes has a lower version number than the older one. I find this confusing and IMO this should never happen.
Instead, I would always set the version number of the master branch to the highest version that has been released.
In another project, I add a "-dev" suffix for non-release versions. We could benefit from this too. Currently we use git describe to generate the v1.9.3-979-gd45f14c0 but if git is not installed, it falls back to v1.9.3 which is confusing in multiple ways IMO:
ranger's version is reported differently depending on whether git is installed?!
multiple ranger versions can report v1.9.3 as a version?! there should only be one.
Yes, the non-release versions would say ranger-master v1.9.3 instead of ranger v1.9.3, but IMO the differentiation should be unambiguously visible in the version number, not the word that happens to be standing before it.
Having participated in various discussions on the semver repository, I just want to mention that strictly following SemVer for software with a user interface is almost never going to be a perfect fit and you will have to make some compromises as to what defines a breaking change. For example, some people might consider the removal or replacement of a certain configuration option breaking because it requires manual migration effort. The way I see it, SemVer is best suited for libraries with a strongly define public interface like an API, but that does not mean it is impossible to use for other software – you'll just have to wing it sometimes.
(The other thing you need to consider is to plan breaking changes well ahead of time and group them together to reduce the number of migrations end users have to make in favor of doing larger changes in one big release while at the same time not holding back changes for too long. This is always a tough decision but I believe it will be worthwhile. And it's identical with any other software that uses SemVer, so it's no different for tools with user interfaces.)
When a version is released with a higher version number than the master branch, update the version number in the master branch to that
Strong +1 to this. This also got me and my package manager confused.
Add a suffix like "-dev" or "-beta" to the version number of the master branch
Since ranger is written in Python, you may want to consider following PEP-440.
In some internal tooling, I made CI builds output a version like 1.2.3.post1.dev<pipeline-id> for versions that were built on the base of a previously released 1.2.3. That way I would not need to decide on a whim whether the next version will be 1.3.0 or 1.2.4 (or 2.0.0). However, going with 1.3.0.dev<some-incremental-number> as a default is also fine if you are considering using a dedicated hotfix release branch to backport fixes for 1.2.x.
Remove the soft git dependency in version reporting of master branch versions
I personally do not want to deal with dynamic version generation outside of a VCS, so I cannot give any input to this other than "I wouldn't".
Activity
hut commentedon Aug 7, 2026
Another thing that's worth specifying is how to call development versions. I think it's unacceptable that the most up-to-date version on the master branch (as of writing) is
ranger-master v1.9.3-979-gd45f14c0(see output ofranger --version) while the 2-year-old bugfix release isranger 1.9.4.As you see, the newer version with more features and more bugfixes has a lower version number than the older one. I find this confusing and IMO this should never happen.
Instead, I would always set the version number of the master branch to the highest version that has been released.
In another project, I add a "-dev" suffix for non-release versions. We could benefit from this too. Currently we use
git describeto generate thev1.9.3-979-gd45f14c0but ifgitis not installed, it falls back tov1.9.3which is confusing in multiple ways IMO:v1.9.3as a version?! there should only be one.ranger-master v1.9.3instead ofranger v1.9.3, but IMO the differentiation should be unambiguously visible in the version number, not the word that happens to be standing before it.For reference:
ranger/ranger/__init__.py
Lines 17 to 44 in d45f14c
TL;DR:
FichteFoll commentedon Aug 7, 2026
Having participated in various discussions on the semver repository, I just want to mention that strictly following SemVer for software with a user interface is almost never going to be a perfect fit and you will have to make some compromises as to what defines a breaking change. For example, some people might consider the removal or replacement of a certain configuration option breaking because it requires manual migration effort. The way I see it, SemVer is best suited for libraries with a strongly define public interface like an API, but that does not mean it is impossible to use for other software – you'll just have to wing it sometimes.
(The other thing you need to consider is to plan breaking changes well ahead of time and group them together to reduce the number of migrations end users have to make in favor of doing larger changes in one big release while at the same time not holding back changes for too long. This is always a tough decision but I believe it will be worthwhile. And it's identical with any other software that uses SemVer, so it's no different for tools with user interfaces.)
Strong +1 to this. This also got me and my package manager confused.
Since ranger is written in Python, you may want to consider following PEP-440.
In some internal tooling, I made CI builds output a version like
1.2.3.post1.dev<pipeline-id>for versions that were built on the base of a previously released 1.2.3. That way I would not need to decide on a whim whether the next version will be 1.3.0 or 1.2.4 (or 2.0.0). However, going with1.3.0.dev<some-incremental-number>as a default is also fine if you are considering using a dedicated hotfix release branch to backport fixes for 1.2.x.I personally do not want to deal with dynamic version generation outside of a VCS, so I cannot give any input to this other than "I wouldn't".