Since we were talking about simplifying the version specification recently, I would like to bring another proposal: discouraging (non-zero) epoch segments in versions. “Discouraging” as in indicating in documentation that using them is discouraged, since we can’t really remove the support.
As a quick recap, epochs are basically a way of “rebooting” versions. For example, if a project starts using CalVer and then decides it was a bad idea after all, it can increment the epoch and start over, so that 1!1.0 evaluates as a newer version than 2026.1. To the best of my knowledge, epochs are extremely rarely used right now. According to “Reimplementing PEP 440” post, back in 2022 versions with epoch constituted 0.0002% downloads from PyPI. I’ve asked @konstin about it ~two weeks ago, and he confirmed that running the query on 1% tablesample of the current data confirms that result.
Admittedly, “rarely used” doesn’t mean it’s not useful, especially if it addresses a very specific use case. However, it implies that they don’t get much visibility to users, and they probably don’t get the same level of test coverage as more regular versions. And given how many times I’ve seen packages making wrong assumptions (such as “version is dot-separated numbers”) and crashing when you happened to install an RC of their dependency, I dare say suddenly introducing an epoch in a high profile package is bound to cause some issues. Searching further, I’ve stumbled upon “Python version epochs are broken”, though to be honest I’m not convinced that the author wasn’t testing undefined behavior in the first place.
In the upcoming PEP 817, we’ve decided not to support versions with epoch other than zero for “ABI dependencies”, since the complexity outweighed the benefit.
With my personal Gentoo hat on, epochs are a true pain to downstreams. Gentoo versions do not support epochs, and should a project start using them, we’d effectively have to implement some kind of perpetual workaround for it. To my understanding, Debian does support epochs but prefers avoiding them. I’m sure there are other distributions that don’t have an equivalent concept.
If you have to reboot versioning, no solution is really good. However, in my opinion epochs seem more promising than they really are, and may actually cause more trouble than the previous version scheme did. In the end, keeping your versions incremental, even if it meant jumping up to 3000 like salt did, is a cleaner solution and should be recommended over using epochs, if only for the sake of simplicity and portability.
For this reason, I want to propose adding a note to the version specification that epochs are discouraged as they are likely to cause issues with other (admittedly buggy/limited) software, and that using strictly incremental versions is preferable.