{ "info": { "author": "Vladimir Keleshev", "author_email": "vladimir@keleshev.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Topic :: Utilities" ], "description": "# Versioning Package\n\nThe versioning package is a fork from the [version](https://pypi.org/project/version/) package which implements semantic versioning. The primary reason for forking [version](https://pypi.org/project/version/) is to extend functionality to support a non-semantic versioning schema.\n\n pip install versioning==0.2.0\n\n## Semantic version implementation\n\nThe `Enhanced-Versioning` package provides `SemanticVersion` which implements versioning as described in [Semantic Versioning spec 2.0.0-rc.1](http://semver.org).\n\n\nExample of simple X.Y.Z version:\n\n```python\n\n>>> from versioning import SemanticVersion\n\n>>> v = SemanticVersion('1.2.3')\n\n>>> v\nSemanticVersion('1.2.3')\n\n>>> str(v)\n'1.2.3'\n\n>>> v.major\n1\n\n>>> v.minor\n2\n\n>>> v.patch\n3\n\n>>> v.pre_release\n[]\n\n>>> v.build\n[]\n\n```\n\nExample with pre-release and build versions:\n\n\n```python\n\n>>> v2 = SemanticVersion('2.7.3-rc.2.15+19.e02afe3')\n\n>>> v2.major\n2\n\n>>> v2.minor\n7\n\n>>> v2.patch\n3\n\n>>> v2.pre_release\n['rc', 2, 15]\n\n>>> v2.build\n[19, 'e02afe3']\n\n```\n\n`SemanticVersion` supports rich comparison operators (<, <=, >, >=, ==, !=),\nand thus can be sorted:\n\n```python\n\n>>> versions = [SemanticVersion('1.0.0+0.3.7'),\n... SemanticVersion('1.0.0'),\n... SemanticVersion('1.0.0-beta.11'),\n... SemanticVersion('0.9.0'),\n... SemanticVersion('1.0.0-rc.1'),\n... SemanticVersion('1.0.0-rc.1+build.1'),\n... SemanticVersion('1.0.0-alpha.1')]\n\n>>> print('\\n'.join(map(str, sorted(versions))))\n0.9.0\n1.0.0-alpha.1\n1.0.0-beta.11\n1.0.0-rc.1\n1.0.0-rc.1+build.1\n1.0.0\n1.0.0+0.3.7\n\n```\n\n## Non-Semantic version implementation\n\nThe `Versioning` package provides `NonSematicVersion` which implements a non-semantic versioning system as described below.\n\n### Non-Semantic Versioning Specification\n\nThis specification carries over much of the Sematic Versioning Specification except as noted.\n1. Software using Non-Semantic Version MAY declare a public API, but it is not required.\n2. A version MUST consist of one or more dot separated revisions. A revision MUST contain at least one non-negative integer or ASCII alphabetical character [0-9A-Za-z] in which integers, if present, must precede characters. The revision is treated as two parts. The integer value and the character value where the integer value takes precedence over the character value in comparisons. Each revision much increase. For instance: 1.2a.4 -> 1.2b.4 -> 1.3a.4.\n3. See [Semantic Versioning Specification Rule 3](https://semver.org)\n4. Non-Semantic Versioning does not define a standard for stability.\n5. Non-Semantic Versioning does not require a public API to be defined.\n6. Revisions to the left MUST carry greater weight than revisions to the right, but Non-Semantic Versioning does not define precisely what each revision must mean.\n7. Revisions to the right MUST be reset to the appropriate beginning value when revisions to the left are incremented. The integer value of a revision MUST be reset to 0. The character value SHOULD be reset to 'a'.\n8. See rule 7 above.\n9. See [Semantic Versioning Specification Rule 9](https://semver.org) regarding pre-releases.\n10. See [Semantic Versioning Specification Rule 10](https://semver.org) regarding builds.\n11. Precedence MUST be calculated by separating individual revisions and pre-release identifiers. Precedence is determined first by the number of revisions with more revisions taking precedence over fewer. If the number of revisions is equal, then precedence is determined by the first difference when comparing revisions from left to right where the integer values of the revisions are compared numerically first followed by the character values compared alphabetically. Example: 1 < 1.0 < 1.1a < 1.1e < 1.2a. When all revisions are equal, the precedence must be determined by pre-releases. See [Semantic Versioning Specification Rule 11](https://semver.org) for full details on pre-release precedence.\n\nExample of non-semantic versioning:\n\n```python\n\n>>> from versioning import NonSemanticVersion\n\n>>> v = NonSemanticVersion('1')\n\n>>> v\nNonSemanticVersion('1')\n\n\n>>> str(v)\n'1'\n\n>>> v.revisions\n['1']\n\n>>> v.pre_release\n[]\n\n>>> v.build\n[]\n\n```\nExample with pre-release and build versions:\n\n\n```python\n\n>>> v2 = NonSemanticVersion('1.4f.2c-rc.2.15+19.e02afe3')\n\n>>> v2\nNonSemanticVersion('1.4f.2c-rc.2.15+19.e02afe3')\n\n\n>>> str(v2)\n'1.4f.2c-rc.2.15+19.e02afe3'\n\n>>> v2.revisions\n['1', '4f', '2c']\n\n>>> v2.pre_release\n['rc', 2, 15]\n\n>>> v2.build\n[19, 'e02afe3']\n\n```\n\n`NonSemanticVersion` supports rich comparison operators (<, <=, >, >=, ==, !=),\nand thus can be sorted:\n\n```python\n\n>>> versions = [NonSemanticVersion('1.0.4d.7f+0.3.7'),\n... NonSemanticVersion('1.0.4d.7f'),\n... NonSemanticVersion('1.0.4d.7f-beta.11'),\n... NonSemanticVersion('0.9.4d.7f'),\n... NonSemanticVersion('1.0.4d.7f-rc.1'),\n... NonSemanticVersion('1.0.4d.7f-rc.1+build.1'),\n... NonSemanticVersion('1.0.4d.7f-alpha.1'),\n... NonSemanticVersion('1.0.2f.12k+build.3')]\n\n>>> print('\\n'.join(map(str, sorted(versions))))\n0.9.4d.7f\n1.0.2f.12k+build.3\n1.0.4d.7f-alpha.1\n1.0.4d.7f-beta.11\n1.0.4d.7f-rc.1\n1.0.4d.7f-rc.1+build.1\n1.0.4d.7f\n1.0.4d.7f+0.3.7\n\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/loganmackenzie/enhanced-versioning", "keywords": "semver semantic version versioning versions", "license": "MIT", "maintainer": "Logan MacKenzie", "maintainer_email": "loganmackenzie1@gmail.com", "name": "enhanced-versioning", "package_url": "https://pypi.org/project/enhanced-versioning/", "platform": "", "project_url": "https://pypi.org/project/enhanced-versioning/", "project_urls": { "Homepage": "http://github.com/loganmackenzie/enhanced-versioning" }, "release_url": "https://pypi.org/project/enhanced-versioning/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Versioning system with semantic versioning and generic version formats", "version": "0.2.0" }, "last_serial": 5997329, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e5be13adbbc4e5f3fa8a5a48da0d9b83", "sha256": "de6cef20f055072e857c400e811ef696004ab6d7988875589796615d5d0dca23" }, "downloads": -1, "filename": "enhanced-versioning-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e5be13adbbc4e5f3fa8a5a48da0d9b83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3277, "upload_time": "2019-10-18T20:11:57", "url": "https://files.pythonhosted.org/packages/3c/be/7b89a12e12561081633c0bf3a22864f2686c6b12e211f9ab275e51f2e9f6/enhanced-versioning-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e5be13adbbc4e5f3fa8a5a48da0d9b83", "sha256": "de6cef20f055072e857c400e811ef696004ab6d7988875589796615d5d0dca23" }, "downloads": -1, "filename": "enhanced-versioning-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e5be13adbbc4e5f3fa8a5a48da0d9b83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3277, "upload_time": "2019-10-18T20:11:57", "url": "https://files.pythonhosted.org/packages/3c/be/7b89a12e12561081633c0bf3a22864f2686c6b12e211f9ab275e51f2e9f6/enhanced-versioning-0.2.0.tar.gz" } ] }