You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Python helper for Semantic Versioning (http://semver.org/)\nQuickstart\n==========\n\n.. teaser-begin\n\nA Python module for `semantic versioning`_. Simplifies comparing versions.\n\n|build-status| |python-support| |downloads| |license| |docs| |black|\n\n.. teaser-end\n\n.. warning::\n\n As anything comes to an end, this project will focus on Python 3.x only.\n New features and bugfixes will be integrated into the 3.x.y branch only.\n\n Major version 3 of semver will contain some incompatible changes:\n\n * removes support for Python 2.7 and 3.3\n * removes deprecated functions.\n\n The last version of semver which supports Python 2.7 and 3.4 will be\n 2.10.x. However, keep in mind, version 2.10.x is frozen: no new\n features nor backports will be integrated.\n\n We recommend to upgrade your workflow to Python 3.x to gain support,\n bugfixes, and new features.\n\nThe module follows the ``MAJOR.MINOR.PATCH`` style:\n\n* ``MAJOR`` version when you make incompatible API changes,\n* ``MINOR`` version when you add functionality in a backwards compatible manner, and\n* ``PATCH`` version when you make backwards compatible bug fixes.\n\nAdditional labels for pre-release and build metadata are supported.\n\nTo import this library, use:\n\n.. code-block:: python\n\n >>> import semver\n\nWorking with the library is quite straightforward. To turn a version string into the\ndifferent parts, use the ``semver.VersionInfo.parse`` function:\n\n.. code-block:: python\n\n >>> ver = semver.VersionInfo.parse('1.2.3-pre.2+build.4')\n >>> ver.major\n 1\n >>> ver.minor\n 2\n >>> ver.patch\n 3\n >>> ver.prerelease\n 'pre.2'\n >>> ver.build\n 'build.4'\n\nTo raise parts of a version, there are a couple of functions available for\nyou. The function ``semver.VersionInfo.bump_major`` leaves the original object untouched, but\nreturns a new ``semver.VersionInfo`` instance with the raised major part:\n\n.. code-block:: python\n\n >>> ver = semver.VersionInfo.parse(\"3.4.5\")\n >>> ver.bump_major()\n VersionInfo(major=4, minor=0, patch=0, prerelease=None, build=None)\n\nIt is allowed to concatenate different \"bump functions\":\n\n.. code-block:: python\n\n >>> ver.bump_major().bump_minor()\n VersionInfo(major=4, minor=1, patch=0, prerelease=None, build=None)\n\nTo compare two versions, semver provides the ``semver.compare`` function.\nThe return value indicates the relationship between the first and second\nversion:\n\n.. code-block:: python\n\n >>> semver.compare(\"1.0.0\", \"2.0.0\")\n -1\n >>> semver.compare(\"2.0.0\", \"1.0.0\")\n 1\n >>> semver.compare(\"2.0.0\", \"2.0.0\")\n 0\n\n\nThere are other functions to discover. Read on!\n\n\n.. |latest-version| image:: https://img.shields.io/pypi/v/semver.svg\n :alt: Latest version on PyPI\n :target: https://pypi.org/project/semver\n.. |build-status| image:: https://travis-ci.com/python-semver/python-semver.svg?branch=master\n :alt: Build status\n :target: https://travis-ci.com/python-semver/python-semver\n.. |python-support| image:: https://img.shields.io/pypi/pyversions/semver.svg\n :target: https://pypi.org/project/semver\n :alt: Python versions\n.. |downloads| image:: https://img.shields.io/pypi/dm/semver.svg\n :alt: Monthly downloads from PyPI\n :target: https://pypi.org/project/semver\n.. |license| image:: https://img.shields.io/pypi/l/semver.svg\n :alt: Software license\n :target: https://github.com/python-semver/python-semver/blob/master/LICENSE.txt\n.. |docs| image:: https://readthedocs.org/projects/python-semver/badge/?version=latest\n :target: http://python-semver.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. _semantic versioning: http://semver.org/\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Black Formatter",
0 commit comments