Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Release/3.0.3 #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions 12 .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
pre_install:
# - curl -LsSf https://astral.sh/uv/install.sh | sh
- pip install uv
- uv export --only-group docs --no-hashes --no-color > requirements-docs.txt
post_install:
- pip install -r requirements-docs.txt
pre_build:
- make -C docs html

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
87 changes: 86 additions & 1 deletion 87 CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,96 @@ This section covers the changes between major version 2 and version 3.

.. towncrier release notes start

Version 3.0.3
=============

:Released: 2025-01-18
:Maintainer: Tom Schraitle


Bug Fixes
---------

* :pr:`453`: The check in ``_comparator`` does not match the check in :meth:`Version.compare`.
This breaks comparision with subclasses.



Improved Documentation
----------------------

* :pr:`435`: Several small improvements for documentation:

* Add meta description to improve SEO
* Use canonicals on ReadTheDocs (commit 87f639f)
* Pin versions for reproducable doc builds (commit 03fb990)
* Add missing :file:`.readthedocs.yaml` file (commit ec9348a)
* Correct some smaller issues when building (commit f65feab)

* :pr:`436`: Move search box more at the top. This makes it easier for
users as if the TOC is long, the search box isn't visible
anymore.



Features
--------

* :pr:`439`: Improve type hints to fix TODOs



Internal Changes
----------------

* :pr:`440`: Update workflow file

* :pr:`446`: Add Python 3.13 to GitHub Actions

* :pr:`447`: Modernize project configs with :file:`pyproject.toml` and
use Astral's uv command.

* In :file:`pyproject.toml`:

* Move all project related data from :file:`setup.cfg` to :file:`pyproject.toml`
* Use new dependency group from :pep:`735`
* Consolidate flake8, isort, pycodestyle with ruff
* Split towncrier config type "trivial" into "trivial" and "internal"

* Create config file for ruff (:file:`.ruff.toml`)
* Create config file for pytest (:file:`.pytest.ini`)
* Simplify :file:`tox.ini` and remove old stuff
* Document installation with new :command:`uv` command
* Simplify Sphinx config with :func:`find_version()`
* Update the authors
* Use :command:`uv` in GitHub Action :file:`python-testing.yml` workflow

* Update :file:`release-procedure.md`.

* :pr:`451`: Turn our Markdown issue templates into YAML


Trivial Changes
---------------

* :pr:`438`: Replace organization placeholder in license

* :pr:`445`: Improve private :func:`_nat_cmp` method:

* Remove obsolete else.
* Find a better way to identify digits without the :mod:`re` module.
* Fix docstring in :meth:`Version.compare`



----


Version 3.0.2
=============

:Released: 2023-10-09
:Maintainer:
:Maintainer: Tom Schraitle


Bug Fixes
Expand Down
7 changes: 0 additions & 7 deletions 7 changelog.d/pr435.doc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions 3 changelog.d/pr436.doc.rst

This file was deleted.

15 changes: 0 additions & 15 deletions 15 changelog.d/pr447.internal.rst

This file was deleted.

53 changes: 11 additions & 42 deletions 53 docs/build-semver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,27 @@ Building semver
:description lang=en:
Building semver

.. _PEP 517: https://www.python.org/dev/peps/pep-0517/
.. _PEP 621: https://www.python.org/dev/peps/pep-0621/
.. _A Practical Guide to Setuptools and Pyproject.toml: https://godatadriven.com/blog/a-practical-guide-to-setuptools-and-pyproject-toml/
.. _Declarative config: https://setuptools.rtfd.io/en/latest/userguide/declarative_config.html
.. _Installing uv: https://docs.astral.sh/uv/getting-started/installation/


This project changed slightly its way how it is built. The reason for this
was to still support the "traditional" way with :command:`setup.py`,
but at the same time try out the newer way with :file:`pyproject.toml`.
As Python 3.6 got deprecated, this project does support from now on only
:file:`pyproject.toml`.
This project changed its way how it is built over time. We used to have
a :file:`setup.py` file, but switched to a :file:`pyproject.toml` setup.

The build process is managed by :command:`uv` command.

Background information
----------------------
You need:

Skip this section and head over to :ref:`build-pyproject-build` if you just
want to know how to build semver.
This section gives some background information how this project is set up.
* Python 3.7 or newer.

The traditional way with :command:`setup.py` in this project uses a
`Declarative config`_. With this approach, the :command:`setup.py` is
stripped down to its bare minimum and all the metadata is stored in
:file:`setup.cfg`.
* The :mod:`setuptools` module version 61 or newer which is used as
a build backend.

The new :file:`pyproject.toml` contains only information about the build backend, currently setuptools.build_meta. The idea is taken from
`A Practical Guide to Setuptools and Pyproject.toml`_.
Setuptools-specific configuration keys as defined in `PEP 621`_ are currently
not used.
* The command :command:`uv` from Astral. Refer to the section
`Installing uv`_ for more information.


.. _build-pyproject-build:

Building with pyproject-build
-----------------------------

To build semver you need:

* The :mod:`build` module which implements the `PEP 517`_ build
frontend.
Install it with::

pip install build

Some Linux distributions has already packaged it. If you prefer
to use the module with your package manager, search for
:file:`python-build` or :file:`python3-build` and install it.

* The command :command:`pyproject-build` from the :mod:`build` module.

To build semver, run::

pyproject-build
uv build

After the command is finished, you can find two files in the :file:`dist` folder: a ``.tar.gz`` and a ``.whl`` file.
2 changes: 1 addition & 1 deletion 2 docs/usage/semver-version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Getting the Version of semver
To know the version of semver itself, use the following construct::

>>> semver.__version__
'3.0.3-alpha.1'
'3.0.3'
6 changes: 4 additions & 2 deletions 6 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

[build-system]
requires = [
# sync with setup.py until we discard non-pep-517/518
"setuptools>=61",
# "setuptools-scm>=8",
]
Expand All @@ -19,6 +18,8 @@ requires-python = ">=3.7"
name = "semver"
description = "Python helper for Semantic Versioning (https://semver.org)"
readme = "README.rst"
# PEP 639
# licence = "BSD-2-Clause"
# readme.content-type = "text/x-rst"
license = { file = "LICENSE.txt" }
authors = [
Expand All @@ -34,7 +35,7 @@ classifiers = [
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
# "License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
Expand Down Expand Up @@ -92,6 +93,7 @@ docs = [
"sphinx", # ==7.0.1
"sphinx-argparse", # ==0.4.0
"sphinx-autodoc-typehints", # ==1.24.0
"restview",
]
devel = [
{include-group = "typing"},
Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.