Metadata-Version: 2.4
Name: zope.meta
Version: 2.2
Summary: Helper functions for package management
Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
License-Expression: ZPL-2.1
Project-URL: Documentation, https://zopemeta.readthedocs.io
Project-URL: Source, https://github.com/zopefoundation/meta
Project-URL: Issues, https://github.com/zopefoundation/meta/issues
Keywords: zope,packaging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: check-python-versions
Requires-Dist: Jinja2
Requires-Dist: packaging
Requires-Dist: pre-commit
Requires-Dist: pyupgrade
Requires-Dist: requests
Requires-Dist: tomlkit>0.15
Requires-Dist: tox
Requires-Dist: zest.releaser
Provides-Extra: test
Requires-Dist: zope.testrunner>=6.4; extra == "test"
Provides-Extra: docs
Requires-Dist: Sphinx; extra == "docs"
Requires-Dist: furo; extra == "docs"
Dynamic: license-file

``zope.meta``
=============

.. image:: https://img.shields.io/pypi/v/zope.meta.svg
    :target: https://pypi.python.org/pypi/zope.meta/
    :alt: Latest Version

.. image:: https://github.com/zopefoundation/meta/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/zopefoundation/meta/actions/workflows/tests.yml

.. image:: https://coveralls.io/repos/github/zopefoundation/meta/badge.svg?branch=master
    :target: https://coveralls.io/github/zopefoundation/meta?branch=master

.. image:: https://readthedocs.org/projects/zopemeta/badge/?version=latest
    :target: https://zopemeta.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

This package contains helper functions and scripts for maintaining package
configurations for Zope Foundation GitHub packages
(https://github.com/zopefoundation).

Please visit https://zopemeta.readthedocs.io for the documentation.

Change log
==========

2.2 (2026-10-19)
----------------

- Add support for Python 3.15.

- Publish C extension packages to PyPI only after the tests passed.

- Add ability to run ``bin/update-python-support`` in CI.

- Fix ``bin/update-python-support --auto-update`` failing when there is
  nothing left to commit, re-adding support for the newest Python version
  when there is no future one and choking on factor envs in ``tox.ini``.

- ``config-package`` only offers to update the branch protection rules when
  called with the new ``--admin`` option.

- Drop support for Python 3.10, which reached end-of-life status
  on October 1, 2026.

- Make Python 3.15 the newest released Python version.

- Remove the future Python version value until Python 3.16 prereleases
  are available on GitHub.

- Add ``.venv`` to ``.gitignore``: tox 4.64+ writes a PEP 832 ``.venv``
  redirect file into the project root.

- Add ``uv.lock`` to ``.gitignore``.

- Allow ``setup-to-pyproject`` to run on a repository which is not controlled
  by ``zope.meta``.

- Add the ``check-case-conflict``, ``check-merge-conflict``, ``check-toml``,
  ``check-yaml``, ``end-of-file-fixer`` and ``trailing-whitespace`` hooks from
  ``pre-commit-hooks`` and the ``sphinx-lint`` hook to
  ``.pre-commit-config.yaml``. Add ``whitespace-exclude`` and
  ``sphinx-lint-exclude`` to the ``[pre-commit]`` section in ``.meta.toml`` to
  hide files from them.
  (`#284 <https://github.com/zopefoundation/meta/issues/284>`_)

- Stop rendering a blank line at the end of ``tests.yml`` for packages which do
  not use trusted publishing.

- Fix the ``[pre-commit]`` example in the documentation: a backslash in a TOML
  basic string has to be escaped, so ``"error\.py"`` is not valid TOML.

- Add ``[pre-commit] additional-config`` option to append additional
  repositories and hooks (e. g. ``mypy``) to ``.pre-commit-config.yaml``.
  (`#439 <https://github.com/zopefoundation/meta/issues/439>`_)

- Offer to create a pull request via ``gh`` at the end of a ``config-package``
  run, like ``update-python-support`` already does.

- Use pinned commit hash for GH Action pypa/gh-action-pypi-publish.
  (`#441 <https://github.com/zopefoundation/meta/issues/441>`_)

- Fix disappearing top comment in ``pyproject.toml`` with newer ``tomlkit``.
  (`#440 <https://github.com/zopefoundation/meta/issues/440>`_)

- Add ``[coverage] combine`` option to measure coverage across all supported
  Python versions instead of a single one. It turns the ``coverage`` tox
  environment into one which combines the data written by the test
  environments, and makes the ``coverage`` job in ``tests.yml`` run them.

- Add ``[tox] coverage-deps`` option for dependencies only
  ``[testenv:coverage]`` needs, without them also landing in ``[testenv]`` and
  ``[testenv:setuptools-latest]``.
  (`#449 <https://github.com/zopefoundation/meta/issues/449>`_)

- Rotate the pip cache key weekly in the ``c-code`` test workflow template.
  ``actions/cache`` never replaces an existing key, so a corrupt cache entry
  used to break every run restoring it until GitHub evicted the entry. A
  rotating key abandons such an entry within a week instead.

- Retry the ``pip install`` steps in the ``c-code`` test workflow template.
  PyPI downloads are occasionally cut off mid-transfer, and ``pip`` does not
  retry a truncated download, so the whole command is retried instead. This
  replaces the weekly pip cache key rotation, which did not address the actual
  cause.
  (`#436 <https://github.com/zopefoundation/meta/issues/436>`_)

- Also set ``pip_pre`` for the free-threaded variant of a future Python
  version in ``tox.ini``, as its dependencies are only available as
  pre-releases just like those of the non-free-threaded variant.

- Upgrade ``pip`` via ``python -m pip`` in the ``c-code`` test workflow
  template, as the ``pip.exe`` shim on Windows refuses to replace itself.
  Run all workflow steps under ``bash`` so that a failing command in a
  multi-command block is no longer swallowed on Windows, and collapse the
  now-redundant OS-split pip cache steps.
  (`#436 <https://github.com/zopefoundation/meta/issues/436>`_)

- Configure ``zest.releaser`` to not add an extra message when using
  trusted publishing.

- Restrict ``readme-renderer`` dependency to versions older than 45 for
  the internal tests. This restriction can be removed when ``readme-renderer``
  and its dependencies install cleanly under Python 3.15.

- Expand free-threaded Python CI testing from Linux-only to all platforms
  (macOS, Windows) in ``c-code`` templates. Add future Python free-threaded
  variant (e.g. ``3.15t``) support to the test matrix, manylinux build
  scripts, and tox configuration.

- Pre-install ``cffi`` and ``pycparser`` for future Python builds.

- Switch to ``coverallsapp/github-action@v2`` in the ``c-code`` test workflow
  template.

- Add an option to enable releases to be built and published automatically
  using PyPI Trusted Publishing for non-``c-code`` projects.

- Move ``zest.releaser`` configuration from ``setup.cfg`` to
  ``pyproject.toml`` where it is the ``[tool.zest-releaser]`` section.

- Update the ``setuptools`` version pin from ``<81`` to ``<82``.
  (`#414 <https://github.com/zopefoundation/meta/issues/414>`_)

- Add steps to create a source distribution alongside binary wheels
  for the ``c-code`` template packages and publish it during releases.
  This prevents emailed warnings from PyPI about non-trusted publisher uploads.
  (`#412 <https://github.com/zopefoundation/meta/issues/412>`_)

- Reinstate checking ``tests.yml`` in ``check-python-versions``
  after the ``check-python-versions`` package was fixed.
  (See `#396 <https://github.com/zopefoundation/meta/issues/396>`_)

- Pin "teyit" in `precommitconfig.yaml.j2` to use Python 3.13
  (must be available locally, like in path or via pyenv/uv).
  teyit does not support Python 3.14 yet.
  (`#398 <https://github.com/zopefoundation/meta/issues/398>`_)

- Add folder ``share/`` to ``.gitignore``.
  The most recent versions of ``tox`` store manual pages there.

- Add ``--with-free-threaded-python`` option to enable CI testing with the
  free-threaded (nogil) build of CPython.
  (`#388 <https://github.com/zopefoundation/meta/issues/388>`_)

- Exclude ``tests.yml`` from ``check-python-versions`` when
  ``with-free-threaded-python`` is enabled, as ``3.14t`` causes a mismatch.
  (`#396 <https://github.com/zopefoundation/meta/issues/396>`_)

- Always publish free-threaded Python wheels to PyPI when
  ``with-free-threaded-python`` is enabled.
  (`#394 <https://github.com/zopefoundation/meta/issues/394>`_)

- Add tox option ``testenv-skip-test-extra``.
  Set this to true if your package does not have a ``test`` extra.
  Otherwise tests fail with latest ``tox``.

- Remove special treatment for macOS test runners on GitHub

- Print out a warning if a ``setuptools`` install time dependency is found
  when runing the the ``config-package`` and ``setup-to-pyproject`` scripts.

- Change ``c-code`` GitHub Actions publishing step to use
  PyPI's "Trusted Publishing".
  (`#198 <https://github.com/zopefoundation/meta/issues/198>`_)

- Move package metadata from setup.py to pyproject.toml.

- When moving metadata to ``pyproject.toml``, ignore ``setup py test`` fossils.
  (`#260 <https://github.com/zopefoundation/meta/issues/260>`_)

- Allow overriding configuration values in ``zope.meta.shared.packages``
  by using the ``--overrides`` option and placing a TOML file named
  ``overrides.toml`` into the overrides folder.

- Rename the ``--template-overrides`` option to simply ``--overrides``.

- Add option to show file changes after a failed ``tox`` ``lint`` run or not.
  For backwards compatibility this is still ``True`` if not set.

- Add script to move package metadata from ``setup.py`` to ``pyproject.toml``.

- Move commonly used script argument processing into shared library file.


2.1 (2025-11-21)
----------------

- editorconfig: Don't use inline comments.
  Inline comments are invalid since editorconfig v0.15.0.

- Fix publishing Linux/arm64 wheels, which did not work after switching the
  GHA manylinux wheel build step for arm64 to a real arm64 runner.

- Fix Python version used for pre-commit at 3.13 so 3.14 is not used.
  Some linters like teyit are not compatible with Python 3.14.

- Update Python version used for manylinux builds to 3.13

- Run the GHA manylinux wheel build step for arm64 architecture on an actual
  Linux on arm64 VM instead of emulated on a x86_64 VM to speed things up.

- Fix ``update_python_support`` script for the case when ``with-future-python``
  is enabled.


2.0 (2025-10-28)
----------------

- Also check ``pyproject.toml`` when running ``check-python-versions``.

- Fix handling of ``tool`` section during ``pyproject.toml`` generation.

- Add support for Python 3.14.

- Drop support for Python 3.9.

- Allow ``setuptools >= 78.1.1, <81``.

- Replace ``pkg_resources`` namespace with PEP 420 native namespace.

- Update to ``pypy-3.11``.

- Add flag ``--no-tests`` to the scripts for switching to PEP 420
  namespaces and for updating supported Python versions.

- Add support for the ``--template-overrides`` flag to the Python version
  update script because it calls ``config-package``.

- Add ability to omit creating files by providing empty override templates.

- Fixed a regression that removed GHA additional installs from the
  default template for GHA testing.

- Upgrade setuptools pin to 75.8.2, which is extensively tested with the
  latest zc.buildout release 4.1.4. **Package maintainers should update
  all their sandboxes to use ``setuptools==75.8.2`` and ``zc.buildout>=4.1.4``
  to avoid issues with building and/or loading wheels!**

- Use Jinja templates to generate ``pyproject.toml`` files as well.

- Add argument ``--template-overrides`` to configuration script to specify
  an additional configuration templates folder. This folder is expected to
  contain subfolders for each overridden configuration type or a ``default``
  folder. The templates in these template folders will override the built-in
  templates.

- Add argument ``--no-tests`` to configuration script to skip unit tests.
  Useful for quick iterative configuration or code changes.

- Retire configurations ``require-cffi`` and ``additional-build-requirement``.
  Build dependencies should go into ``pyproject.toml`` instead.

- Fixes for changed wheel name issues with the latest setuptools/pip

- Improve ``pyproject.toml`` generation

- Add the tox ``release-check`` step to the ``c-code`` templates

- Add script ``bin/switch-to-pep420`` to convert a package from the old
  namespace package layout to the new PEP 420 native layout.

- Add ``pyupgrade-exclude`` to ``[pre-commit]`` section in ``.meta.toml``.

1.1 (2025-01-29)
----------------

- Drop support for Python 3.8.

- Allow specifying a minimum supported Python version other than the previously
  hardcoded default of Python 3.8.

- Allow ``setuptools <= 75.6.0``.

- Add ``omit`` option to ``coverage-run`` configuration because when defined in
  ``pyproject.toml`` it needs to be a list of strings.

- Update ``setup.py`` of configured packages with small textual changes to
  match current best practices.

1.0 (2024-10-02)
----------------

- Converted to an installable Python package.
