chore(deps): update dependency semver to v3
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| semver (changelog) | dependencies | major |
2.13.0 -> 3.0.2
|
Release Notes
python-semver/python-semver (semver)
v3.0.2
=============
:Released: 2023-10-09 :Maintainer:
Bug Fixes
-
🇵🇷 418: Replace :class:~collection.OrderedDictwith :class:dict.The dict datatype is ordered since Python 3.7. As we do not support Python 3.6 anymore, it can be considered safe to avoid :class:
~collection.OrderedDict. Related to🇬🇭 419. -
🇵🇷 426: Fix :meth:~semver.version.Version.replacemethod to use the derived class of an instance instead of :class:~semver.version.Versionclass.
Improved Documentation
-
🇵🇷 431: Clarify version policy for the different semver versions (v2, v3, >v3) and the supported Python versions. -
🇬🇭 432: Improve external doc links to Python and Pydantic.
Features
-
🇵🇷 417: Amend GitHub Actions to check against MacOS.
Trivial/Internal Changes
-
🇵🇷 420: Introduce :py:class:~typing.ClassVarfor some :class:~semver.version.Versionclass variables, mainly :data:~semver.version.Version.NAMESand some private. -
🇵🇷 421: Insert mypy configuration into :file:pyproject.tomland remove config options from :file:tox.ini.
v3.0.1
=============
:Released: 2023-06-14 :Maintainer: Tom Schraitle
Bug Fixes
-
🇬🇭 410: Export functions properly using__all__in__init__.py.
v3.0.0
=============
:Released: 2023-04-02 :Maintainer: Tom Schraitle
Bug Fixes
-
🇬🇭 291: Disallow negative numbers in VersionInfo arguments formajor,minor, andpatch. -
🇬🇭 310: Rework API documentation. Follow a more "semi-manual" attempt and add auto directives into :file:docs/api.rst. -
🇬🇭 344: Allow empty string, a string with a prefix, orNoneas token in :meth:~semver.version.Version.bump_buildand :meth:~semver.version.Version.bump_prerelease. -
🇬🇭 374: Correct Towncrier's config entries in the :file:pyproject.tomlfile. The old entries[[tool.towncrier.type]]are deprecated and need to be replaced by[tool.towncrier.fragment.<TYPE>]. -
🇵🇷 384: General cleanup, reformat files:- Reformat source code with black again as some config options did accidentely exclude the semver source code. Mostly remove some includes/excludes in the black config.
- Integrate concurrency in GH Action
- Ignore Python files on project dirs in .gitignore
- Remove unused patterns in MANIFEST.in
- Use
extend-excludefor flake in :file:`setup.cfg`` and adapt list. - Use
skip_install=Truein :file:tox.inifor black
-
🇵🇷 393: Fix command :command:python -m semverto avoid the error "invalid choice" -
🇵🇷 396: Calling :meth:~semver.version.Version.parseon a derived class will show correct type of derived class.
Deprecations
-
🇬🇭 169: Deprecate CLI functions not imported fromsemver.cli. -
🇬🇭 234: In :file:setup.pysimplified file and removeToxandCleanclasses -
🇬🇭 284: Deprecate the use of :meth:~Version.isvalid.Rename :meth:
~semver.version.Version.isvalidto :meth:~semver.version.Version.is_validfor consistency reasons with :meth:~semver.version.Version.is_compatible. -
🇵🇷 290: For semver 3.0.0-alpha0 deprecated:- Remove anything related to Python2
- In :file:
tox.iniand :file:.travis.ymlRemove targets py27, py34, py35, and pypy. Add py38, py39, and nightly (allow to fail) - In :file:
setup.pysimplified file and removeToxandCleanclasses - Remove old Python versions (2.7, 3.4, 3.5, and pypy) from Travis
-
🇬🇭 372: Deprecate support for Python 3.6.Python 3.6 reached its end of life and isn't supported anymore. At the time of writing (Dec 2022), the lowest version is 3.7.
Although the
poll <https://github.com/python-semver/python-semver/discussions/371>_ didn't cast many votes, the majority agreed to remove support for Python 3.6. -
🇵🇷 402: Keep :func:semver.compare <semver._deprecated.compare>. Although it breaks consistency with module level functions, it seems it's a much needed/used function. It's still unclear if we should deprecate this function or not (that's why we use :py:exc:PendingDeprecationWarning).As we don't have a uniform initializer yet, this function stays in the :file:
_deprecated.pyfile for the time being until we find a better solution. See🇬🇭 258for details.
Features
-
🇬🇭 169: Create semver package and split code among different modules in the packages:- Remove :file:
semver.py - Create :file:
src/semver/__init__.py - Create :file:
src/semver/cli.pyfor all CLI methods - Create :file:
src/semver/_deprecated.pyfor thedeprecateddecorator and other deprecated functions - Create :file:
src/semver/__main__.pyto allow calling the CLI using :command:python -m semver - Create :file:
src/semver/_types.pyto hold type aliases - Create :file:
src/semver/version.pyto hold the :class:Versionclass (old name :class:VersionInfo) and its utility functions - Create :file:
src/semver/__about__.pyfor all the metadata variables
- Remove :file:
-
🇬🇭 213: Add typing information -
🇬🇭 284: Implement :meth:~semver.version.Version.is_compatibleto make "is self compatible with X". -
🇬🇭 305: Rename :class:~semver.version.VersionInfoto :class:~semver.version.Versionbut keep an alias for compatibility -
🇵🇷 359: Add optional parameteroptional_minor_and_patchin :meth:~semver.version.Version.parseto allow optional minor and patch parts. -
🇵🇷 362: Make :meth:~semver.version.Version.matchaccept a bare version string as match expression, defaulting to equality testing. -
🇬🇭 364: Enhance :file:pyproject.tomlto make it possible to use the :command:pyproject-buildcommand from the build module. For more information, see :ref:build-semver. -
🇬🇭 365: Improve :file:pyproject.toml.- Use setuptools, add metadata. Taken approach from
A Practical Guide to Setuptools and Pyproject.toml <https://godatadriven.com/blog/a-practical-guide-to-setuptools-and-pyproject-toml/>_. - Doc: Describe building of semver
- Remove :file:
.travis.ymlin :file:MANIFEST.in(not needed anymore) - Distinguish between Python 3.6 and others in :file:
tox.ini - Add skip_missing_interpreters option for :file:
tox.ini - GH Action: Upgrade setuptools and setuptools-scm and test against 3.11.0-rc.2
- Use setuptools, add metadata. Taken approach from
Improved Documentation
-
🇬🇭 276: Document how to create a sublass from :class:~semver.version.VersionInfoclass -
🇬🇭 284: Document deprecation of :meth:~semver.version.Version.isvalid. -
🇵🇷 290: Several improvements in the documentation:- New layout to distinguish from the semver2 development line.
- Create new logo.
- Remove any occurances of Python2.
- Describe changelog process with Towncrier.
- Update the release process.
-
🇬🇭 304: Several improvements in documentation:- Reorganize API documentation.
- Add migration chapter from semver2 to semver3.
- Distinguish between changlog for version 2 and 3
-
🇬🇭 305: Add note about :class:~semver.version.Versionrename. -
🇬🇭 312: Rework "Usage" section.- Mention the rename of :class:
~semver.version.VersionInfoto :class:~semver.version.Versionclass - Remove semver. prefix in doctests to make examples shorter
- Correct some references to dunder methods like
:func:
~semver.version.Version.__getitem__, :func:~semver.version.Version.__gt__etc. - Remove inconsistencies and mention module level function as deprecated and discouraged from using
- Make empty :py:func:
supercall in :file:semverwithvprefix.pyexample
- Mention the rename of :class:
-
🇬🇭 315: Improve release procedure text -
🇬🇭 335: Add new section "Converting versions between PyPI and semver" the limitations and possible use cases to convert from one into the other versioning scheme. -
🇬🇭 340: Describe how to get version from a file -
🇬🇭 343: Describe combining Pydantic with semver in the "Advanced topic" section. -
🇬🇭 350: Restructure usage section. Create subdirectory "usage/" and splitted all section into different files. -
🇬🇭 351: Introduce new topics for:- "Migration to semver3"
- "Advanced topics"
-
🇵🇷 392: Fix the example in the documentation for combining semver and pydantic.
Trivial/Internal Changes
-
🇬🇭 169: Adapted infrastructure code to the new project layout.- Replace :file:
setup.pywith :file:setup.cfgbecause the :file:setup.cfgis easier to use - Adapt documentation code snippets where needed
- Adapt tests
- Changed the
deprecatedto hardcode thesemverpackage name in the warning.
Increase coverage to 100% for all non-deprecated APIs
- Replace :file:
-
🇵🇷 290: Add supported Python versions to :command:black. -
🇬🇭 304: Support PEP-561 :file:py.typed.According to the mentioned PEP:
"Package maintainers who wish to support type checking of their code MUST add a marker file named :file:
py.typedto their package supporting typing."Add package_data to :file:
setup.cfgto include this marker in dist and whl file. -
🇬🇭 309: Some (private) functions from the :mod:semver.versionmodule has been changed.The following functions got renamed:
- function :func:
semver.version.comparatorgot renamed to :func:semver.version._comparatoras it is only useful inside the :class:~semver.version.Versionclass. - function :func:
semver.version.cmpgot renamed to :func:semver.version._cmpas it is only useful inside the :class:~semver.version.Versionclass.
The following functions got integrated into the :class:
~semver.version.Versionclass:- function :func:
semver.version._nat_cmdas a classmethod - function :func:
semver.version.ensure_str
- function :func:
-
🇬🇭 313: Correct :file:tox.iniforchangelogentry to skip installation for semver. This should speed up the execution of towncrier. -
🇬🇭 316: Comparisons of :class:~semver.version.Versionclass and other types return now a :py:const:NotImplementedconstant instead of a :py:exc:TypeErrorexception.The
NotImplemented_ section of the Python documentation recommends returning this constant when comparing with__gt__,__lt__, and other comparison operators to "to indicate that the operation is not implemented with respect to the other type"... _NotImplemented: https://docs.python.org/3/library/constants.html#NotImplemented
-
🇬🇭 319: Introduce stages in :file:.travis.ymlThe config file contains now two stages: check and test. If check fails, the test stage won't be executed. This could speed up things when some checks fails. -
🇬🇭 322: Switch from Travis CI to GitHub Actions. -
🇬🇭 347: Support Python 3.10 in GitHub Action and other config files. -
🇬🇭 378: Fix some typos in Towncrier configuration -
🇬🇭 388: For pytest, switch to the more modern :mod:importlibapproach as it doesn't require to modify :data:sys.path: https://docs.pytest.org/en/7.2.x/explanation/pythonpath.html -
🇵🇷 389: Add public class variable :data:Version.NAMES <semver.version.Version.NAMES>.This class variable contains a tuple of strings that contains the names of all attributes of a Version (like
"major","minor"etc).In cases we need to have dynamical values, this makes it easier to iterate.
.. Local variables: coding: utf-8 mode: text mode: rst End: vim: fileencoding=utf-8 filetype=rst :
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.