From 6b2baf9a270f7a88baaf843c092e0a7eb19bea6f Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 11 Mar 2026 21:49:09 +0100 Subject: [PATCH 1/3] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 2 +- .meta.toml | 2 +- .pre-commit-config.yaml | 6 +++--- news/+meta.internal | 2 ++ pyproject.toml | 4 ++-- tox.ini | 4 ++++ 6 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 news/+meta.internal diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index 05872b5..8b2da2b 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 c8166b5..b10245f 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.2.1" +commit-id = "2.5.1" [tox] test_matrix = {"6.2" = ["*"]} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26c3c6f..2e8482b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,13 +10,13 @@ repos: 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.12.0 + rev: 26.1.0 hooks: - id: black - repo: https://github.com/collective/zpretty 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 1bf1eb0..bb340be 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/" @@ -60,7 +60,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 ad6ebe2..5aeb395 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 @@ -18,6 +19,7 @@ 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] @@ -62,6 +64,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 @@ -130,6 +133,7 @@ extras = ## # Add extra configuration options in .meta.toml: # [tox] +# skip_test_extra = true # test_extras = """ # tests # widgets From bee7c12f88e9705226c647f869a9efb823878322 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 11 Mar 2026 21:49:40 +0100 Subject: [PATCH 2/3] chore: isort --- setup.py | 1 - src/plone/formwidget/namedfile/__init__.py | 1 - src/plone/formwidget/namedfile/datamanager.py | 1 - src/plone/formwidget/namedfile/utils.py | 1 - 4 files changed, 4 deletions(-) diff --git a/setup.py b/setup.py index d2f94fe..e6c2745 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ from setuptools import setup - version = "4.0.0a2.dev0" setup( diff --git a/src/plone/formwidget/namedfile/__init__.py b/src/plone/formwidget/namedfile/__init__.py index 52e5c2d..f3164b4 100644 --- a/src/plone/formwidget/namedfile/__init__.py +++ b/src/plone/formwidget/namedfile/__init__.py @@ -4,5 +4,4 @@ from plone.formwidget.namedfile.widget import NamedImageWidget # noqa from zope.i18nmessageid import MessageFactory - _ = MessageFactory("plone") diff --git a/src/plone/formwidget/namedfile/datamanager.py b/src/plone/formwidget/namedfile/datamanager.py index a6353ca..b0c516c 100644 --- a/src/plone/formwidget/namedfile/datamanager.py +++ b/src/plone/formwidget/namedfile/datamanager.py @@ -14,7 +14,6 @@ import os import transaction - ANNOTATION_KEY = "plone.formwidget.namedfile.scale" ENVIRONMENT_KEY = "PLONE_SCALE_GENERATE_ON_SAVE" diff --git a/src/plone/formwidget/namedfile/utils.py b/src/plone/formwidget/namedfile/utils.py index a28da97..de4eddd 100644 --- a/src/plone/formwidget/namedfile/utils.py +++ b/src/plone/formwidget/namedfile/utils.py @@ -12,7 +12,6 @@ from zope.interface import Interface from ZPublisher.HTTPRequest import FileUpload - FILE_UPLOAD_MAP_KEY = "file_upload_map" FILE_UPLOAD_EXPIRATION_TIME = 30 * 60 # seconds FALLBACK_DATE = datetime(2000, 2, 2) From c757553e83fd3b0cd243b368b1cd8f3d69060e78 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 11 Mar 2026 21:49:51 +0100 Subject: [PATCH 3/3] chore: black --- src/plone/formwidget/namedfile/interfaces.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plone/formwidget/namedfile/interfaces.py b/src/plone/formwidget/namedfile/interfaces.py index d94f988..8c744ef 100644 --- a/src/plone/formwidget/namedfile/interfaces.py +++ b/src/plone/formwidget/namedfile/interfaces.py @@ -30,13 +30,11 @@ class IFileUploadTemporaryStorage(Interface): To be used to not need to re-upload files after form submission errors. """ - upload_map = Attribute( - """ + upload_map = Attribute(""" Mapping for temporary uploads. Key is a uuid4.hex value. The default storage is the annotation storage of the poral root. - """ - ) + """) def cleanup(): """Removes stale temporary uploads from the upload storage"""