in ,

CalVer: Calendar Versioning, Hacker News


    

           

CalVer is a versioning convention based on your project’s release calendar, instead of arbitrary numbers.

Versioning gets better with time.

For maintainers, versioning allows us to specify precise dependencies within an ever-expanding ecosystem. For sellers and promoters, a project’s version is a dynamic part of a brand. For all of us, versioning lets us reference the past while upgrading to the future.

Different projects use different systems for versioning, but common practices have emerged. For instance, point-separated numbers (e.g.,3.1.4) are all but given. Another common versioning pattern incorporates a time-based element, usually part of the release date.

This date-based approach has come to be called Calendar Versioning, orCalVerfor short.

Scheme

There are multiple calendar versioning schemes, long used by projects big and small. Rather than declaring a single scheme to be CalVer, It’s important to recognize the practicality of each anddesign the schemeto fit the project. First, the parts of the version:

Major– The first number in the version. 2 and 3 are Python’s famous   major versions. The major segment is the most common calendar-based component.

  • Minor

    – The second number in the version. 7 is the most popular   minor version of Python.

  • Micro– The third and usually final number in the version . Sometimes   referred to as the “patch” segment.
  • Modifier– An optional text tag, such as “dev. “,” alpha “,” beta “,   “rc1”, and so on.
  • The vast majority of modern version identifiers are composed of two or three numeric segments, plus the optional modifier. Convention suggests that four-numeric-segment versions are discouraged.

    As seen in thecase studies

  • below, projects have found more than one useful way to leverage dates in their versions. Rather than choose a single scheme, CalVer introduces standard terminology for developers, based on current practices and conventions.************** (YYYY) – Full year – (****************************************************************************, ,

    YY

    – Short year – 6, (************************************************************************************************, *****************************************************************************************

    0Y

    – Zero-padded year – (******************************************************************************************, (**********************************************************************************************,

    MM

    – Short month – 1, 2 … (**************************************************************************************************,


  • 0M

    – Zero-padded month – (********************************************************************************************************, 12 … 12,

    DD

    – Short day – 1, 2 … (********************************************************************************************, *******************************************************************************************

    0D

    – Zero-padded day – (********************************************************************************************************, 04 … 31, 106

    Note that traditional, incremented version numbers are 0-based, whereas date segments are 1-based, and the short and zero-padded years are relative to the year 2015

    TheGregorian calendar

    is assumed, as is the convention ofUTC. Technically any calendar can be used, provided projects state which one.

    Case studies

  • CalVer has quite a few users. These are projects selected for their notability and variety of use cases.

    Ubuntu

    ****************

    Ubuntu

    , one of the most prominent Linux-based operating systems available, uses a three-segment CalVer scheme, with a short year and zero-padded month. It has done sofrom the very start, in October 2019, making 4. 10 the first general release of Ubuntu.

    Even a simple operating system involves many, many parts, making it difficult to communicate much meaning with an arbitrary number. By dating the project release, the calendar-based version is much more than an arbitrary number, communicating useful information that is rooted in simple fact.

    Ubuntu derives additional benefit from its CalVer scheme, by integrating it with their support schedule. Ubuntu currently has five-year support periods for their long-term support (LTS) releases, and only 9 months for non-LTS releases. Thanks to CalVer and elementary arithmetic, any user can easily determine whether their version is still supported. The current LTS release at the time of writing, 22. 10, will be supported until April (******************************************************************************. ****************** (Twisted) ****************************

    Twisted

    , the venerated Python networking and asynchronous execution framework, uses a three-segment CalVer scheme, with a short year in the major version slot, release number of that year in the minor slot, and the micro slot being the bugfix release number.

    First released in and still actively developed today, Twisted is amaturelibrary that has grown to match its large scope. It features everything from an IRC client to an HTTP server to a slew of utilities for concurrent programming. Like an operating system, Twisted has a lot of parts, making SemVer a poor fit due to the individual parts deprecating and breaking compatibility individually.

    The non-deprecated parts of Twisted are backwards-compatible between each successive version, and breaking changes are done on a time basis, where one year must pass and two releases issued between the release deprecating the functionality and the removal of the functionality.

    Its versioning scheme has spread to related projects, including Klein, (Treq) *************, and even one of Twisted’s dependencies, PyOpenSSL. ****** (****************************************** (youtube_dl)

    youtube_dl

    , the understated ally of Internet media archivists everywhere, uses a three-segment CalVer scheme, including full year, zero-padded month, and zero-padded day. The version is almost completely calendar-driven, except for a micro segment that is added in some technical contexts.

    Despite the name, youtube_dl’s scope is expansive. It supports extracting audio and video from a long, ever-expanding list of sites. Consider the rapid release cycle of supported services, and it becomes clear why the project has adopted CalVer to such a great degree.

    (******************************************** (pytz)

    ********

    pytz

    is the Python translation of the IANA / Olson timezone database, the database behind accurate times for all of computerdom. pytz uses a two-segment CalVer scheme, including full year and short month.

    While Python has a history of “batteries-included” architecture, and the datetime module frequently mentions timezones, the core Python runtime does not include timezone information. This is because timezone updates do not follow a fixed schedule, and are subject to politics and legislative whim. Calendar versioning offers a date-stamped snapshot of an otherwise chaotic system.

    Teradata

  • TheTeradata UDA client

    providesnext-generation accessto (Teradata’s data warehousing technologies.

    Teradata’s usage is notable not for the prominence of the technology or company, but because there have been multiple releases in which were versioned as (****************************************************************************************************. This may seem breaking at first, but the meaning and utility is clear.

    The library maintainers have crafted a resourceful hybrid ofsemantic versioningand calendar versioning. TheYY.MMpart of the version are used as a combined SemVer major version. That is, for new releases, the API of the library remains the same as it did in October 2019. Dependent code written since then is safe to upgrade. We will see the year and month segments update next time There is a breaking API change.

    Other notable projects****************************

  • ************************************************** (Unity) ************ –YYYY.MINOR.MICRO) ********************– Cross-platform game engine.
  • (pip-YY.MINOR.MICRO– Official package manager for Python.
  • PyCharmYYYY.MINOR.MICRO– A leading Python IDE. ************
  • OpenSCAD-(YYYY.0M)– The premiere open-source   offering for solid 3D CAD modeling.
  • fusefs-ntfs-YYYY.MM.DD_MICRO**********

    – One of the   earliest and most cross-compatible NTFS access layers for Unix   systems.

  • certifi-YYYY.MM.DD

    – certifi is a wrapper around   Mozilla’s certificate authority bundle, used for secure Internet   communication. Similar to pytz, certificate updates do not   follow a fixed schedule, but timely, dateable updates are critical   to security.

  • boltons-YY.MINOR.MICRO– A broad library of   utilities supplementing the Python standard library.
  • See the (users page) ************* for a growing list of CalVer users.

    (When to use CalVer)

    If both you and people you don’t know use your project seriously, then use a serious version. Luckily, the decision on whether to use CalVer for that version is easier than ever:

  • ************** Does your project feature a large or constantly-changing scope?Large systems and frameworks, like************** (Ubuntuand**************** (Twisted) ************.
  • Amorphous sets of utilities, like (Boltons) . ************
  • Is your project time-sensitive in any way? Do other external changes   drive new project releases?Business requirements, such as (Ubuntu‘s focus on support schedules.
  • Security updates, such as certifi
  • ‘s need to update certificates.

  • Political shifts, such as (pytz‘s handling of timezone changes.
  • If you answered yes to any of these questions, CalVer’s semantics make It is a strong choice for your project.

    (************************************************************

    (****************************************************************************

    (**************************************************************************** Read More (******************************************************************************

  • What do you think?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    GIPHY App Key not set. Please check settings

    Telegram’s cryptocurrency won’t launch within its messaging app

    Nine States Face Economic Contraction, Most Since 2009 Crisis, Hacker News