From 11fc7d2069980964bb1be9851ecb5f18490e5778 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 21 Nov 2025 23:47:02 +0100 Subject: [PATCH 01/13] Bumped version for breaking release. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 28f3862..f15bc3f 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="plone.autoinclude", - version="2.0.6.dev0", + version="3.0.0.dev0", description="Auto include code and zcml", # long_description: see metadata in setup.cfg # Get more from https://pypi.org/classifiers/ From 8c699cd887144575e37b7da848959ea21e84d38b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 21 Nov 2025 23:47:02 +0100 Subject: [PATCH 02/13] Switch to PEP 420 native namespace. --- news/3928.breaking | 2 ++ setup.py | 10 +--------- src/plone/__init__.py | 2 -- 3 files changed, 3 insertions(+), 11 deletions(-) create mode 100644 news/3928.breaking delete mode 100644 src/plone/__init__.py diff --git a/news/3928.breaking b/news/3928.breaking new file mode 100644 index 0000000..4fb7ad4 --- /dev/null +++ b/news/3928.breaking @@ -0,0 +1,2 @@ +Replace ``pkg_resources`` namespace with PEP 420 native namespace. +Support only Plone 6.2 and Python 3.10+. diff --git a/setup.py b/setup.py index f15bc3f..8cc0da2 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Installer for the plone.autoinclude package.""" -from setuptools import find_packages from setuptools import setup @@ -14,14 +13,11 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", - "Framework :: Plone :: 6.0", - "Framework :: Plone :: 6.1", "Framework :: Plone :: 6.2", "Framework :: Plone :: Core", "Framework :: Plone", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -39,15 +35,11 @@ "Tracker": "https://github.com/plone/plone.autoinclude/issues", }, license="GPL version 2", - packages=find_packages("src", exclude=["ez_setup"]), - namespace_packages=["plone"], - package_dir={"": "src"}, include_package_data=True, zip_safe=False, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=[ "importlib-metadata; python_version<'3.10'", - "setuptools", "zope.configuration", ], ) diff --git a/src/plone/__init__.py b/src/plone/__init__.py deleted file mode 100644 index 03d08ff..0000000 --- a/src/plone/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -__import__("pkg_resources").declare_namespace(__name__) From d2dce9ea37bf70f011c77de594acbdee05233ff7 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 21 Nov 2025 23:47:36 +0100 Subject: [PATCH 03/13] Configuring with plone.meta --- .editorconfig | 23 +- .flake8 | 22 ++ .github/dependabot.yml | 11 + .github/workflows/meta.yml | 63 ++++++ .github/workflows/test-matrix.yml | 72 +++++++ .gitignore | 59 ++++-- .meta.toml | 128 +++++++++-- .pre-commit-config.yaml | 94 +++++++++ pyproject.toml | 129 ++++++++++++ setup.cfg | 27 --- tox.ini | 340 ++++++++++++++++++++++-------- 11 files changed, 821 insertions(+), 147 deletions(-) create mode 100644 .flake8 create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/meta.yml create mode 100644 .github/workflows/test-matrix.yml create mode 100644 .pre-commit-config.yaml diff --git a/.editorconfig b/.editorconfig index f3e46f5..d054af1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,6 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file # # EditorConfig Configuration file, for more details see: # http://EditorConfig.org @@ -12,7 +13,8 @@ root = true -[*] # For All Files +[*] +# Default settings for all files. # Unix-style newlines with a newline ending every file end_of_line = lf insert_final_newline = true @@ -28,12 +30,27 @@ max_line_length = off # 4 space indentation indent_size = 4 -[*.{yml,zpt,pt,dtml}] +[*.{yml,zpt,pt,dtml,zcml,html,xml}] # 2 space indentation indent_size = 2 +[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] +# Frontend development +# 2 space indentation +indent_size = 2 +max_line_length = 80 + [{Makefile,.gitmodules}] # Tab indentation (no size specified, but view as 4 spaces) indent_style = tab indent_size = unset tab_width = unset + + +## +# Add extra configuration options in .meta.toml: +# [editorconfig] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..3e2d35f --- /dev/null +++ b/.flake8 @@ -0,0 +1,22 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +[flake8] +doctests = 1 +ignore = + # black takes care of line length + E501, + # black takes care of where to break lines + W503, + # black takes care of spaces within slicing (list[:]) + E203, + # black takes care of spaces after commas + E231, + +## +# Add extra configuration options in .meta.toml: +# [flake8] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e5e4522 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml new file mode 100644 index 0000000..eafe093 --- /dev/null +++ b/.github/workflows/meta.yml @@ -0,0 +1,63 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/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: + +## +# To set environment variables for all jobs, add in .meta.toml: +# [github] +# env = """ +# debug: 1 +# image-name: 'org/image' +# image-tag: 'latest' +# """ +## + +jobs: + qa: + uses: plone/meta/.github/workflows/qa.yml@2.x + coverage: + uses: plone/meta/.github/workflows/coverage.yml@2.x + release_ready: + uses: plone/meta/.github/workflows/release_ready.yml@2.x + circular: + uses: plone/meta/.github/workflows/circular.yml@2.x + +## +# To modify the list of default jobs being created add in .meta.toml: +# [github] +# jobs = [ +# "qa", +# "coverage", +# "dependencies", +# "release_ready", +# "circular", +# ] +## + +## +# To request that some OS level dependencies get installed +# when running tests/coverage jobs, add in .meta.toml: +# [github] +# os_dependencies = "git libxml2 libxslt" +## + + +## +# Specify additional jobs in .meta.toml: +# [github] +# extra_lines = """ +# another: +# uses: org/repo/.github/workflows/file.yml@main +# """ +## diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml new file mode 100644 index 0000000..8596af2 --- /dev/null +++ b/.github/workflows/test-matrix.yml @@ -0,0 +1,72 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +name: Tests + +on: + push: + +jobs: + build: + permissions: + contents: read + pull-requests: write + strategy: + # We want to see all failures: + fail-fast: false + matrix: + os: + - ["ubuntu", "ubuntu-latest"] + config: + # [Python version, visual name, tox env] + - ["3.13", "6.2 on py3.13", "py313-plone62"] + - ["3.10", "6.2 on py3.10", "py310-plone62"] + + runs-on: ${{ matrix.os[1] }} + 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@v5 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.config[0] }} + allow-prereleases: true + +## +# Add extra configuration options in .meta.toml: +# [github] +# extra_lines_after_os_dependencies = """ +# _your own configuration lines_ +# """ +## + - name: Pip cache + uses: actions/cache@v4 + 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 + run: | + python -m pip install --upgrade pip + pip install tox + - name: Initialize tox + # the bash one-liner below does not work on Windows + if: contains(matrix.os, 'ubuntu') + run: | + if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi + - name: Test + run: 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 6796233..a602abe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,58 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python -*.egg-info/ -*.profraw +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +# python related +*.egg-info *.pyc *.pyo -*.swp -.coverage -.coverage.* -.eggs/ -.installed.cfg -.mr.developer.cfg -.tox/ -__pycache__/ -bin/ + +# translation related +*.mo + +# tools related build/ +.coverage +.*project coverage.xml -develop-eggs/ -develop/ dist/ docs/_build +__pycache__/ +.tox +.vscode/ +node_modules/ +forest.dot +forest.json + +# venv / buildout related +bin/ +develop-eggs/ eggs/ +.eggs/ etc/ +.installed.cfg +include/ lib/ lib64 -log/ +.mr.developer.cfg parts/ pyvenv.cfg var/ +local.cfg + +# mxdev +/instance/ +/.make-sentinels/ +/*-mxdev.txt +/reports/ +/sources/ +/venv/ +.installed.txt + + +## +# Add extra configuration options in .meta.toml: +# [gitignore] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.meta.toml b/.meta.toml index 4c99413..bd917d1 100644 --- a/.meta.toml +++ b/.meta.toml @@ -1,15 +1,117 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file [meta] -template = "pure-python" -commit-id = "211d612c86d6754ebe13fad9b7081533bb603ed9" - -[python] -with-appveyor = false -with-pypy = false -with-legacy-python = false -with-docs = false -with-sphinx-doctests = false - -[coverage] -fail-under = 50 +template = "default" +commit-id = "2.2.2" + +[github] +jobs = [ + "qa", + "coverage", + "release_ready", + "circular", +] + +[tox] +test_matrix = {"6.2" = ["*"]} +envlist_lines = """ + py{310,311,312,313}-{integration,unit} + buildout + buildout5 +""" + +config_lines = """ +[base-integration] +# generic configuration for custom integration tests + +# example.ploneintegration depends on plone.autoinclude, +# and 'deps' is handled before 'usedevelop', so we need '.' in the deps. +# Also, we want all test packages in development mode, +# otherwise when you make a change, you must recreate the environment. +deps = + zope.testrunner + -e . + -e test-packages/example.basetestpackage + -e test-packages/example.addon + -e test-packages/example.different + -e test-packages/example.different2 + -e test-packages/example.metaoverrides + -e test-packages/example.ploneaddon + -e test-packages/example.plone-dash-addon + -e test-packages/example.ploneintegration + -e test-packages/example.zopeaddon + -e test-packages/example.zopeintegration + -e test-packages/example.multipleeps + -e test-packages/ExampleCamelCase + -e test-packages/namespaceexample.native + -e test-packages/namespaceexample.pkgutilns +# extras = +# test + +# Paths for integration tests: run only the tests of the test packages. +# Do not run plone.autoinclude tests. +integration_testpaths = +# With --test-path=test-packages we find no tests. +# Only paths to the src directories work. + --test-path=test-packages/example.addon/src + --test-path=test-packages/example.different/src + --test-path=test-packages/example.different2/src + --test-path=test-packages/example.metaoverrides/src + --test-path=test-packages/example.ploneaddon/src + --test-path=test-packages/example.ploneintegration/src + --test-path=test-packages/example.zopeaddon/src + --test-path=test-packages/example.zopeintegration/src + --test-path=test-packages/example.multipleeps/src + --test-path=test-packages/namespaceexample.native/src + --test-path=test-packages/namespaceexample.pkgutilns/src + +[testenv:py{39,310,311,312,313}-integration] +# Integration tests: run only the tests of the test packages. +# Do not run plone.autoinclude tests. +usedevelop = false +skip_install = true +deps = {[base-integration]deps} +commands = + zope-testrunner {[base-integration]integration_testpaths} [] +extras = + test + +[testenv:py{39,310,311,312,313}-unit] +usedevelop = true +skip_install = false +deps = + zope.testrunner +commands = + zope-testrunner --test-path=src +extras = + test + +[testenv:buildout] +basepython = python3 +skip_install = true +deps = + pip == 25.2 + setuptools == 80.9.0 + zc.buildout == 4.1.12 +commands_pre = + python -m pip list + {envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} +commands = + {envbindir}/test-unit {posargs:-cv} + {envbindir}/test-integration {posargs:-cv} + +[testenv:buildout5] +basepython = python3 +skip_install = true +deps = + pip == 25.2 + setuptools == 80.9.0 + zc.buildout == 5.0.0a2 +commands_pre = + python -m pip list + {envbindir}/buildout -nc {toxinidir}/buildout5.cfg buildout:directory={envdir} +commands = + {envbindir}/test-unit {posargs:-cv} + {envbindir}/test-integration {posargs:-cv} +""" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0b63ae5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,94 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +ci: + autofix_prs: false + autoupdate_schedule: monthly + +repos: +- repo: https://github.com/asottile/pyupgrade + rev: v3.21.0 + hooks: + - id: pyupgrade + args: [--py38-plus] +- repo: https://github.com/pycqa/isort + rev: 7.0.0 + hooks: + - id: isort +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.9.0 + hooks: + - id: black +- repo: https://github.com/collective/zpretty + rev: 3.1.1 + hooks: + - id: zpretty + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# zpretty_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/PyCQA/flake8 + rev: 7.3.0 + hooks: + - id: flake8 + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# flake8_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + additional_dependencies: + - tomli + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# codespell_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/mgedmin/check-manifest + rev: "0.51" + hooks: + - id: check-manifest +- repo: https://github.com/regebro/pyroma + rev: "5.0" + hooks: + - id: pyroma +- repo: https://github.com/mgedmin/check-python-versions + rev: "0.23.0" + hooks: + - id: check-python-versions + args: ['--only', 'setup.py,pyproject.toml'] +- repo: https://github.com/collective/i18ndude + rev: "6.2.1" + hooks: + - id: i18ndude + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# i18ndude_extra_lines = """ +# _your own configuration lines_ +# """ +## + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/pyproject.toml b/pyproject.toml index e45492b..c20adb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ +# Generated from: +# 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"] @@ -36,3 +39,129 @@ showcontent = true directory = "tests" name = "Tests:" showcontent = true + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# towncrier_extra_lines = """ +# extra_configuration +# """ +## + +[tool.isort] +profile = "plone" + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# isort_extra_lines = """ +# extra_configuration +# """ +## + +[tool.black] +target-version = ["py38"] + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# black_extra_lines = """ +# extra_configuration +# """ +## + +[tool.codespell] +ignore-words-list = "discreet,assertin,thet," +skip = "*.po," +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# codespell_ignores = "foo,bar" +# codespell_skip = "*.po,*.map,package-lock.json" +## + +[tool.dependencychecker] +Zope = [ + # Zope own provided namespaces + 'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates', + 'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils', + 'Zope2', 'webdav', 'zmi', + # ExtensionClass own provided namespaces + 'ExtensionClass', 'ComputedAttribute', 'MethodObject', + # Zope dependencies + 'AccessControl', 'Acquisition', 'AuthEncoding', 'beautifulsoup4', 'BTrees', + 'cffi', 'Chameleon', 'DateTime', 'DocumentTemplate', + 'MultiMapping', 'multipart', 'PasteDeploy', 'Persistence', 'persistent', + 'pycparser', 'python-gettext', 'pytz', 'RestrictedPython', 'roman', + 'soupsieve', 'transaction', 'waitress', 'WebOb', 'WebTest', 'WSGIProxy2', + 'z3c.pt', 'zc.lockfile', 'ZConfig', 'zExceptions', 'ZODB', 'zodbpickle', + 'zope.annotation', 'zope.browser', 'zope.browsermenu', 'zope.browserpage', + 'zope.browserresource', 'zope.cachedescriptors', 'zope.component', + 'zope.configuration', 'zope.container', 'zope.contentprovider', + 'zope.contenttype', 'zope.datetime', 'zope.deferredimport', + 'zope.deprecation', 'zope.dottedname', 'zope.event', 'zope.exceptions', + 'zope.filerepresentation', 'zope.globalrequest', 'zope.hookable', + 'zope.i18n', 'zope.i18nmessageid', 'zope.interface', 'zope.lifecycleevent', + 'zope.location', 'zope.pagetemplate', 'zope.processlifetime', 'zope.proxy', + 'zope.ptresource', 'zope.publisher', 'zope.schema', 'zope.security', + 'zope.sequencesort', 'zope.site', 'zope.size', 'zope.structuredtext', + 'zope.tal', 'zope.tales', 'zope.testbrowser', 'zope.testing', + 'zope.traversing', 'zope.viewlet' +] +'Products.CMFCore' = [ + 'docutils', 'five.localsitemanager', 'Missing', 'Products.BTreeFolder2', + 'Products.GenericSetup', 'Products.MailHost', 'Products.PythonScripts', + 'Products.StandardCacheManagers', 'Products.ZCatalog', 'Record', + 'zope.sendmail', 'Zope' +] +'plone.base' = [ + 'plone.batching', 'plone.registry', 'plone.schema','plone.z3cform', + 'Products.CMFCore', 'Products.CMFDynamicViewFTI', +] +python-dateutil = ['dateutil'] +pytest-plone = ['pytest', 'zope.pytestlayer', 'plone.testing', 'plone.app.testing'] + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# dependencies_ignores = "['zestreleaser.towncrier']" +# dependencies_mappings = [ +# "gitpython = ['git']", +# "pygithub = ['github']", +# ] +## + +[tool.check-manifest] +ignore = [ + ".editorconfig", + ".flake8", + ".meta.toml", + ".pre-commit-config.yaml", + "dependabot.yml", + "mx.ini", + "tox.ini", + +] + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# check_manifest_ignores = """ +# "*.map.js", +# "*.pyc", +# """ +# check_manifest_extra_lines = """ +# ignore-bad-ideas = [ +# "some/test/file/PKG-INFO", +# ] +# """ +## + + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/setup.cfg b/setup.cfg index 55981e2..88ca584 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,36 +3,9 @@ [metadata] long_description = file: README.rst, CHANGES.rst -[bdist_wheel] -# Only Python 3. -universal = 0 - -[check-manifest] -ignore = - *.cfg - .coveragerc - .editorconfig - .meta.toml - package-includes/* - [isort] # black compatible isort rules: profile = black force_alphabetical_sort = True force_single_line = True lines_after_imports = 2 - -[flake8] -# black compatible flake8 rules: -ignore = - W503, - C812, - E501 - T001 - C813 -# E203, E266 -exclude = docs,*.egg.,omelette -max-line-length = 88 -max-complexity = 18 -select = B,C,E,F,W,T4,B9 -doctests = 1 diff --git a/tox.ini b/tox.ini index 2a1fb70..570b614 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,24 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file [tox] -minversion = 3.18 +# We need 4.4.0 for constrain_package_deps. +min_version = 4.4.0 envlist = lint - py{39,310,311,312,313}-{integration,unit} + test + py313-plone62 + py312-plone62 + py311-plone62 + py310-plone62 + dependencies + py{310,311,312,313}-{integration,unit} buildout buildout5 - coverage -# Not enabled by default: -# black -[testenv] -# Set the defaults for all test environments. -# Override in [testenv:env-name] where needed. -usedevelop = false -skip_install = true -# Ignore all warnings, there are just too many for pkg_resources namespaces. -setenv = - PYTHONWARNINGS=ignore +[base-integration] +# generic configuration for custom integration tests + # example.ploneintegration depends on plone.autoinclude, # and 'deps' is handled before 'usedevelop', so we need '.' in the deps. # Also, we want all test packages in development mode, @@ -48,23 +48,26 @@ deps = integration_testpaths = # With --test-path=test-packages we find no tests. # Only paths to the src directories work. - --test-path=test-packages/example.addon/src \ - --test-path=test-packages/example.different/src \ - --test-path=test-packages/example.different2/src \ - --test-path=test-packages/example.metaoverrides/src \ - --test-path=test-packages/example.ploneaddon/src \ - --test-path=test-packages/example.ploneintegration/src \ - --test-path=test-packages/example.zopeaddon/src \ - --test-path=test-packages/example.zopeintegration/src \ - --test-path=test-packages/example.multipleeps/src \ - --test-path=test-packages/namespaceexample.native/src \ + --test-path=test-packages/example.addon/src + --test-path=test-packages/example.different/src + --test-path=test-packages/example.different2/src + --test-path=test-packages/example.metaoverrides/src + --test-path=test-packages/example.ploneaddon/src + --test-path=test-packages/example.ploneintegration/src + --test-path=test-packages/example.zopeaddon/src + --test-path=test-packages/example.zopeintegration/src + --test-path=test-packages/example.multipleeps/src + --test-path=test-packages/namespaceexample.native/src --test-path=test-packages/namespaceexample.pkgutilns/src [testenv:py{39,310,311,312,313}-integration] # Integration tests: run only the tests of the test packages. # Do not run plone.autoinclude tests. +usedevelop = false +skip_install = true +deps = {[base-integration]deps} commands = - zope-testrunner {[testenv]integration_testpaths} [] + zope-testrunner {[base-integration]integration_testpaths} [] extras = test @@ -78,70 +81,6 @@ commands = extras = test -[testenv:lint] -basepython = python3 -skip_install = true -deps = - flake8 - check-manifest - check-python-versions -commands = - flake8 src test-packages setup.py - check-manifest - check-python-versions - -[testenv:coverage] -basepython = python3 -allowlist_externals = - mkdir -deps = - {[testenv]deps} - coverage - coverage-python-version -commands = - mkdir -p {toxinidir}/parts/htmlcov - coverage run -m zope.testrunner {[testenv]integration_testpaths} --test-path=src [] - coverage html - coverage report -m --fail-under=80 - -[coverage:run] -branch = True -plugins = coverage_python_version -source = src/plone/autoinclude - -[coverage:report] -precision = 2 -exclude_lines = - pragma: no cover - pragma: nocover - except ImportError: - raise NotImplementedError - if __name__ == '__main__': - self.fail - raise AssertionError - -[coverage:html] -directory = parts/htmlcov - -[testenv:black] -basepython = python3 -skip_install = true -deps = - isort - black -commands = - isort src test-packages setup.py - black src test-packages setup.py - -[testenv:release] -basepython = python3 -skip_install = true -deps = - zest.releaser[recommended] - plone.releaser -commands = - fullrelease - [testenv:buildout] basepython = python3 skip_install = true @@ -169,3 +108,226 @@ commands_pre = commands = {envbindir}/test-unit {posargs:-cv} {envbindir}/test-integration {posargs:-cv} + +## +# 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 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" = ["*"]} +# envlist_lines = """ +# my_other_environment +# """ +# config_lines = """ +# my_extra_top_level_tox_configuration_lines +# """ +## + +[testenv:init] +description = Prepare environment +skip_install = true +allowlist_externals = + echo +commands = + echo "Initial setup complete" + +[testenv:format] +description = automatically reformat code +skip_install = true +deps = + pre-commit +commands = + pre-commit run -a pyupgrade + pre-commit run -a isort + pre-commit run -a black + pre-commit run -a zpretty + +[testenv:lint] +description = run linters that will help improve the code style +skip_install = true +deps = + pre-commit +commands = + pre-commit run -a + +[testenv:dependencies] +description = check if the package defines all its dependencies +skip_install = true +deps = + build + z3c.dependencychecker==2.14.3 +commands = + python -m build --sdist + dependencychecker + +[testenv:dependencies-graph] +description = generate a graph out of the dependencies of the package +skip_install = false +allowlist_externals = + sh +deps = + pipdeptree==2.5.1 + graphviz # optional dependency of pipdeptree +commands = + sh -c 'pipdeptree --exclude setuptools,wheel,pipdeptree,zope.interface,zope.component --graph-output svg > dependencies.svg' + + +[test_runner] +deps = zope.testrunner +test = + zope-testrunner --all --test-path={toxinidir}/src -s plone.autoinclude {posargs} +coverage = + coverage run --branch --source plone.autoinclude {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.autoinclude {posargs} + coverage report -m --format markdown + coverage xml + coverage html + +[base] +description = shared configuration for tests and coverage +use_develop = true +skip_install = false +constrain_package_deps = true +set_env = + ROBOT_BROWSER=headlesschrome + +## +# Specify extra test environment variables in .meta.toml: +# [tox] +# test_environment_variables = """ +# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/ +# """ +# +# Set constrain_package_deps .meta.toml: +# [tox] +# constrain_package_deps = false +## +deps = + {[test_runner]deps} + plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt + +## +# Specify additional deps in .meta.toml: +# [tox] +# test_deps_additional = """ +# -esources/plonegovbr.portal_base[test] +# """ +# +# Specify a custom constraints file in .meta.toml: +# [tox] +# constraints_file = "https://my-server.com/constraints.txt" +## +extras = + test + + +## +# Add extra configuration options in .meta.toml: +# [tox] +# test_extras = """ +# tests +# widgets +# """ +# +# Add extra configuration options in .meta.toml: +# [tox] +# testenv_options = """ +# basepython = /usr/bin/python3.8 +# """ +## + +[testenv:test] +description = run the distribution tests +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +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 + +commands = {[test_runner]test} +extras = {[base]extras} + + +[testenv] +description = run the distribution tests (generative environments) +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +constrain_package_deps = {[base]constrain_package_deps} +set_env = {[base]set_env} +deps = {[base]deps} +commands = {[test_runner]test} +extras = {[base]extras} + + +[testenv:coverage] +description = get a test coverage report +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +constrain_package_deps = {[base]constrain_package_deps} +set_env = {[base]set_env} +deps = + {[test_runner]deps} + coverage + -c https://dist.plone.org/release/6.2-dev/constraints.txt + +commands = {[test_runner]coverage} +extras = {[base]extras} + + +[testenv:release-check] +description = ensure that the distribution is ready to release +skip_install = true +deps = + twine + build + towncrier + -c https://dist.plone.org/release/6.2-dev/constraints.txt +commands = + # fake version to not have to install the package + # we build the change log as news entries might break + # the README that is displayed on PyPI + towncrier build --version=100.0.0 --yes + python -m build --sdist + twine check dist/* + +[testenv:circular] +description = ensure there are no cyclic dependencies +use_develop = true +skip_install = false +# Here we must always constrain the package deps to what is already installed, +# otherwise we simply get the latest from PyPI, which may not work. +constrain_package_deps = true +set_env = + +## +# Specify extra test environment variables in .meta.toml: +# [tox] +# test_environment_variables = """ +# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/ +# """ +## +allowlist_externals = + sh +deps = + pipdeptree + pipforester + -c https://dist.plone.org/release/6.2-dev/constraints.txt +commands = + # Generate the full dependency tree + sh -c 'pipdeptree -j > forest.json' + # Generate a DOT graph with the circular dependencies, if any + pipforester -i forest.json -o forest.dot --cycles + # Report if there are any circular dependencies, i.e. error if there are any + pipforester -i forest.json --check-cycles -o /dev/null + + +## +# Add extra configuration options in .meta.toml: +# [tox] +# extra_lines = """ +# _your own configuration lines_ +# """ +## From 7dea4eb46e63f18d4827cc42668edb42a425fdaf Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 09:55:15 +0100 Subject: [PATCH 04/13] chore(ci): drop 3.9 jobs --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4ee1c4..b4a05e9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,17 +19,14 @@ jobs: config: # [Python version, tox env] - ["3.10", "lint", "ubuntu-latest"] - - ["3.9", "py39-unit", "ubuntu-latest"] - ["3.10", "py310-unit", "ubuntu-latest"] - ["3.11", "py311-unit", "ubuntu-latest"] - ["3.12", "py312-unit", "ubuntu-latest"] - ["3.13", "py313-unit", "ubuntu-latest"] - - ["3.9", "py39-integration", "ubuntu-latest"] - ["3.10", "py310-integration", "ubuntu-latest"] - ["3.11", "py311-integration", "ubuntu-latest"] - ["3.12", "py312-integration", "ubuntu-latest"] - ["3.13", "py313-integration", "ubuntu-latest"] - - ["3.9", "buildout", "ubuntu-latest"] - ["3.13", "buildout", "ubuntu-latest"] - ["3.13", "buildout5", "ubuntu-latest"] - ["3.10", "coverage", "ubuntu-latest"] From 81662b084a86761b76c25939563b02dad3b4e9fb Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 10:10:50 +0100 Subject: [PATCH 05/13] chore: adjust MANIFEST.in --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 4ced517..0550250 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,7 @@ include *.rst include *.txt include buildout.cfg +include buildout5.cfg include LICENSE.GPL include tox.ini From 47e0a75a50324a3cb716272a0f9145970eae2da6 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 09:55:42 +0100 Subject: [PATCH 06/13] chore: pyupgrade --- setup.py | 1 - test-packages/ExampleCamelCase/setup.py | 1 - test-packages/example.addon/setup.py | 1 - test-packages/example.addon/src/example/__init__.py | 1 - test-packages/example.basetestpackage/setup.py | 1 - test-packages/example.basetestpackage/src/example/__init__.py | 1 - test-packages/example.different/setup.py | 1 - test-packages/example.different/src/example/__init__.py | 1 - test-packages/example.different2/setup.py | 1 - test-packages/example.different2/src/example/__init__.py | 1 - test-packages/example.metaoverrides/setup.py | 1 - test-packages/example.metaoverrides/src/example/__init__.py | 1 - test-packages/example.multipleeps/setup.py | 1 - test-packages/example.multipleeps/src/example/__init__.py | 1 - test-packages/example.plone-dash-addon/setup.py | 1 - test-packages/example.plone-dash-addon/src/example/__init__.py | 1 - test-packages/example.ploneaddon/setup.py | 1 - test-packages/example.ploneaddon/src/example/__init__.py | 1 - test-packages/example.ploneintegration/setup.py | 1 - test-packages/example.ploneintegration/src/example/__init__.py | 1 - test-packages/example.zopeaddon/setup.py | 1 - test-packages/example.zopeaddon/src/example/__init__.py | 1 - test-packages/example.zopeintegration/setup.py | 1 - test-packages/example.zopeintegration/src/example/__init__.py | 1 - test-packages/namespaceexample.native/setup.py | 1 - test-packages/namespaceexample.pkgutilns/setup.py | 1 - 26 files changed, 26 deletions(-) diff --git a/setup.py b/setup.py index 8cc0da2..de3dca1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Installer for the plone.autoinclude package.""" from setuptools import setup diff --git a/test-packages/ExampleCamelCase/setup.py b/test-packages/ExampleCamelCase/setup.py index a2d9da3..06f2c80 100644 --- a/test-packages/ExampleCamelCase/setup.py +++ b/test-packages/ExampleCamelCase/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.addon/setup.py b/test-packages/example.addon/setup.py index 5a066a8..cfaa9ee 100644 --- a/test-packages/example.addon/setup.py +++ b/test-packages/example.addon/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.addon/src/example/__init__.py b/test-packages/example.addon/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.addon/src/example/__init__.py +++ b/test-packages/example.addon/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.basetestpackage/setup.py b/test-packages/example.basetestpackage/setup.py index 5c8bef1..3ce1364 100644 --- a/test-packages/example.basetestpackage/setup.py +++ b/test-packages/example.basetestpackage/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.basetestpackage/src/example/__init__.py b/test-packages/example.basetestpackage/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.basetestpackage/src/example/__init__.py +++ b/test-packages/example.basetestpackage/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.different/setup.py b/test-packages/example.different/setup.py index 13a0717..768bd68 100644 --- a/test-packages/example.different/setup.py +++ b/test-packages/example.different/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.different/src/example/__init__.py b/test-packages/example.different/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.different/src/example/__init__.py +++ b/test-packages/example.different/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.different2/setup.py b/test-packages/example.different2/setup.py index b5bbddb..15ce390 100644 --- a/test-packages/example.different2/setup.py +++ b/test-packages/example.different2/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.different2/src/example/__init__.py b/test-packages/example.different2/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.different2/src/example/__init__.py +++ b/test-packages/example.different2/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.metaoverrides/setup.py b/test-packages/example.metaoverrides/setup.py index c0c5622..8d5b510 100644 --- a/test-packages/example.metaoverrides/setup.py +++ b/test-packages/example.metaoverrides/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.metaoverrides/src/example/__init__.py b/test-packages/example.metaoverrides/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.metaoverrides/src/example/__init__.py +++ b/test-packages/example.metaoverrides/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.multipleeps/setup.py b/test-packages/example.multipleeps/setup.py index 2d53c0c..267fdc6 100644 --- a/test-packages/example.multipleeps/setup.py +++ b/test-packages/example.multipleeps/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.multipleeps/src/example/__init__.py b/test-packages/example.multipleeps/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.multipleeps/src/example/__init__.py +++ b/test-packages/example.multipleeps/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.plone-dash-addon/setup.py b/test-packages/example.plone-dash-addon/setup.py index 7f1f867..ad175a6 100644 --- a/test-packages/example.plone-dash-addon/setup.py +++ b/test-packages/example.plone-dash-addon/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.plone-dash-addon/src/example/__init__.py b/test-packages/example.plone-dash-addon/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.plone-dash-addon/src/example/__init__.py +++ b/test-packages/example.plone-dash-addon/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.ploneaddon/setup.py b/test-packages/example.ploneaddon/setup.py index 7a61420..5a4180b 100644 --- a/test-packages/example.ploneaddon/setup.py +++ b/test-packages/example.ploneaddon/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.ploneaddon/src/example/__init__.py b/test-packages/example.ploneaddon/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.ploneaddon/src/example/__init__.py +++ b/test-packages/example.ploneaddon/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.ploneintegration/setup.py b/test-packages/example.ploneintegration/setup.py index 3c8cdff..78cb528 100644 --- a/test-packages/example.ploneintegration/setup.py +++ b/test-packages/example.ploneintegration/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.ploneintegration/src/example/__init__.py b/test-packages/example.ploneintegration/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.ploneintegration/src/example/__init__.py +++ b/test-packages/example.ploneintegration/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.zopeaddon/setup.py b/test-packages/example.zopeaddon/setup.py index 01e9820..109dd9a 100644 --- a/test-packages/example.zopeaddon/setup.py +++ b/test-packages/example.zopeaddon/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.zopeaddon/src/example/__init__.py b/test-packages/example.zopeaddon/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.zopeaddon/src/example/__init__.py +++ b/test-packages/example.zopeaddon/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/example.zopeintegration/setup.py b/test-packages/example.zopeintegration/setup.py index e422e0d..4c587bc 100644 --- a/test-packages/example.zopeintegration/setup.py +++ b/test-packages/example.zopeintegration/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup diff --git a/test-packages/example.zopeintegration/src/example/__init__.py b/test-packages/example.zopeintegration/src/example/__init__.py index 03d08ff..5284146 100644 --- a/test-packages/example.zopeintegration/src/example/__init__.py +++ b/test-packages/example.zopeintegration/src/example/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__("pkg_resources").declare_namespace(__name__) diff --git a/test-packages/namespaceexample.native/setup.py b/test-packages/namespaceexample.native/setup.py index 71db460..9c85ea4 100644 --- a/test-packages/namespaceexample.native/setup.py +++ b/test-packages/namespaceexample.native/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_namespace_packages from setuptools import setup diff --git a/test-packages/namespaceexample.pkgutilns/setup.py b/test-packages/namespaceexample.pkgutilns/setup.py index ac02e65..4a4bfa1 100644 --- a/test-packages/namespaceexample.pkgutilns/setup.py +++ b/test-packages/namespaceexample.pkgutilns/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup From 1991c7799748d58d183929e85a9c4334df64fc58 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 09:55:54 +0100 Subject: [PATCH 07/13] chore: isort --- .../src/example/basetestpackage/package_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-packages/example.basetestpackage/src/example/basetestpackage/package_base.py b/test-packages/example.basetestpackage/src/example/basetestpackage/package_base.py index 090c346..595ba32 100644 --- a/test-packages/example.basetestpackage/src/example/basetestpackage/package_base.py +++ b/test-packages/example.basetestpackage/src/example/basetestpackage/package_base.py @@ -65,8 +65,8 @@ def import_me(self): @unittest.skipIf(not HAS_PLONE_AUTOINCLUDE, "plone.autoinclude missing") def test_load_packages(self): - from plone.autoinclude.loader import load_packages from plone.autoinclude import loader + from plone.autoinclude.loader import load_packages # Empty the known module names, so projects are loaded again. loader._known_module_names = {} From a407809bda960016fabc853d5207d22eb0beef21 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 09:56:05 +0100 Subject: [PATCH 08/13] chore: black --- test-packages/example.basetestpackage/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-packages/example.basetestpackage/setup.py b/test-packages/example.basetestpackage/setup.py index 3ce1364..e3aa68b 100644 --- a/test-packages/example.basetestpackage/setup.py +++ b/test-packages/example.basetestpackage/setup.py @@ -18,6 +18,6 @@ install_requires=[ "setuptools", ], - extras_require={"z3c": ["z3c.autoinclude"]} + extras_require={"z3c": ["z3c.autoinclude"]}, # Note: no entry points here. ) From 9d98dd5e411a9ede7eade227180be2b74583823b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sun, 23 Nov 2025 09:56:36 +0100 Subject: [PATCH 09/13] chore: zpretty --- .../plone.autoinclude-configure.zcml | 10 +++++++-- package-includes/plone.autoinclude-meta.zcml | 21 ++++++++++++++----- .../plone.autoinclude-overrides.zcml | 10 +++++++-- src/plone/autoinclude/meta.zcml | 7 ++++--- .../autoinclude/ploneinclude/configure.zcml | 10 +++++++-- src/plone/autoinclude/ploneinclude/meta.zcml | 21 ++++++++++++++----- .../autoinclude/ploneinclude/overrides.zcml | 10 +++++++-- .../src/ExampleCamelCase/configure.zcml | 3 ++- .../src/example/addon/configure.zcml | 3 +-- .../example.addon/src/example/addon/meta.zcml | 3 ++- .../src/example/addon/overrides.zcml | 3 +-- .../src/example/somethingelse/configure.zcml | 3 +-- .../src/example/somethingelse/meta.zcml | 3 ++- .../src/example/somethingelse/overrides.zcml | 3 +-- .../src/example/somethingelse2/configure.zcml | 3 +-- .../src/example/somethingelse2/meta.zcml | 3 ++- .../src/example/somethingelse2/overrides.zcml | 3 +-- .../src/example/metaoverrides/meta.zcml | 3 ++- .../src/example/metaoverrides/overrides.zcml | 3 +-- .../src/example/multipleeps/configure.zcml | 3 ++- .../plone_dash_addon/browser/configure.zcml | 3 ++- .../example/plone_dash_addon/configure.zcml | 3 ++- .../example/plone_dash_addon/permissions.zcml | 3 +-- .../example/ploneaddon/browser/configure.zcml | 3 ++- .../src/example/ploneaddon/configure.zcml | 3 ++- .../src/example/ploneaddon/permissions.zcml | 3 +-- .../example/ploneintegration/configure.zcml | 8 ++++--- .../src/example/ploneintegration/meta.zcml | 13 +++++++++--- .../example/ploneintegration/overrides.zcml | 3 +-- .../zopeaddon/browser/browser-overrides.zcml | 3 +-- .../example/zopeaddon/browser/configure.zcml | 3 ++- .../src/example/zopeaddon/browser/meta.zcml | 3 ++- .../src/example/zopeaddon/configure.zcml | 3 +-- .../src/example/zopeaddon/meta.zcml | 8 +++++-- .../src/example/zopeaddon/overrides.zcml | 8 ++++--- .../example/zopeintegration/configure.zcml | 8 ++++--- .../src/example/zopeintegration/meta.zcml | 13 +++++++++--- .../example/zopeintegration/overrides.zcml | 8 ++++--- .../native/browser/configure.zcml | 3 ++- .../namespaceexample/native/configure.zcml | 3 ++- .../namespaceexample/native/permissions.zcml | 3 +-- .../pkgutilns/browser/configure.zcml | 3 ++- .../namespaceexample/pkgutilns/configure.zcml | 3 ++- .../pkgutilns/permissions.zcml | 3 +-- 44 files changed, 160 insertions(+), 85 deletions(-) diff --git a/package-includes/plone.autoinclude-configure.zcml b/package-includes/plone.autoinclude-configure.zcml index be587d8..c7b89dd 100644 --- a/package-includes/plone.autoinclude-configure.zcml +++ b/package-includes/plone.autoinclude-configure.zcml @@ -1,4 +1,10 @@ - - + + diff --git a/package-includes/plone.autoinclude-meta.zcml b/package-includes/plone.autoinclude-meta.zcml index 8bb1d10..c448346 100644 --- a/package-includes/plone.autoinclude-meta.zcml +++ b/package-includes/plone.autoinclude-meta.zcml @@ -1,13 +1,24 @@ - + - + - + - + diff --git a/package-includes/plone.autoinclude-overrides.zcml b/package-includes/plone.autoinclude-overrides.zcml index 50a73c3..fc84af4 100644 --- a/package-includes/plone.autoinclude-overrides.zcml +++ b/package-includes/plone.autoinclude-overrides.zcml @@ -1,4 +1,10 @@ - - + + diff --git a/src/plone/autoinclude/meta.zcml b/src/plone/autoinclude/meta.zcml index e3915a2..69f9d49 100644 --- a/src/plone/autoinclude/meta.zcml +++ b/src/plone/autoinclude/meta.zcml @@ -1,18 +1,19 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/src/plone/autoinclude/ploneinclude/configure.zcml b/src/plone/autoinclude/ploneinclude/configure.zcml index be587d8..c7b89dd 100644 --- a/src/plone/autoinclude/ploneinclude/configure.zcml +++ b/src/plone/autoinclude/ploneinclude/configure.zcml @@ -1,4 +1,10 @@ - - + + diff --git a/src/plone/autoinclude/ploneinclude/meta.zcml b/src/plone/autoinclude/ploneinclude/meta.zcml index 8bb1d10..c448346 100644 --- a/src/plone/autoinclude/ploneinclude/meta.zcml +++ b/src/plone/autoinclude/ploneinclude/meta.zcml @@ -1,13 +1,24 @@ - + - + - + - + diff --git a/src/plone/autoinclude/ploneinclude/overrides.zcml b/src/plone/autoinclude/ploneinclude/overrides.zcml index 50a73c3..fc84af4 100644 --- a/src/plone/autoinclude/ploneinclude/overrides.zcml +++ b/src/plone/autoinclude/ploneinclude/overrides.zcml @@ -1,4 +1,10 @@ - - + + diff --git a/test-packages/ExampleCamelCase/src/ExampleCamelCase/configure.zcml b/test-packages/ExampleCamelCase/src/ExampleCamelCase/configure.zcml index ee31a9d..ee689dc 100644 --- a/test-packages/ExampleCamelCase/src/ExampleCamelCase/configure.zcml +++ b/test-packages/ExampleCamelCase/src/ExampleCamelCase/configure.zcml @@ -3,7 +3,8 @@ xmlns:genericsetup="http://namespaces.zope.org/genericsetup" xmlns:i18n="http://namespaces.zope.org/i18n" xmlns:plone="http://namespaces.plone.org/plone" - i18n_domain="ExampleCamelCase"> + i18n_domain="ExampleCamelCase" + > diff --git a/test-packages/example.addon/src/example/addon/configure.zcml b/test-packages/example.addon/src/example/addon/configure.zcml index 45409a8..c986e99 100644 --- a/test-packages/example.addon/src/example/addon/configure.zcml +++ b/test-packages/example.addon/src/example/addon/configure.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.addon/src/example/addon/meta.zcml b/test-packages/example.addon/src/example/addon/meta.zcml index 7d4ad87..1feb952 100644 --- a/test-packages/example.addon/src/example/addon/meta.zcml +++ b/test-packages/example.addon/src/example/addon/meta.zcml @@ -1,6 +1,7 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/test-packages/example.addon/src/example/addon/overrides.zcml b/test-packages/example.addon/src/example/addon/overrides.zcml index ecc933c..b011e54 100644 --- a/test-packages/example.addon/src/example/addon/overrides.zcml +++ b/test-packages/example.addon/src/example/addon/overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.different/src/example/somethingelse/configure.zcml b/test-packages/example.different/src/example/somethingelse/configure.zcml index e7caded..c01e814 100644 --- a/test-packages/example.different/src/example/somethingelse/configure.zcml +++ b/test-packages/example.different/src/example/somethingelse/configure.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.different/src/example/somethingelse/meta.zcml b/test-packages/example.different/src/example/somethingelse/meta.zcml index b8fe20c..08da7f5 100644 --- a/test-packages/example.different/src/example/somethingelse/meta.zcml +++ b/test-packages/example.different/src/example/somethingelse/meta.zcml @@ -1,6 +1,7 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/test-packages/example.different/src/example/somethingelse/overrides.zcml b/test-packages/example.different/src/example/somethingelse/overrides.zcml index 07c24ac..8c1ee84 100644 --- a/test-packages/example.different/src/example/somethingelse/overrides.zcml +++ b/test-packages/example.different/src/example/somethingelse/overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.different2/src/example/somethingelse2/configure.zcml b/test-packages/example.different2/src/example/somethingelse2/configure.zcml index 49f923f..8a85d60 100644 --- a/test-packages/example.different2/src/example/somethingelse2/configure.zcml +++ b/test-packages/example.different2/src/example/somethingelse2/configure.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.different2/src/example/somethingelse2/meta.zcml b/test-packages/example.different2/src/example/somethingelse2/meta.zcml index 2850f44..8201663 100644 --- a/test-packages/example.different2/src/example/somethingelse2/meta.zcml +++ b/test-packages/example.different2/src/example/somethingelse2/meta.zcml @@ -1,6 +1,7 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/test-packages/example.different2/src/example/somethingelse2/overrides.zcml b/test-packages/example.different2/src/example/somethingelse2/overrides.zcml index 95779aa..8a62922 100644 --- a/test-packages/example.different2/src/example/somethingelse2/overrides.zcml +++ b/test-packages/example.different2/src/example/somethingelse2/overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.metaoverrides/src/example/metaoverrides/meta.zcml b/test-packages/example.metaoverrides/src/example/metaoverrides/meta.zcml index 239c621..e40950b 100644 --- a/test-packages/example.metaoverrides/src/example/metaoverrides/meta.zcml +++ b/test-packages/example.metaoverrides/src/example/metaoverrides/meta.zcml @@ -1,6 +1,7 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/test-packages/example.metaoverrides/src/example/metaoverrides/overrides.zcml b/test-packages/example.metaoverrides/src/example/metaoverrides/overrides.zcml index ea8b310..ce3f6f3 100644 --- a/test-packages/example.metaoverrides/src/example/metaoverrides/overrides.zcml +++ b/test-packages/example.metaoverrides/src/example/metaoverrides/overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.multipleeps/src/example/multipleeps/configure.zcml b/test-packages/example.multipleeps/src/example/multipleeps/configure.zcml index 567087b..731afdb 100644 --- a/test-packages/example.multipleeps/src/example/multipleeps/configure.zcml +++ b/test-packages/example.multipleeps/src/example/multipleeps/configure.zcml @@ -3,7 +3,8 @@ xmlns:genericsetup="http://namespaces.zope.org/genericsetup" xmlns:i18n="http://namespaces.zope.org/i18n" xmlns:plone="http://namespaces.plone.org/plone" - i18n_domain="example.multipleeps"> + i18n_domain="example.multipleeps" + > diff --git a/test-packages/example.ploneintegration/src/example/ploneintegration/meta.zcml b/test-packages/example.ploneintegration/src/example/ploneintegration/meta.zcml index 91be203..840d9cc 100644 --- a/test-packages/example.ploneintegration/src/example/ploneintegration/meta.zcml +++ b/test-packages/example.ploneintegration/src/example/ploneintegration/meta.zcml @@ -1,13 +1,20 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > - - + + diff --git a/test-packages/example.ploneintegration/src/example/ploneintegration/overrides.zcml b/test-packages/example.ploneintegration/src/example/ploneintegration/overrides.zcml index d97282c..60c3176 100644 --- a/test-packages/example.ploneintegration/src/example/ploneintegration/overrides.zcml +++ b/test-packages/example.ploneintegration/src/example/ploneintegration/overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/browser-overrides.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/browser-overrides.zcml index 766f2f7..ba2b179 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/browser-overrides.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/browser-overrides.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/configure.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/configure.zcml index bc13ca5..585947e 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/configure.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/configure.zcml @@ -1,5 +1,6 @@ + xmlns:browser="http://namespaces.zope.org/browser" + > diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/meta.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/meta.zcml index 49d1fca..81ecbfa 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/browser/meta.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/browser/meta.zcml @@ -1,6 +1,7 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/configure.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/configure.zcml index abb5805..773c70f 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/configure.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/configure.zcml @@ -1,5 +1,4 @@ - + diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/meta.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/meta.zcml index 21d467b..6cccb48 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/meta.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/meta.zcml @@ -1,10 +1,14 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > - + diff --git a/test-packages/example.zopeaddon/src/example/zopeaddon/overrides.zcml b/test-packages/example.zopeaddon/src/example/zopeaddon/overrides.zcml index 64e3341..983c9ce 100644 --- a/test-packages/example.zopeaddon/src/example/zopeaddon/overrides.zcml +++ b/test-packages/example.zopeaddon/src/example/zopeaddon/overrides.zcml @@ -1,7 +1,9 @@ - + - + diff --git a/test-packages/example.zopeintegration/src/example/zopeintegration/configure.zcml b/test-packages/example.zopeintegration/src/example/zopeintegration/configure.zcml index 050bb84..92468a5 100644 --- a/test-packages/example.zopeintegration/src/example/zopeintegration/configure.zcml +++ b/test-packages/example.zopeintegration/src/example/zopeintegration/configure.zcml @@ -1,7 +1,9 @@ - + - + diff --git a/test-packages/example.zopeintegration/src/example/zopeintegration/meta.zcml b/test-packages/example.zopeintegration/src/example/zopeintegration/meta.zcml index fc5ec15..b509095 100644 --- a/test-packages/example.zopeintegration/src/example/zopeintegration/meta.zcml +++ b/test-packages/example.zopeintegration/src/example/zopeintegration/meta.zcml @@ -1,13 +1,20 @@ + xmlns:meta="http://namespaces.zope.org/meta" + > - - + + diff --git a/test-packages/example.zopeintegration/src/example/zopeintegration/overrides.zcml b/test-packages/example.zopeintegration/src/example/zopeintegration/overrides.zcml index 58c72a3..afa33a7 100644 --- a/test-packages/example.zopeintegration/src/example/zopeintegration/overrides.zcml +++ b/test-packages/example.zopeintegration/src/example/zopeintegration/overrides.zcml @@ -1,7 +1,9 @@ - + - + diff --git a/test-packages/namespaceexample.native/src/namespaceexample/native/browser/configure.zcml b/test-packages/namespaceexample.native/src/namespaceexample/native/browser/configure.zcml index bc13ca5..585947e 100644 --- a/test-packages/namespaceexample.native/src/namespaceexample/native/browser/configure.zcml +++ b/test-packages/namespaceexample.native/src/namespaceexample/native/browser/configure.zcml @@ -1,5 +1,6 @@ + xmlns:browser="http://namespaces.zope.org/browser" + > diff --git a/test-packages/namespaceexample.native/src/namespaceexample/native/configure.zcml b/test-packages/namespaceexample.native/src/namespaceexample/native/configure.zcml index 39b4987..ea7429b 100644 --- a/test-packages/namespaceexample.native/src/namespaceexample/native/configure.zcml +++ b/test-packages/namespaceexample.native/src/namespaceexample/native/configure.zcml @@ -3,7 +3,8 @@ xmlns:genericsetup="http://namespaces.zope.org/genericsetup" xmlns:i18n="http://namespaces.zope.org/i18n" xmlns:plone="http://namespaces.plone.org/plone" - i18n_domain="namespaceexample.native"> + i18n_domain="namespaceexample.native" + >