From 6da46d5403148d228b50c16e733bd9503e5c15fa Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 25 Jul 2026 08:53:31 +0200 Subject: [PATCH 1/3] Configuring with plone.meta --- .editorconfig | 2 +- .flake8 | 2 +- .github/dependabot.yml | 2 +- .github/workflows/meta.yml | 10 ++---- .github/workflows/test-matrix.yml | 53 ++++++++++++++++++++----------- .gitignore | 6 ++-- .meta.toml | 4 +-- .pre-commit-config.yaml | 28 ++++++++-------- news/+meta.internal | 2 ++ pyproject.toml | 10 +++--- tox.ini | 30 +++++++++++------ 11 files changed, 86 insertions(+), 63 deletions(-) create mode 100644 news/+meta.internal diff --git a/.editorconfig b/.editorconfig index d054af1..55bfb6d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file # # EditorConfig Configuration file, for more details see: diff --git a/.flake8 b/.flake8 index 3e2d35f..ff17672 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [flake8] doctests = 1 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e5e4522..8da3888 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file version: 2 updates: diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index f9a346f..df9c753 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -1,16 +1,10 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file name: Meta + on: push: - branches: - - master - - main - pull_request: - branches: - - master - - main workflow_dispatch: ## diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index 3c1be1f..d38c6f8 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -1,10 +1,11 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file name: Tests on: push: + workflow_dispatch: jobs: build: @@ -19,7 +20,9 @@ jobs: - ["ubuntu", "ubuntu-latest"] config: # [Python version, visual name, tox env] - - ["3.13", "6.2 on py3.13", "py313-plone62"] + - ["3.14", "6.3 on py3.14", "py314-plone63"] + - ["3.10", "6.3 on py3.10", "py310-plone63"] + - ["3.14", "6.2 on py3.14", "py314-plone62"] - ["3.10", "6.2 on py3.10", "py310-plone62"] - ["3.13", "6.1 on py3.13", "py313-plone61"] - ["3.10", "6.1 on py3.10", "py310-plone61"] @@ -30,25 +33,39 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: persist-credentials: false - - name: Set up Python - uses: actions/setup-python@v6 + - name: Install uv + caching + uses: astral-sh/setup-uv@v9.0.0 with: + enable-cache: true + cache-dependency-glob: | + setup.* + tox.ini + pyproject.toml python-version: ${{ matrix.config[0] }} - allow-prereleases: true - - name: Pip cache - uses: actions/cache@v5 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.config[0] }}- - ${{ runner.os }}-pip- - - name: Install dependencies + +## +# Add extra configuration options in .meta.toml: +# [github] +# extra_lines_after_os_dependencies = """ +# _your own configuration lines_ +# """ +## + - name: Initialize tox + # the bash one-liner below does not work on Windows + if: contains(matrix.os, 'ubuntu') run: | - python -m pip install --upgrade pip - pip install tox + if [ `uvx tox list --no-desc -f init|wc -l` = 1 ]; then uvx --with tox-uv tox -e init;else true; fi - name: Test - run: tox -e ${{ matrix.config[2] }} + run: uvx --with tox-uv tox -e ${{ matrix.config[2] }} + + +## +# Add extra configuration options in .meta.toml: +# [github] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.gitignore b/.gitignore index e4e1b1b..70377bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file # python related *.egg-info @@ -18,6 +18,7 @@ dist/ docs/_build __pycache__/ .tox +.vscode/ node_modules/ forest.dot forest.json @@ -55,6 +56,3 @@ local.cfg # _your own configuration lines_ # """ ## -temp_auto_push.bat -temp_interactive_push.bat -.gitignore diff --git a/.meta.toml b/.meta.toml index c58e80c..6625874 100644 --- a/.meta.toml +++ b/.meta.toml @@ -1,6 +1,6 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [meta] template = "default" -commit-id = "2.0.1.dev0" +commit-id = "2.10.0" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b7b8859..d32d182 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file ci: autofix_prs: false @@ -7,20 +7,20 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.19.1 + rev: v3.21.2 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py39-plus] - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 9.0.0a3 hooks: - id: isort -- repo: https://github.com/psf/black - rev: 25.1.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.1 hooks: - id: black - repo: https://github.com/collective/zpretty - rev: 3.1.0 + rev: 4.0.0 hooks: - id: zpretty @@ -32,7 +32,7 @@ repos: # """ ## - repo: https://github.com/PyCQA/flake8 - rev: 7.1.2 + rev: 7.3.0 hooks: - id: flake8 @@ -44,7 +44,7 @@ repos: # """ ## - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell additional_dependencies: @@ -58,20 +58,20 @@ repos: # """ ## - repo: https://github.com/mgedmin/check-manifest - rev: "0.50" + rev: "0.51" hooks: - id: check-manifest - repo: https://github.com/regebro/pyroma - rev: "4.2" + rev: "5.0.1" hooks: - id: pyroma - repo: https://github.com/mgedmin/check-python-versions - rev: "0.22.1" + rev: "0.24.2" hooks: - id: check-python-versions - args: ['--only', 'setup.py,pyproject.toml'] + args: ['--only', 'setup.py,tox.ini'] - repo: https://github.com/collective/i18ndude - rev: "6.2.1" + rev: "6.3.0" hooks: - id: i18ndude diff --git a/news/+meta.internal b/news/+meta.internal new file mode 100644 index 0000000..c08f539 --- /dev/null +++ b/news/+meta.internal @@ -0,0 +1,2 @@ +Update configuration files. +[plone devs] diff --git a/pyproject.toml b/pyproject.toml index 90b7868..d204786 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,10 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [build-system] -requires = ["setuptools>=68.2,<77", "wheel"] +requires = ["setuptools>=68.2,<82", "wheel"] + + [tool.towncrier] directory = "news/" @@ -37,7 +39,7 @@ showcontent = true [[tool.towncrier.type]] directory = "tests" -name = "Tests" +name = "Tests:" showcontent = true ## @@ -60,7 +62,7 @@ profile = "plone" ## [tool.black] -target-version = ["py38"] +target-version = ["py39"] ## # Add extra configuration options in .meta.toml: diff --git a/tox.ini b/tox.ini index 812c4ea..4fd37b0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/main/src/plone/meta/default +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [tox] # We need 4.4.0 for constrain_package_deps. @@ -7,6 +7,12 @@ min_version = 4.4.0 envlist = lint test + py314-plone63 + py313-plone63 + py312-plone63 + py311-plone63 + py310-plone63 + py314-plone62 py313-plone62 py312-plone62 py311-plone62 @@ -26,10 +32,12 @@ envlist = ## # Add extra configuration options in .meta.toml: # - to specify a custom testing combination of Plone and python versions, use `test_matrix` +# Use ["*"] to use all supported Python versions for this Plone version. +# - to disable the test matrix entirely, set `use_test_matrix = false` # - to specify extra custom environments, use `envlist_lines` # - to specify extra `tox` top-level options, use `config_lines` # [tox] -# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["3.10", "3.9"]} +# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]} # envlist_lines = """ # my_other_environment # """ @@ -70,9 +78,9 @@ description = check if the package defines all its dependencies skip_install = true deps = build - z3c.dependencychecker==2.14.3 + z3c.dependencychecker==3.0 commands = - python -m build --sdist + python -m build --wheel dependencychecker [testenv:dependencies-graph] @@ -118,6 +126,7 @@ set_env = ## deps = {[test_runner]deps} + plone63: -c https://dist.plone.org/release/6.3-dev/constraints.txt plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt plone61: -c https://dist.plone.org/release/6.1-dev/constraints.txt plone60: -c https://dist.plone.org/release/6.0-dev/constraints.txt @@ -140,6 +149,7 @@ extras = ## # Add extra configuration options in .meta.toml: # [tox] +# skip_test_extra = true # test_extras = """ # tests # widgets @@ -160,7 +170,8 @@ constrain_package_deps = {[base]constrain_package_deps} set_env = {[base]set_env} deps = {[test_runner]deps} - -c https://dist.plone.org/release/6.2-dev/constraints.txt + -c https://dist.plone.org/release/6.3-dev/constraints.txt + commands = {[test_runner]test} extras = {[base]extras} @@ -185,7 +196,8 @@ set_env = {[base]set_env} deps = {[test_runner]deps} coverage - -c https://dist.plone.org/release/6.2-dev/constraints.txt + -c https://dist.plone.org/release/6.3-dev/constraints.txt + commands = {[test_runner]coverage} extras = {[base]extras} @@ -197,8 +209,7 @@ deps = twine build towncrier - -c https://dist.plone.org/release/6.2-dev/constraints.txt - + -c https://dist.plone.org/release/6.3-dev/constraints.txt commands = # fake version to not have to install the package # we build the change log as news entries might break @@ -228,8 +239,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.2-dev/constraints.txt - + -c https://dist.plone.org/release/6.3-dev/constraints.txt commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 23f397860df3c2b01b1141eba79839fd2f62be52 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 25 Jul 2026 08:55:43 +0200 Subject: [PATCH 2/3] chore: isort --- setup.py | 1 - src/pas/plugins/headers/__init__.py | 1 - src/pas/plugins/headers/browser.py | 1 - src/pas/plugins/headers/exportimport.py | 1 - src/pas/plugins/headers/parsers.py | 1 - src/pas/plugins/headers/plugins.py | 1 - src/pas/plugins/headers/setuphandlers.py | 1 - src/pas/plugins/headers/utils.py | 1 - 8 files changed, 8 deletions(-) diff --git a/setup.py b/setup.py index e46e7f0..0903057 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ from setuptools import find_packages from setuptools import setup - long_description = "\n\n".join( [ open("README.rst").read(), diff --git a/src/pas/plugins/headers/__init__.py b/src/pas/plugins/headers/__init__.py index b05dc2d..ff5b48f 100644 --- a/src/pas/plugins/headers/__init__.py +++ b/src/pas/plugins/headers/__init__.py @@ -4,7 +4,6 @@ from Products.PluggableAuthService.PluggableAuthService import registerMultiPlugin from zope.i18nmessageid import MessageFactory - _ = MessageFactory("pas.plugins.headers") diff --git a/src/pas/plugins/headers/browser.py b/src/pas/plugins/headers/browser.py index db6fcee..0b19155 100644 --- a/src/pas/plugins/headers/browser.py +++ b/src/pas/plugins/headers/browser.py @@ -4,7 +4,6 @@ from urllib import parse from zExceptions import Forbidden - # List taken over from browser/login/login.py in CMFPlone 5.2. LOGIN_TEMPLATE_IDS = { "localhost", diff --git a/src/pas/plugins/headers/exportimport.py b/src/pas/plugins/headers/exportimport.py index f592021..3c07be6 100644 --- a/src/pas/plugins/headers/exportimport.py +++ b/src/pas/plugins/headers/exportimport.py @@ -5,7 +5,6 @@ import json - FILENAME = "pas.plugins.headers.json" diff --git a/src/pas/plugins/headers/parsers.py b/src/pas/plugins/headers/parsers.py index 41ba882..060863f 100644 --- a/src/pas/plugins/headers/parsers.py +++ b/src/pas/plugins/headers/parsers.py @@ -1,7 +1,6 @@ # Define parsers for header values. import logging - logger = logging.getLogger(__name__) # yes, ja, true _true_chars = "y j t 1".split() diff --git a/src/pas/plugins/headers/plugins.py b/src/pas/plugins/headers/plugins.py index 849870c..f3b867d 100644 --- a/src/pas/plugins/headers/plugins.py +++ b/src/pas/plugins/headers/plugins.py @@ -13,7 +13,6 @@ import logging - logger = logging.getLogger(__name__) # Marker value for missing headers _MARKER = object() diff --git a/src/pas/plugins/headers/setuphandlers.py b/src/pas/plugins/headers/setuphandlers.py index 9b5bc9f..155f333 100644 --- a/src/pas/plugins/headers/setuphandlers.py +++ b/src/pas/plugins/headers/setuphandlers.py @@ -6,7 +6,6 @@ import logging - logger = logging.getLogger(__name__) diff --git a/src/pas/plugins/headers/utils.py b/src/pas/plugins/headers/utils.py index 4a83555..4c10ab1 100644 --- a/src/pas/plugins/headers/utils.py +++ b/src/pas/plugins/headers/utils.py @@ -1,6 +1,5 @@ from Products.CMFCore.utils import getToolByName - PLUGIN_ID = "request_headers" From 73b612c5a8703814357b046cbe1cec66b30864a0 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 25 Jul 2026 08:56:15 +0200 Subject: [PATCH 3/3] chore: update trove classifiers --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 0903057..cbce9ef 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", ],