Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which part of SemVer should I bump when deprecating supported Python version? [closed]

If a library supports both Python 2 and 3, and I want to deprecate support of Python 2, which part of SemVer should I bump, major or minor?

like image 516
tosh Avatar asked Mar 05 '23 00:03

tosh


1 Answers

A deprecation doesn't break (or really change) anything; it's an official, explicit, advance warning that something will change in a future version.

The SemVar specification specifically says to bump the minor version:

  1. Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented.

Once you actually remove support, that's a backwards-incompatible change: it no longer works for Python 2 users. Now would be the time to bump the major version number.

  1. Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API. It MAY include minor and patch level changes. Patch and minor version MUST be reset to 0 when major version is incremented.
like image 129
chepner Avatar answered Mar 10 '23 15:03

chepner