Skip to content

Dask versioning to switch to CalVer #100

Closed

Description

@mrocklin

Dask is planning to switch to Calendar versioning (calver)

This has been discussed in several issues (like #93 ) and was met with fairly unanimous consent in the last community meeting. If there are major objections we're still happy to hear them, but at this point I think that the default choice is to move to CalVer rather than wait-and-see.

This issue is here to serve as a general announcement, and for logistics about the move. I would expect this change to happen within the next month.

Activity

  1. mrocklin commented on Oct 6, 2020

    @mrocklin
    MemberAuthor

    I suggest that we use the versioning scheme YY.MM.DD, so if we were to release today it would be version

    >>> dask.__version__
    "20.10.06"
  2. jakirkham commented on Oct 6, 2020

    @jakirkham
    Member

    What about doing YYYY.MM.DD? This is typically what I see projects using CalVer do. For example certifi

  3. djhoese commented on Oct 6, 2020

    @djhoese

    What about a patch release in the same day?

  4. jcrist commented on Oct 6, 2020

    @jcrist
    Member
  5. jrbourbeau commented on Oct 6, 2020

    @jrbourbeau
    Member

    Yeah, following up on @djhoese point, it doesn't happen often, but we might publish a release, discover a critical bug and want to publish a fixed release the same day. What about YY.MM.XX where XX is a zero-padded increment for the releases that month? This seems similar to what Ubuntu and Twisted do

  6. jcrist commented on Oct 6, 2020

    @jcrist
    Member

    What about YY.MM.XX where XX is a zero-padded increment for the releases that month?

    That sounds good to me, but makes it a bit harder to automate the versioning (we'd have to check some central registry to see what the last release was or something). Using a date is much simpler, since the version is based on the date alone. Speaking of this, we'd need to transition from versioneer to some other solution, preferably one that prevents duplicating version info between setup.py and __init__.py.

  7. gforsyth commented on Oct 6, 2020

    @gforsyth

    potential small issue (that we can figure a way around), I don't think you can have a zero-pad between . since pep440 uses int() to parse some stuff.

    Could do YYYYMMXX / YYMMXX (which is admittedly a bit harder to read)

  8. jcrist commented on Oct 6, 2020

    @jcrist
    Member

    Seems to work fine for me:

    In [3]: from distutils.version import StrictVersion
    
    In [4]: StrictVersion("20.01.01")
    Out[4]: StrictVersion ('20.1.1')

    We also don't need to zero pad at all, since the . delimiter already handles splitting between year/month/point release.

  9. gforsyth commented on Oct 6, 2020

    @gforsyth
    In [4]: StrictVersion("20.01.01")
    Out[4]: StrictVersion ('20.1.1')

    Sorry, I wasn't clear. I meant the zero-pad won't survive pep440, which is probably not a huge deal.

  10. martindurant commented on Oct 6, 2020

    @martindurant
    Member

    If it doesn't cause a problem, I would prefer zero-padding, so that string sort and number sort do the same thing.

  11. mrocklin commented on Oct 6, 2020

    @mrocklin
    MemberAuthor

    What about doing YYYY.MM.DD? This is typically what I see projects using CalVer do. For example certifi

    Some examples of YY.MM.DD include Ubuntu and pip. I think it comes down to whether we want users to identify our version as a date, or hide the calendar nature of the versioning.

  12. mrocklin commented on Oct 6, 2020

    @mrocklin
    MemberAuthor

    What about a patch release in the same day?

    We can always bend time and travel to the future by a day if we need to.

  13. jcrist commented on Oct 6, 2020

    @jcrist
    Member

    If it doesn't cause a problem, I would prefer zero-padding, so that string sort and number sort do the same thing.

    That's what using StrictVersion/LooseVersion is for. Even our existing versioning scheme doesn't allow for string sorting of versions. I'd prefer to not zero-pad if possible, as the zeros don't add anything meaningful, and don't follow pep440.

  14. martindurant commented on Oct 6, 2020

    @martindurant
    Member

    I'd prefer to not zero-pad if possible, as the zeros don't add anything meaningful, and don't follow pep440.

    I don't insist, and that's good enough reason not to... but you do occasionally end up dealing with git tag strings or pip installable blob files

  15. pradyunsg commented on Oct 6, 2020

    @pradyunsg

    puts on "I know waaaay too much about the Python packaging standards" hat

    20.01.01 / 2020.01.01 are valid PEP 440 versions.

    >>> from packaging.version import Version
    >>> v = Version("2020.01.01")

    The fact that it does not error out here means that it's a valid PEP 440 version. The only thing that you may want to worry about here is that the "canonical" form of that version isn't the same as the version itself:

    >>> from packaging.utils import canonicalize_version
    >>> str(v)
    '2020.1.1'
    >>> canonicalize_version("2020.01.01")
    '2020.1.1'

    However, note that things will still work even if there's zero-padding:

    >>> Version("2020.01.01") == Version("2020.1.1")
    True

    Overall, the choice between 0Y/0M/0D vs YY/MM/DD is purely a aesthetic one -- either will work with basically every Python Packaging tool that follows the standards.


    Oh, and... https://pypi.org/project/calver/ is a thing you might want to use, in case you're using setuptools. :)


    PS: Please don't use distutils for... well... anything. pip, PyPI and most of the other Python packaging uses packaging.version for handling versions -- it's the reference/main implementation of PEP 440 and friends. At the cost of using a slightly grim analogy, distutils is brain-dead and we're gonna turn off the life support soon.

  16. 17 remaining items

  17. mrocklin commented on Oct 26, 2020

    @mrocklin
    MemberAuthor

    I'd also suggest we do M instead of MM (no zero pad). Slight preference for always using the canonical versions.

    My preference is to use MM, mostly to support people who foolishly do library.__version__ > "2020.9" (like myself). However I also don't understand the importance of canonical version vs version. My (naive) guess is that this is something that only packaging people think about, and that they are more capable of handling the dissonance than naive users. I could be entirely wrong though.

  18. jsignell commented on Oct 27, 2020

    @jsignell
    Member

    I prefer MM as well. Should we do a 👍 👎 vote?

  19. jsignell commented on Oct 27, 2020

    @jsignell
    Member

    MM

  20. jsignell commented on Oct 27, 2020

    @jsignell
    Member

    M

  21. mrocklin commented on Oct 27, 2020

    @mrocklin
    MemberAuthor

    I voted for MM, but I'd also love to learn more about the downsides of using MM before making that decision.

  22. consideRatio commented on Dec 14, 2020

    @consideRatio

    I now voted for MM because I understand it to not have zero padding and M to have zero padding. Zero padding breaks SemVer2 specification, and breaking that means Helm charts need another version when publishing as Helm3 requires SemVer2 compatible versions.

  23. jacobtomlinson commented on Dec 14, 2020

    @jacobtomlinson
    Member

    @consideRatio isn't MM the zero padded option?

  24. consideRatio commented on Dec 14, 2020

    @consideRatio

    Ah, then I prefer the non-zero-padded option, and I assume you are right that it is represented by M. But, only because Helm charts require it =/

    About Helm chart's constraints

    I know of three Helm charts part of the dask organizations, all of these are required to have a non-zero-padded version in their Chart.yaml files.

    • dask-gateway
    • dask (A Jupyter server + a dask cluster in k8s)
    • daskhub (JupyterHub + Dask-Gateway: a jupyter server per user, allowed to create individual dask clusters)
  25. jacobtomlinson commented on Dec 14, 2020

    @jacobtomlinson
    Member

    Thanks for sharing, I wasn't aware of this limiation in Helm.

    I guess given that zero-padded is the most popular option we will just have to make the charts outliers which use the non-zero-padded version.

  26. consideRatio commented on Dec 14, 2020

    @consideRatio

    @jacobtomlinson does it remain the most popular given this information? I for example would also vote for zero padded unless it were for this. Does it merit a recount?

  27. jacobtomlinson commented on Dec 14, 2020

    @jacobtomlinson
    Member

    IMO the Helm charts service a small part of the community, so probably shouldn't dictate large decisions like this. But happy to hear from others if they feel differently.

  28. martindurant commented on Dec 14, 2020

    @martindurant
    Member

    Anyone who wishes to change their vote could comment here, but I wouldn't suggest calling for a new vote. I Still think passing is better, because it ensures numeric ordering and text ordering agree and is a closer match to scientific/iso formats.

  29. hristog commented on Apr 3, 2021

    @hristog

    Hi, I've noticed that dask-ml is still following its original versioning scheme. Are there any plans or discussions, regarding updating it to CalVer as well?

  30. jrbourbeau commented on Apr 3, 2021

    @jrbourbeau
    Member

    I don't think there's a hard rule about sub-projects switching to CalVer (though some projects like dask-cloudprovider and dask-kubernetes have done so). I recommend opening up an issue in dask-ml about CalVer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions