Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adrienverge/yamllint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.36.1
Choose a base ref
...
head repository: adrienverge/yamllint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.36.2
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 17, 2025

  1. build: Restore documentation and test files in sdist

    This commit fixes a problem reported by Nicholas Bollweg at
    #725. Recent commit a3e1325
    "CI: Publish PyPI releases using GitHub Actions workflows" and automatic
    publication of version 1.36.1 revealed a problem that had probably been
    there for some time: most documentation and test files weren't included
    in the source distribution when running `python -m build` (unless an
    `yamllint.egg-info` from a previous run listed them).
    
    I see two solutions:
    1. Add plugin `setuptools-scm` in `pyproject.toml`:
           requires = ["setuptools >= 61", "setuptools-scm >= 8"]
       This would add all files tracked by Git in the sdist, including a few
       that aren't really needed: `.flake8`, `.github`, `.readthedocs.yaml`…
    2. Declare extra files to embed in `MANIFEST.in`. This is what this
       commit does.
    
    I checked that:
    - All files packages before 1.36.0 are correctly included now:
          tar -tvf dist/yamllint-1.36.0.tar.gz | cut -b65- \
            > /tmp/sdist-files-before
          rm -rf yamllint.egg-info && python -m build && \
            tar -tvf dist/yamllint-1.36.1.tar.gz | cut -b65- \
            > /tmp/sdist-files-after
          git diff --no-index /tmp/sdist-files-before /tmp/sdist-files-after
    - These extra files are still not installed by `pip install` (they are
      not needed):
          pip install yamllint==1.36.0 && \
            tree ~/.local/lib/python3.13/site-packages/yamllint \
            > /tmp/pip-install-before
          pip install dist/yamllint-1.36.1.tar.gz && \
            tree ~/.local/lib/python3.13/site-packages/yamllint \
            > /tmp/pip-install-after
          git diff --no-index /tmp/pip-install-before /tmp/pip-install-after
    adrienverge committed Mar 17, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    16727ac View commit details
  2. CI: Ignore version duplicates when publishing to TestPyPI

    This commit prevents the failure of the GitHub Actions job "Publish
    distribution package to TestPyPI" on most pushes (see discussion at
    #721 (comment)),
    since recent commit a3e1325 "CI: Publish PyPI releases using GitHub
    Actions workflows".
    
    Indeed, TestPyPI doesn't allow repushing the same version. Use
    `skip-existing` to prevent to such failures on the CI.
    
    An alternative would be to use the `setuptools-scm` plugin to define a
    unique version for each commit (e.g. `1.36.2.dev2+gd4f1c14`), but it
    requires more changes (define the version in `pyproject.toml`, fetch
    tags from GitHub in `publish.yaml`, exclude `.*` + `.github/**` files in
    `MANIFEST.in`). Moreover it doesn't work as is: to prevent errors like
    `HTTP 400 The use of local versions in '1.36.2.dev2+gd4f1c14' is not
    allowed` we would need `local_scheme = "no-local-version"`, which would
    push duplicated versions on TestPyPI anyway.
    adrienverge committed Mar 17, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    7d52df7 View commit details
  3. yamllint version 1.36.2

    adrienverge committed Mar 17, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    cd96692 View commit details
Showing with 10 additions and 1 deletion.
  1. +1 −0 .github/workflows/publish.yaml
  2. +5 −0 CHANGELOG.rst
  3. +3 −0 MANIFEST.in
  4. +1 −1 yamllint/__init__.py
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

publish-to-pypi:
name: Publish distribution package to PyPI
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

1.36.2 (2025-03-17)
-------------------

- Build: Restore missing documentation and tests in sdist

1.36.1 (2025-03-15)
-------------------

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include *.rst
include docs/Makefile docs/*.py docs/*.rst docs/*.png
include tests/*.py tests/rules/*.py tests/yaml-1.2-spec-examples/example-*
2 changes: 1 addition & 1 deletion yamllint/__init__.py
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@


APP_NAME = 'yamllint'
APP_VERSION = '1.36.1'
APP_VERSION = '1.36.2'
APP_DESCRIPTION = __doc__

__author__ = 'Adrien Vergé'