semver 3.0.2__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {semver-3.0.2 → semver-3.0.4}/.editorconfig +1 -0
- {semver-3.0.2 → semver-3.0.4}/.gitignore +1 -1
- semver-3.0.4/.pytest.ini +15 -0
- {semver-3.0.2 → semver-3.0.4}/.readthedocs.yaml +9 -3
- semver-3.0.4/.ruff.toml +53 -0
- {semver-3.0.2 → semver-3.0.4}/CHANGELOG.rst +105 -1
- {semver-3.0.2 → semver-3.0.4}/LICENSE.txt +1 -1
- semver-3.0.4/MANIFEST.in +26 -0
- {semver-3.0.2 → semver-3.0.4}/PKG-INFO +36 -9
- semver-3.0.4/changelog.d/459.bugfix.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/Makefile +6 -0
- {semver-3.0.2 → semver-3.0.4}/docs/_static/css/custom.css +4 -0
- semver-3.0.4/docs/_templates/layout.html +10 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/combine-pydantic-and-semver.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/convert-pypi-to-semver.rst +5 -1
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/create-subclasses-from-version.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/deal-with-invalid-versions.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/display-deprecation-warnings.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/index.rst +3 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/version-from-file.rst +5 -1
- {semver-3.0.2 → semver-3.0.4}/docs/api.rst +4 -0
- semver-3.0.4/docs/build-semver.rst +33 -0
- {semver-3.0.2 → semver-3.0.4}/docs/conf.py +30 -23
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/add-changelog-entry.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/doc-semver.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/finish-release.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/index.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/prerequisites.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/release-procedure.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/report-bugs.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/contribute/run-test-suite.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/index.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/install.rst +23 -3
- {semver-3.0.2 → semver-3.0.4}/docs/migration/index.rst +3 -0
- {semver-3.0.2 → semver-3.0.4}/docs/migration/migratetosemver3.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/migration/replace-deprecated-functions.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/pysemver.rst +4 -0
- semver-3.0.4/docs/requirements.txt +5 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/access-parts-of-a-version.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/access-parts-through-index.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/check-compatible-semver-version.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/check-valid-semver-version.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/compare-versions-through-expression.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/compare-versions.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/convert-version-into-different-types.rst +5 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/create-a-version.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/determine-version-equality.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/get-min-and-max-of-multiple-versions.rst +4 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/semver-version.rst +1 -1
- semver-3.0.4/pyproject.toml +191 -0
- semver-3.0.4/release-procedure.md +145 -0
- semver-3.0.4/setup.cfg +17 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/__about__.py +1 -1
- {semver-3.0.2 → semver-3.0.4}/src/semver/__main__.py +1 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/_deprecated.py +1 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/version.py +12 -14
- {semver-3.0.2 → semver-3.0.4}/src/semver.egg-info/PKG-INFO +36 -9
- {semver-3.0.2 → semver-3.0.4}/src/semver.egg-info/SOURCES.txt +4 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_semver.py +1 -2
- {semver-3.0.2 → semver-3.0.4}/tests/test_subclass.py +18 -0
- {semver-3.0.2 → semver-3.0.4}/tox.ini +9 -27
- semver-3.0.4/uv.lock +1427 -0
- semver-3.0.2/MANIFEST.in +0 -8
- semver-3.0.2/docs/_templates/layout.html +0 -49
- semver-3.0.2/docs/build-semver.rst +0 -61
- semver-3.0.2/docs/requirements.txt +0 -5
- semver-3.0.2/pyproject.toml +0 -73
- semver-3.0.2/release-procedure.md +0 -123
- semver-3.0.2/setup.cfg +0 -93
- {semver-3.0.2 → semver-3.0.4}/.coveragerc +0 -0
- {semver-3.0.2 → semver-3.0.4}/CITATION.cff +0 -0
- {semver-3.0.2 → semver-3.0.4}/CONTRIBUTING.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/CONTRIBUTORS +0 -0
- {semver-3.0.2 → semver-3.0.4}/Makefile +0 -0
- {semver-3.0.2 → semver-3.0.4}/README.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/SUPPORT.md +0 -0
- {semver-3.0.2 → semver-3.0.4}/changelog.d/.gitignore +0 -0
- {semver-3.0.2 → semver-3.0.4}/changelog.d/README.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/changelog.d/_template.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/_static/logo.svg +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/coerce.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/advanced/semverwithvprefix.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/changelog-semver3-devel.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/changelog.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/inventories/pydantic.inv +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/inventories/python-objects.inv +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/make.bat +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/readme.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/increase-parts-of-a-version_prereleases.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/index.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/parse-version-string.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/raise-parts-of-a-version.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/replace-parts-of-a-version.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/usage/semver_org-version.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/docs/version-policy.rst +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/__init__.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/_types.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/cli.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver/py.typed +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver.egg-info/dependency_links.txt +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver.egg-info/entry_points.txt +0 -0
- {semver-3.0.2 → semver-3.0.4}/src/semver.egg-info/top_level.txt +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/coerce.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/conftest.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/semverwithvprefix.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_bump.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_compare.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_deprecated_functions.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_docstrings.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_format.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_immutable.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_index.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_match.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_max-min.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_parsing.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_pysemver-cli.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_replace.py +0 -0
- {semver-3.0.2 → semver-3.0.4}/tests/test_typeerror-274.py +0 -0
semver-3.0.4/.pytest.ini
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[pytest]
|
|
2
|
+
norecursedirs = .git build .env/ env/ .pyenv/ .tmp/ .eggs/ venv/
|
|
3
|
+
testpaths = tests docs
|
|
4
|
+
pythonpath = src tests
|
|
5
|
+
filterwarnings =
|
|
6
|
+
ignore:Function 'semver.*:DeprecationWarning
|
|
7
|
+
# ' <- This apostroph is just to fix syntax highlighting
|
|
8
|
+
addopts =
|
|
9
|
+
--import-mode=importlib
|
|
10
|
+
--no-cov-on-fail
|
|
11
|
+
--cov=semver
|
|
12
|
+
--cov-report=term-missing
|
|
13
|
+
--doctest-glob='*.rst'
|
|
14
|
+
--doctest-modules
|
|
15
|
+
--doctest-report ndiff
|
|
@@ -10,11 +10,17 @@ build:
|
|
|
10
10
|
os: ubuntu-22.04
|
|
11
11
|
tools:
|
|
12
12
|
python: "3.11"
|
|
13
|
+
jobs:
|
|
14
|
+
pre_install:
|
|
15
|
+
# - curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
16
|
+
- pip install uv
|
|
17
|
+
- uv export --only-group docs --no-hashes --no-color > requirements-docs.txt
|
|
18
|
+
post_install:
|
|
19
|
+
- pip install -r requirements-docs.txt
|
|
20
|
+
pre_build:
|
|
21
|
+
- make -C docs html
|
|
13
22
|
|
|
14
23
|
# Build documentation in the docs/ directory with Sphinx
|
|
15
24
|
sphinx:
|
|
16
25
|
configuration: docs/conf.py
|
|
17
26
|
|
|
18
|
-
python:
|
|
19
|
-
install:
|
|
20
|
-
- requirements: docs/requirements.txt
|
semver-3.0.4/.ruff.toml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Configuration file for ruff
|
|
3
|
+
# See https://docs.astral.sh/ruff/configuration/
|
|
4
|
+
|
|
5
|
+
line-length = 88
|
|
6
|
+
indent-width = 4
|
|
7
|
+
include = [
|
|
8
|
+
"pyproject.toml",
|
|
9
|
+
"src/**/*.py",
|
|
10
|
+
"tests/**/*.py",
|
|
11
|
+
"docs/**/*.py",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[lint]
|
|
15
|
+
extend-ignore = [
|
|
16
|
+
"RUF005",
|
|
17
|
+
"RUF012",
|
|
18
|
+
# Comment contains ambiguous `’` (RIGHT SINGLE QUOTATION MARK):
|
|
19
|
+
"RUF003",
|
|
20
|
+
"ISC001",
|
|
21
|
+
]
|
|
22
|
+
select = [
|
|
23
|
+
"F", # pyflakes
|
|
24
|
+
"E", # pycodestyle
|
|
25
|
+
"I", # isort
|
|
26
|
+
"N", # pep8-naming
|
|
27
|
+
"UP", # pyupgrade
|
|
28
|
+
"RUF", # ruff
|
|
29
|
+
"B", # flake8-bugbear
|
|
30
|
+
"C4", # flake8-comprehensions
|
|
31
|
+
"ISC", # flake8-implicit-str-concat
|
|
32
|
+
"PTH", # flake8-use-pathlib
|
|
33
|
+
"SIM", # flake8-simplify
|
|
34
|
+
"TID", # flake8-tidy-imports
|
|
35
|
+
]
|
|
36
|
+
# TODO: Remove ISC001 ignore when formatter updated: https://github.com/astral-sh/ruff/issues/8272
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
[format]
|
|
40
|
+
# Exclude type hint stub files from formatting.
|
|
41
|
+
exclude = ["*.pyi"]
|
|
42
|
+
|
|
43
|
+
# Like Black, use double quotes for strings.
|
|
44
|
+
quote-style = "double"
|
|
45
|
+
|
|
46
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
47
|
+
indent-style = "space"
|
|
48
|
+
|
|
49
|
+
# Like Black, respect magic trailing commas.
|
|
50
|
+
skip-magic-trailing-comma = false
|
|
51
|
+
|
|
52
|
+
docstring-code-format = true
|
|
53
|
+
docstring-code-line-length = "dynamic"
|
|
@@ -18,11 +18,115 @@ This section covers the changes between major version 2 and version 3.
|
|
|
18
18
|
|
|
19
19
|
.. towncrier release notes start
|
|
20
20
|
|
|
21
|
+
Version 3.0.4
|
|
22
|
+
=============
|
|
23
|
+
|
|
24
|
+
:Released: 2025-01-24
|
|
25
|
+
:Maintainer: Tom Schraitle
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Bug Fixes
|
|
29
|
+
---------
|
|
30
|
+
|
|
31
|
+
* :gh:`459`: Fix 3.0.3:
|
|
32
|
+
|
|
33
|
+
* :pr:`457`: Re-enable Trove license identifier
|
|
34
|
+
* :pr:`456`: Fix source dist file
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
----
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
Version 3.0.3
|
|
41
|
+
=============
|
|
42
|
+
|
|
43
|
+
:Released: 2025-01-18
|
|
44
|
+
:Maintainer: Tom Schraitle
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Bug Fixes
|
|
48
|
+
---------
|
|
49
|
+
|
|
50
|
+
* :pr:`453`: The check in ``_comparator`` does not match the check in :meth:`Version.compare`.
|
|
51
|
+
This breaks comparision with subclasses.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Improved Documentation
|
|
56
|
+
----------------------
|
|
57
|
+
|
|
58
|
+
* :pr:`435`: Several small improvements for documentation:
|
|
59
|
+
|
|
60
|
+
* Add meta description to improve SEO
|
|
61
|
+
* Use canonicals on ReadTheDocs (commit 87f639f)
|
|
62
|
+
* Pin versions for reproducable doc builds (commit 03fb990)
|
|
63
|
+
* Add missing :file:`.readthedocs.yaml` file (commit ec9348a)
|
|
64
|
+
* Correct some smaller issues when building (commit f65feab)
|
|
65
|
+
|
|
66
|
+
* :pr:`436`: Move search box more at the top. This makes it easier for
|
|
67
|
+
users as if the TOC is long, the search box isn't visible
|
|
68
|
+
anymore.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
Features
|
|
73
|
+
--------
|
|
74
|
+
|
|
75
|
+
* :pr:`439`: Improve type hints to fix TODOs
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
Internal Changes
|
|
80
|
+
----------------
|
|
81
|
+
|
|
82
|
+
* :pr:`440`: Update workflow file
|
|
83
|
+
|
|
84
|
+
* :pr:`446`: Add Python 3.13 to GitHub Actions
|
|
85
|
+
|
|
86
|
+
* :pr:`447`: Modernize project configs with :file:`pyproject.toml` and
|
|
87
|
+
use Astral's uv command.
|
|
88
|
+
|
|
89
|
+
* In :file:`pyproject.toml`:
|
|
90
|
+
|
|
91
|
+
* Move all project related data from :file:`setup.cfg` to :file:`pyproject.toml`
|
|
92
|
+
* Use new dependency group from :pep:`735`
|
|
93
|
+
* Consolidate flake8, isort, pycodestyle with ruff
|
|
94
|
+
* Split towncrier config type "trivial" into "trivial" and "internal"
|
|
95
|
+
|
|
96
|
+
* Create config file for ruff (:file:`.ruff.toml`)
|
|
97
|
+
* Create config file for pytest (:file:`.pytest.ini`)
|
|
98
|
+
* Simplify :file:`tox.ini` and remove old stuff
|
|
99
|
+
* Document installation with new :command:`uv` command
|
|
100
|
+
* Simplify Sphinx config with :func:`find_version()`
|
|
101
|
+
* Update the authors
|
|
102
|
+
* Use :command:`uv` in GitHub Action :file:`python-testing.yml` workflow
|
|
103
|
+
|
|
104
|
+
* Update :file:`release-procedure.md`.
|
|
105
|
+
|
|
106
|
+
* :pr:`451`: Turn our Markdown issue templates into YAML
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
Trivial Changes
|
|
110
|
+
---------------
|
|
111
|
+
|
|
112
|
+
* :pr:`438`: Replace organization placeholder in license
|
|
113
|
+
|
|
114
|
+
* :pr:`445`: Improve private :func:`_nat_cmp` method:
|
|
115
|
+
|
|
116
|
+
* Remove obsolete else.
|
|
117
|
+
* Find a better way to identify digits without the :mod:`re` module.
|
|
118
|
+
* Fix docstring in :meth:`Version.compare`
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
----
|
|
123
|
+
|
|
124
|
+
|
|
21
125
|
Version 3.0.2
|
|
22
126
|
=============
|
|
23
127
|
|
|
24
128
|
:Released: 2023-10-09
|
|
25
|
-
:Maintainer:
|
|
129
|
+
:Maintainer: Tom Schraitle
|
|
26
130
|
|
|
27
131
|
|
|
28
132
|
Bug Fixes
|
|
@@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
|
|
|
11
11
|
list of conditions and the following disclaimer in the documentation and/or
|
|
12
12
|
other materials provided with the distribution.
|
|
13
13
|
|
|
14
|
-
Neither the name of the
|
|
14
|
+
Neither the name of the python-semver org nor the names of its
|
|
15
15
|
contributors may be used to endorse or promote products derived from
|
|
16
16
|
this software without specific prior written permission.
|
|
17
17
|
|
semver-3.0.4/MANIFEST.in
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
include *.md
|
|
2
|
+
include *.rst
|
|
3
|
+
include *.txt
|
|
4
|
+
include CONTRIBUTORS
|
|
5
|
+
include CITATION.cff
|
|
6
|
+
include Makefile
|
|
7
|
+
include changelog.d/*
|
|
8
|
+
graft docs/**
|
|
9
|
+
include tests/*.py
|
|
10
|
+
include tox.ini
|
|
11
|
+
include .pytest.ini
|
|
12
|
+
include .ruff.toml
|
|
13
|
+
include uv.lock
|
|
14
|
+
|
|
15
|
+
# The dot files:
|
|
16
|
+
include .coveragerc
|
|
17
|
+
include .editorconfig
|
|
18
|
+
include .gitignore
|
|
19
|
+
include .readthedocs.yaml
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
prune docs/_build
|
|
23
|
+
recursive-exclude .github *
|
|
24
|
+
prune docs/**/__pycache__
|
|
25
|
+
|
|
26
|
+
global-exclude __pycache__
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: semver
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: Python helper for Semantic Versioning (https://semver.org)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
Author-email: Kostiantyn Rybnikov <k-bx@k-bx.com>, Tom Schraitle <toms@suse.de>
|
|
6
|
+
Maintainer-email: Tom Schraitle <toms@suse.de>, Sebastien Celles <s.celles@gmail.com>
|
|
7
|
+
License: Copyright (c) 2013, Konstantine Rybnikov
|
|
8
|
+
All rights reserved.
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
11
|
+
are permitted provided that the following conditions are met:
|
|
12
|
+
|
|
13
|
+
Redistributions of source code must retain the above copyright notice, this
|
|
14
|
+
list of conditions and the following disclaimer.
|
|
15
|
+
|
|
16
|
+
Redistributions in binary form must reproduce the above copyright notice, this
|
|
17
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
18
|
+
other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
Neither the name of the python-semver org nor the names of its
|
|
21
|
+
contributors may be used to endorse or promote products derived from
|
|
22
|
+
this software without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
25
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
28
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
29
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
30
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
31
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
33
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
|
|
35
|
+
Project-URL: GitHub Homepage, https://github.com/python-semver/python-semver
|
|
11
36
|
Project-URL: Changelog, https://python-semver.readthedocs.io/en/latest/changelog.html
|
|
12
37
|
Project-URL: Documentation, https://python-semver.rtfd.io
|
|
13
38
|
Project-URL: Releases, https://github.com/python-semver/python-semver/releases
|
|
14
39
|
Project-URL: Bug Tracker, https://github.com/python-semver/python-semver/issues
|
|
15
40
|
Classifier: Environment :: Web Environment
|
|
16
41
|
Classifier: Intended Audience :: Developers
|
|
42
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
43
|
Classifier: License :: OSI Approved :: BSD License
|
|
18
44
|
Classifier: Operating System :: OS Independent
|
|
19
|
-
Classifier: Programming Language :: Python
|
|
20
45
|
Classifier: Programming Language :: Python :: 3
|
|
21
46
|
Classifier: Programming Language :: Python :: 3.7
|
|
22
47
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -24,6 +49,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
24
49
|
Classifier: Programming Language :: Python :: 3.10
|
|
25
50
|
Classifier: Programming Language :: Python :: 3.11
|
|
26
51
|
Classifier: Programming Language :: Python :: 3.12
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
53
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
54
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
55
|
Requires-Python: >=3.7
|
|
29
56
|
Description-Content-Type: text/x-rst
|
|
@@ -8,6 +8,12 @@ SPHINXPROJ = semver
|
|
|
8
8
|
SOURCEDIR = .
|
|
9
9
|
BUILDDIR = _build
|
|
10
10
|
|
|
11
|
+
# Set the source directory for your project
|
|
12
|
+
SRC_DIR = ../src
|
|
13
|
+
|
|
14
|
+
# Set the PYTHONPATH environment variable
|
|
15
|
+
export PYTHONPATH := $(SRC_DIR):$(PYTHONPATH)
|
|
16
|
+
|
|
11
17
|
# Put it first so that "make" without argument is like "make help".
|
|
12
18
|
help:
|
|
13
19
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
Combining Pydantic and semver
|
|
2
2
|
=============================
|
|
3
3
|
|
|
4
|
+
.. meta::
|
|
5
|
+
:description lang=en:
|
|
6
|
+
Combining Pydantic and semver
|
|
7
|
+
|
|
4
8
|
According to its homepage, `Pydantic <https://pydantic-docs.helpmanual.io>`_
|
|
5
9
|
"enforces type hints at runtime, and provides user friendly errors when data
|
|
6
10
|
is invalid."
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
Converting
|
|
1
|
+
Converting Versions between PyPI and semver
|
|
2
2
|
===========================================
|
|
3
3
|
|
|
4
|
+
.. meta::
|
|
5
|
+
:description lang=en:
|
|
6
|
+
Converting versions between PyPI and semver
|
|
7
|
+
|
|
4
8
|
.. Link
|
|
5
9
|
https://packaging.pypa.io/en/latest/_modules/packaging/version.html#InvalidVersion
|
|
6
10
|
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Creating Subclasses from Version
|
|
4
4
|
================================
|
|
5
5
|
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Creating subclasses from Version class
|
|
9
|
+
|
|
6
10
|
If you do not like creating functions to modify the behavior of semver
|
|
7
11
|
(as shown in section :ref:`sec_dealing_with_invalid_versions`), you can
|
|
8
12
|
also create a subclass of the :class:`Version <semver.version.Version>` class.
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Dealing with Invalid Versions
|
|
4
4
|
=============================
|
|
5
5
|
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Dealing with invalid versions
|
|
9
|
+
|
|
6
10
|
As semver follows the semver specification, it cannot parse version
|
|
7
11
|
strings which are considered "invalid" by that specification. The semver
|
|
8
12
|
library cannot know all the possible variations so you need to help the
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Displaying Deprecation Warnings
|
|
4
4
|
===============================
|
|
5
5
|
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Displaying and filtering deprecation warnings
|
|
9
|
+
|
|
6
10
|
By default, deprecation warnings are `ignored in Python <https://docs.python.org/3/library/warnings.html#warning-categories>`_.
|
|
7
11
|
This also affects semver's own warnings.
|
|
8
12
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
.. _sec_reading_versions_from_file:
|
|
2
2
|
|
|
3
|
-
Reading
|
|
3
|
+
Reading Versions from File
|
|
4
4
|
==========================
|
|
5
5
|
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Reading versions from file
|
|
9
|
+
|
|
6
10
|
In cases where a version is stored inside a file, one possible solution
|
|
7
11
|
is to use the following function:
|
|
8
12
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.. _build-semver:
|
|
2
|
+
|
|
3
|
+
Building semver
|
|
4
|
+
===============
|
|
5
|
+
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Building semver
|
|
9
|
+
|
|
10
|
+
.. _Installing uv: https://docs.astral.sh/uv/getting-started/installation/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
This project changed its way how it is built over time. We used to have
|
|
14
|
+
a :file:`setup.py` file, but switched to a :file:`pyproject.toml` setup.
|
|
15
|
+
|
|
16
|
+
The build process is managed by :command:`uv` command.
|
|
17
|
+
|
|
18
|
+
You need:
|
|
19
|
+
|
|
20
|
+
* Python 3.7 or newer.
|
|
21
|
+
|
|
22
|
+
* The :mod:`setuptools` module version 61 or newer which is used as
|
|
23
|
+
a build backend.
|
|
24
|
+
|
|
25
|
+
* The command :command:`uv` from Astral. Refer to the section
|
|
26
|
+
`Installing uv`_ for more information.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
To build semver, run::
|
|
30
|
+
|
|
31
|
+
uv build
|
|
32
|
+
|
|
33
|
+
After the command is finished, you can find two files in the :file:`dist` folder: a ``.tar.gz`` and a ``.whl`` file.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
#
|
|
4
3
|
# python-semver documentation build configuration file
|
|
5
4
|
#
|
|
@@ -16,37 +15,31 @@
|
|
|
16
15
|
# add these directories to sys.path here. If the directory is relative to the
|
|
17
16
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
18
17
|
#
|
|
19
|
-
|
|
20
|
-
from datetime import date
|
|
18
|
+
|
|
21
19
|
import os
|
|
22
20
|
import re
|
|
23
|
-
import
|
|
21
|
+
from datetime import date
|
|
22
|
+
from pathlib import Path
|
|
24
23
|
|
|
25
|
-
SRC_DIR =
|
|
26
|
-
sys.path.insert(0, SRC_DIR)
|
|
27
|
-
# from semver import __version__ # noqa: E402
|
|
24
|
+
SRC_DIR = Path(__file__).absolute().parent.parent / "src"
|
|
28
25
|
YEAR = date.today().year
|
|
29
26
|
|
|
30
27
|
|
|
31
|
-
def
|
|
32
|
-
"""
|
|
33
|
-
Build an absolute path from *parts* and and return the contents of the
|
|
34
|
-
resulting file. Assume UTF-8 encoding.
|
|
35
|
-
"""
|
|
36
|
-
here = os.path.abspath(os.path.dirname(__file__))
|
|
37
|
-
with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f:
|
|
38
|
-
return f.read()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def find_version(*file_paths):
|
|
28
|
+
def find_version(path: Path) -> str:
|
|
42
29
|
"""
|
|
43
30
|
Build a path from *file_paths* and search for a ``__version__``
|
|
44
31
|
string inside.
|
|
45
32
|
"""
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
content = Path(path).read_text(encoding="utf-8")
|
|
34
|
+
|
|
35
|
+
version_match = re.search(
|
|
36
|
+
r"^__version__ = ['\"]([^'\"]*)['\"]",
|
|
37
|
+
content,
|
|
38
|
+
re.MULTILINE
|
|
39
|
+
)
|
|
48
40
|
if version_match:
|
|
49
41
|
return version_match.group(1)
|
|
42
|
+
|
|
50
43
|
raise RuntimeError("Unable to find version string.")
|
|
51
44
|
|
|
52
45
|
|
|
@@ -86,14 +79,14 @@ master_doc = "index"
|
|
|
86
79
|
# General information about the project.
|
|
87
80
|
project = "python-semver"
|
|
88
81
|
copyright = f"{YEAR}, Kostiantyn Rybnikov and all"
|
|
89
|
-
author = "Kostiantyn Rybnikov and
|
|
82
|
+
author = "Kostiantyn Rybnikov, Tom Schraitle, Sebastien Celles, and others"
|
|
90
83
|
|
|
91
84
|
# The version info for the project you're documenting, acts as replacement for
|
|
92
85
|
# |version| and |release|, also used in various other places throughout the
|
|
93
86
|
# built documents.
|
|
94
87
|
#
|
|
95
88
|
# The short X.Y version.
|
|
96
|
-
release = find_version("
|
|
89
|
+
release = find_version(SRC_DIR / "semver/__about__.py")
|
|
97
90
|
# The full version, including alpha/beta/rc tags.
|
|
98
91
|
version = release # .rsplit(u".", 1)[0]
|
|
99
92
|
|
|
@@ -174,7 +167,7 @@ html_theme_options = {
|
|
|
174
167
|
"github_button": True,
|
|
175
168
|
#:
|
|
176
169
|
"github_type": "star",
|
|
177
|
-
#: whether to apply a
|
|
170
|
+
#: whether to apply a "Fork me on Github" banner
|
|
178
171
|
#: in the top right corner of the page:
|
|
179
172
|
# "github_banner": True,
|
|
180
173
|
#
|
|
@@ -211,6 +204,20 @@ html_theme_options = {
|
|
|
211
204
|
html_static_path = ["_static"]
|
|
212
205
|
html_css_files = ["css/custom.css"]
|
|
213
206
|
|
|
207
|
+
html_sidebars = {
|
|
208
|
+
"**": [
|
|
209
|
+
"about.html", # theme_logo
|
|
210
|
+
# 'relations.html', # prev and next
|
|
211
|
+
"searchbox.html", # basic/searchbox.html
|
|
212
|
+
"navigation.html", # TOC
|
|
213
|
+
# 'donate.html',
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
# Canonical link relation
|
|
218
|
+
if os.environ.get("READTHEDOCS_CANONICAL_URL"):
|
|
219
|
+
html_baseurl = f"{os.environ['READTHEDOCS_CANONICAL_URL']}"
|
|
220
|
+
|
|
214
221
|
# html_logo = "logo.svg"
|
|
215
222
|
|
|
216
223
|
# -- Options for HTMLHelp output ------------------------------------------
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Documenting semver
|
|
4
4
|
==================
|
|
5
5
|
|
|
6
|
+
.. meta::
|
|
7
|
+
:description lang=en:
|
|
8
|
+
Documenting semver with type annotations, docstrings, Sphinx directives
|
|
9
|
+
|
|
6
10
|
Documenting the features of semver is very important. It gives our developers
|
|
7
11
|
an overview what is possible with semver, how it "feels", and how it is
|
|
8
12
|
used efficiently.
|