From b1d5e123c7387ada5407da72974686cc959aee45 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Tue, 17 Mar 2026 16:14:31 +0100 Subject: [PATCH 1/4] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 2 +- .meta.toml | 2 +- .pre-commit-config.yaml | 14 +++++++------- news/+meta.internal | 1 + pyproject.toml | 16 ++++++++-------- tox.ini | 4 ++++ 6 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 news/+meta.internal diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index 05872b5a..8b2da2b5 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -19,7 +19,7 @@ jobs: - ["ubuntu", "ubuntu-latest"] config: # [Python version, visual name, tox env] - - ["3.13", "6.2 on py3.13", "py313-plone62"] + - ["3.14", "6.2 on py3.14", "py314-plone62"] - ["3.10", "6.2 on py3.10", "py310-plone62"] runs-on: ${{ matrix.os[1] }} diff --git a/.meta.toml b/.meta.toml index 05c15b12..9ed708fd 100644 --- a/.meta.toml +++ b/.meta.toml @@ -3,7 +3,7 @@ # See the inline comments on how to expand/tweak this configuration file [meta] template = "default" -commit-id = "2.3.1" +commit-id = "2.5.1" [pre_commit] codespell_extra_lines = """ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e894b502..a5645ef4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,16 +7,16 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.21.0 + rev: v3.21.2 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py310-plus] - repo: https://github.com/pycqa/isort - rev: 7.0.0 + rev: 8.0.1 hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 + rev: 26.1.0 hooks: - id: black - repo: https://github.com/collective/zpretty @@ -63,16 +63,16 @@ repos: hooks: - id: check-manifest - repo: https://github.com/regebro/pyroma - rev: "5.0" + rev: "5.0.1" hooks: - id: pyroma - repo: https://github.com/mgedmin/check-python-versions - rev: "0.23.0" + rev: "0.24.0" hooks: - id: check-python-versions args: ['--only', 'setup.py,pyproject.toml'] - 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 00000000..1336cd39 --- /dev/null +++ b/news/+meta.internal @@ -0,0 +1 @@ +Update configuration files @plone diff --git a/pyproject.toml b/pyproject.toml index 9d2dfcb3..31f54a7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # https://github.com/plone/meta/tree/main/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [build-system] -requires = ["setuptools>=68.2,<80", "wheel"] +requires = ["setuptools>=68.2,<83", "wheel"] [tool.towncrier] directory = "news/" @@ -14,32 +14,32 @@ underlines = ["", "", ""] [[tool.towncrier.type]] directory = "breaking" -name = "Breaking changes:" +name = "Breaking changes" showcontent = true [[tool.towncrier.type]] directory = "feature" -name = "New features:" +name = "New features" showcontent = true [[tool.towncrier.type]] directory = "bugfix" -name = "Bug fixes:" +name = "Bug fixes" showcontent = true [[tool.towncrier.type]] directory = "internal" -name = "Internal:" +name = "Internal" showcontent = true [[tool.towncrier.type]] directory = "documentation" -name = "Documentation:" +name = "Documentation" showcontent = true [[tool.towncrier.type]] directory = "tests" -name = "Tests:" +name = "Tests" showcontent = true ## @@ -62,7 +62,7 @@ profile = "plone" ## [tool.black] -target-version = ["py38"] +target-version = ["py310"] ## # Add extra configuration options in .meta.toml: diff --git a/tox.ini b/tox.ini index af38719a..1373660b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ min_version = 4.4.0 envlist = lint test + py314-plone62 py313-plone62 py312-plone62 py311-plone62 @@ -22,6 +23,7 @@ skip_missing_interpreters = True # 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] @@ -66,6 +68,7 @@ description = check if the package defines all its dependencies skip_install = true deps = build + setuptools<82.0.0 z3c.dependencychecker==2.14.3 commands = python -m build --sdist @@ -134,6 +137,7 @@ extras = ## # Add extra configuration options in .meta.toml: # [tox] +# skip_test_extra = true # test_extras = """ # tests # widgets From c8d798c05dc2a6333809a55b5962aa0020fcc0c8 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Tue, 17 Mar 2026 16:14:42 +0100 Subject: [PATCH 2/4] Fix isort formatting for isort 8.x compatibility --- docs/conf.py | 1 - fix-converted-myst.py | 1 - setup.py | 1 - src/plone/api/addon.py | 1 - src/plone/api/content.py | 1 - src/plone/api/env.py | 1 - src/plone/api/portal.py | 1 - src/plone/api/relation.py | 1 - src/plone/api/tests/test_addon.py | 1 - src/plone/api/tests/test_doctests.py | 1 - src/plone/api/tests/test_portal.py | 1 - 11 files changed, 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bcc56e9c..fd9d3be7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,7 +2,6 @@ import sys - project = "plone.api" copyright = "2012, Plone Foundation" diff --git a/fix-converted-myst.py b/fix-converted-myst.py index 3091a14c..cefe3003 100644 --- a/fix-converted-myst.py +++ b/fix-converted-myst.py @@ -2,7 +2,6 @@ import os import re - logging.basicConfig() logger = logging.getLogger("fix converted MyST documentation") logger.setLevel(logging.INFO) diff --git a/setup.py b/setup.py index fbf415e0..2d2d1dd4 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ from pathlib import Path from setuptools import setup - version = "3.0.0a3.dev0" long_description = "\n".join( diff --git a/src/plone/api/addon.py b/src/plone/api/addon.py index f2b25a2c..06d93f5d 100644 --- a/src/plone/api/addon.py +++ b/src/plone/api/addon.py @@ -19,7 +19,6 @@ import logging - logger = logging.getLogger("plone.api.addon") diff --git a/src/plone/api/content.py b/src/plone/api/content.py index a0a660f0..9d4c6d91 100644 --- a/src/plone/api/content.py +++ b/src/plone/api/content.py @@ -25,7 +25,6 @@ import transaction import uuid - _marker = [] # Maximum number of attempts to generate a unique random ID diff --git a/src/plone/api/env.py b/src/plone/api/env.py index e6530fea..a65ce64b 100644 --- a/src/plone/api/env.py +++ b/src/plone/api/env.py @@ -18,7 +18,6 @@ import traceback import Zope2 - IS_TEST = None diff --git a/src/plone/api/portal.py b/src/plone/api/portal.py index a3d21b5c..6d3f1b46 100644 --- a/src/plone/api/portal.py +++ b/src/plone/api/portal.py @@ -24,7 +24,6 @@ import datetime as dtime import re - logger = getLogger("plone.api.portal") try: diff --git a/src/plone/api/relation.py b/src/plone/api/relation.py index 10a0fa10..c46e7816 100644 --- a/src/plone/api/relation.py +++ b/src/plone/api/relation.py @@ -26,7 +26,6 @@ import logging - try: distribution("plone.app.iterate") except PackageNotFoundError: diff --git a/src/plone/api/tests/test_addon.py b/src/plone/api/tests/test_addon.py index cf4093b0..24d528d2 100644 --- a/src/plone/api/tests/test_addon.py +++ b/src/plone/api/tests/test_addon.py @@ -6,7 +6,6 @@ import unittest - ADDON = "plone.session" diff --git a/src/plone/api/tests/test_doctests.py b/src/plone/api/tests/test_doctests.py index 5a94579e..f0ab669e 100644 --- a/src/plone/api/tests/test_doctests.py +++ b/src/plone/api/tests/test_doctests.py @@ -21,7 +21,6 @@ import re import unittest - logger = getLogger(__name__) try: diff --git a/src/plone/api/tests/test_portal.py b/src/plone/api/tests/test_portal.py index a822aab5..ac8124d7 100644 --- a/src/plone/api/tests/test_portal.py +++ b/src/plone/api/tests/test_portal.py @@ -25,7 +25,6 @@ import DateTime import unittest - try: # Python 3 from email import message_from_bytes From 85cc52a1acf1c255f2b4f76d61020cd7e3d8624f Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Tue, 17 Mar 2026 16:15:07 +0100 Subject: [PATCH 3/4] Apply pyupgrade fixes and remove unused typing imports --- src/plone/api/addon.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/plone/api/addon.py b/src/plone/api/addon.py index 06d93f5d..8fc8bf71 100644 --- a/src/plone/api/addon.py +++ b/src/plone/api/addon.py @@ -11,9 +11,6 @@ from plone.base.utils import get_installer from Products.CMFPlone.controlpanel.browser.quickinstaller import InstallerView from Products.GenericSetup import EXTENSION -from typing import Dict -from typing import List -from typing import Tuple from zope.component import getAllUtilitiesRegisteredFor from zope.globalrequest import getRequest @@ -38,8 +35,8 @@ class NonInstallableAddons: """Set of add-ons not available for installation.""" - profiles: List[str] - products: List[str] + profiles: list[str] + products: list[str] @dataclass @@ -51,14 +48,14 @@ class AddonInformation: title: str description: str - upgrade_profiles: Dict - other_profiles: List[List] - install_profile: Dict - uninstall_profile: Dict + upgrade_profiles: dict + other_profiles: list[list] + install_profile: dict + uninstall_profile: dict profile_type: str - upgrade_info: Dict + upgrade_info: dict valid: bool - flags: List[str] + flags: list[str] def __repr__(self) -> str: """Return a string representation of this object.""" @@ -97,7 +94,7 @@ def _get_non_installable_addons() -> NonInstallableAddons: @lru_cache(maxsize=1) -def _cached_addons() -> Tuple[Tuple[str, AddonInformation]]: +def _cached_addons() -> tuple[tuple[str, AddonInformation]]: """Return information about add-ons in this installation. :returns: Tuple of tuples with add-on id and AddonInformation. @@ -197,7 +194,7 @@ def _update_addon_info( return addon -def _get_addons() -> List[AddonInformation]: +def _get_addons() -> list[AddonInformation]: """Return an updated list of add-on information. :returns: List of AddonInformation. @@ -211,7 +208,7 @@ def _get_addons() -> List[AddonInformation]: return result -def get_addons(limit: str = "") -> List[AddonInformation]: +def get_addons(limit: str = "") -> list[AddonInformation]: """List add-ons in this Plone site. :param limit: Limit list of add-ons. @@ -238,7 +235,7 @@ def get_addons(limit: str = "") -> List[AddonInformation]: return addons -def get_addon_ids(limit: str = "") -> List[str]: +def get_addon_ids(limit: str = "") -> list[str]: """List add-ons ids in this Plone site. :param limit: Limit list of add-ons. From b1d97e3f02dbc24de75596f9715ee78a4c357212 Mon Sep 17 00:00:00 2001 From: David Glick Date: Wed, 18 Mar 2026 11:22:54 -0700 Subject: [PATCH 4/4] Fix test extra used for docs-related tox testenvs --- .meta.toml | 15 +++++---------- tox.ini | 15 +++++---------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.meta.toml b/.meta.toml index 9ed708fd..3f2d2570 100644 --- a/.meta.toml +++ b/.meta.toml @@ -46,8 +46,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt commands = @@ -60,8 +59,7 @@ commands = basepython = python3.11 skip_install = False constrain_package_deps = True -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt commands = @@ -74,8 +72,7 @@ skip_install = False usedevelop = True allowlist_externals = mkdir -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt @@ -95,8 +92,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - {[testenv:plone6docs]extras} +extras = {[base]extras} deps = {[testenv:plone6docs]deps} commands = @@ -111,8 +107,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - {[testenv:plone6docs]extras} +extras = {[base]extras} deps = {[testenv:plone6docs]deps} commands = diff --git a/tox.ini b/tox.ini index 1373660b..4991aa99 100644 --- a/tox.ini +++ b/tox.ini @@ -245,8 +245,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt commands = @@ -259,8 +258,7 @@ commands = basepython = python3.11 skip_install = False constrain_package_deps = True -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt commands = @@ -273,8 +271,7 @@ skip_install = False usedevelop = True allowlist_externals = mkdir -extras = - tests +extras = {[base]extras} deps = -r requirements-docs.txt @@ -294,8 +291,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - {[testenv:plone6docs]extras} +extras = {[base]extras} deps = {[testenv:plone6docs]deps} commands = @@ -310,8 +306,7 @@ constrain_package_deps = True package = editable allowlist_externals = mkdir -extras = - {[testenv:plone6docs]extras} +extras = {[base]extras} deps = {[testenv:plone6docs]deps} commands =