diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..8ae05aaa
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,54 @@
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/default
+# See the inline comments on how to expand/tweak this configuration file
+#
+# EditorConfig Configuration file, for more details see:
+# http://EditorConfig.org
+# EditorConfig is a convention description, that could be interpreted
+# by multiple editors to enforce common coding conventions for specific
+# file types
+
+# top-most EditorConfig file:
+# Will ignore other EditorConfig files in Home directory or upper tree level.
+root = true
+
+
+[*] # For All Files
+# Unix-style newlines with a newline ending every file
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+# Set default charset
+charset = utf-8
+# Indent style default
+indent_style = space
+# Max Line Length - a hard line wrap, should be disabled
+max_line_length = off
+
+[*.{py,cfg,ini}]
+# 4 space indentation
+indent_size = 4
+
+[*.{yml,zpt,pt,dtml,zcml}]
+# 2 space indentation
+indent_size = 2
+
+[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss,html}] # 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 00000000..7ef4f64d
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,22 @@
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/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/workflows/meta.yml b/.github/workflows/meta.yml
new file mode 100644
index 00000000..aa2345cf
--- /dev/null
+++ b/.github/workflows/meta.yml
@@ -0,0 +1,70 @@
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/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@main
+ test:
+ uses: plone/meta/.github/workflows/test.yml@main
+ coverage:
+ uses: plone/meta/.github/workflows/coverage.yml@main
+ dependencies:
+ uses: plone/meta/.github/workflows/dependencies.yml@main
+ release_ready:
+ uses: plone/meta/.github/workflows/release_ready.yml@main
+
+# TODO: enable the circular dependencies check once the circular
+# dependency with plone.app.dexterity is fixed.
+# See https://github.com/plone/Products.CMFPlone/issues/3858
+
+##
+# To modify the list of default jobs being created add in .meta.toml:
+# [github]
+# jobs = [
+# "qa",
+# "test",
+# "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/.gitignore b/.gitignore
index d12b524c..503e47c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,55 @@
-/develop-eggs
-/eggs
-/fake-eggs
-/bin
-/parts
-/downloads
-/var
-/build
-/dist
-/local.cfg
-/*.egg-info
-/.installed.cfg
-/.mr.developer.cfg
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/default
+# See the inline comments on how to expand/tweak this configuration file
+# python related
+*.egg-info
*.pyc
-/.Python
-/include
-/lib
-/src/*
+*.pyo
+
+# translation related
*.mo
-/.coverage
+
+# tools related
+build/
+.coverage
+.*project
coverage.xml
-zptlint.log
-.DS_Store
+dist/
+docs/_build
+__pycache__/
+.tox
+.vscode/
+node_modules/
+
+# venv / buildout related
+bin/
+develop-eggs/
+eggs/
+.eggs/
+etc/
+.installed.cfg
+include/
+lib/
+lib64
+.mr.developer.cfg
+parts/
+pyvenv.cfg
+var/
+
+# 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
new file mode 100644
index 00000000..d5d5bc47
--- /dev/null
+++ b/.meta.toml
@@ -0,0 +1,26 @@
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/default
+# See the inline comments on how to expand/tweak this configuration file
+[meta]
+template = "default"
+commit-id = "68cda6e4"
+
+[github]
+jobs = [
+ "qa",
+ "test",
+ "coverage",
+ "dependencies",
+ "release_ready",
+ ]
+
+[pre_commit]
+zpretty_extra_lines = """
+ exclude: plone/app/content/browser/contents/templates
+"""
+i18ndude_extra_lines = """
+ exclude: plone/app/content/browser/contents
+"""
+
+[pyproject]
+dependencies_ignores = "['tus', ]"
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..fac51902
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,96 @@
+# Generated from:
+# https://github.com/plone/meta/tree/master/config/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.14.0
+ hooks:
+ - id: pyupgrade
+ args: [--py38-plus]
+- repo: https://github.com/pycqa/isort
+ rev: 5.12.0
+ hooks:
+ - id: isort
+- repo: https://github.com/psf/black
+ rev: 23.9.1
+ hooks:
+ - id: black
+- repo: https://github.com/collective/zpretty
+ rev: 3.1.0
+ hooks:
+ - id: zpretty
+ exclude: plone/app/content/browser/contents/templates
+
+##
+# Add extra configuration options in .meta.toml:
+# [pre_commit]
+# zpretty_extra_lines = """
+# _your own configuration lines_
+# """
+##
+- repo: https://github.com/PyCQA/flake8
+ rev: 6.1.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.2.6
+ 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.49"
+ hooks:
+ - id: check-manifest
+- repo: https://github.com/regebro/pyroma
+ rev: "4.2"
+ hooks:
+ - id: pyroma
+- repo: https://github.com/mgedmin/check-python-versions
+ rev: "0.21.3"
+ hooks:
+ - id: check-python-versions
+ args: ['--only', 'setup.py,pyproject.toml']
+- repo: https://github.com/collective/i18ndude
+ rev: "6.1.0"
+ hooks:
+ - id: i18ndude
+ exclude: plone/app/content/browser/contents
+
+
+##
+# 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/CHANGES.rst b/CHANGES.rst
index 531f0cee..ae998b28 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,6 +8,26 @@ Changelog
.. towncrier release notes start
+4.0.3 (2023-10-25)
+------------------
+
+Bug fixes:
+
+
+- Fix cut / delete for content with lock created by current user. [laulaz] (#266)
+- Fixed inapproriate ``sort()`` in ``folderfactories.py``. [ajung] (#268)
+
+
+Internal:
+
+
+- Update configuration files.
+ [plone devs] (5cdbd962)
+- chore: move tests from `plone.app.dexterity`
+
+ To avoid a circular dependency between the two of them. (#3858)
+
+
4.0.2 (2023-06-16)
------------------
@@ -210,7 +230,7 @@ Bug fixes:
Bug fixes:
-- Call fileUpload view explict with @@ to avoid possible plone.rest clashes.
+- Call fileUpload view explicit with @@ to avoid possible plone.rest clashes.
[jensens] (#225)
@@ -552,7 +572,7 @@ Bug fixes:
[thet]
- Fix issue where some actions (copy, delete, paste) on contents view did not
- work if there were any private (innaccessible for the current user) levels the
+ work if there were any private (inaccessible for the current user) levels the
current path
[datakurre]
@@ -908,7 +928,7 @@ Fixes:
- When clicking cancel on the delete_confirmation got to the view_url.
[ale-rt]
-- Fix deletion of objects with unicode charaters in the title.
+- Fix deletion of objects with unicode characters in the title.
[cillianderoiste]
@@ -988,7 +1008,7 @@ Fixes:
- Translate folder contents add menu
[vangheem]
-- use same columns title in results and in displayed colums configuration
+- use same columns title in results and in displayed columns configuration
[vincent]
diff --git a/news/266.bugfix b/news/266.bugfix
deleted file mode 100644
index 571aae7d..00000000
--- a/news/266.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix cut / delete for content with lock created by current user. [laulaz]
diff --git a/news/268.bugfix b/news/268.bugfix
deleted file mode 100644
index 4b5d893d..00000000
--- a/news/268.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-- fixed inapproriate sort() in folderfactories.py [ajung]
diff --git a/news/3858.internal b/news/3858.internal
deleted file mode 100644
index 0f724014..00000000
--- a/news/3858.internal
+++ /dev/null
@@ -1,3 +0,0 @@
-chore: move tests from `plone.app.dexterity`
-
-To avoid a circular dependency between the two of them.
diff --git a/plone/app/content/browser/actions.py b/plone/app/content/browser/actions.py
index b939b341..6f16e535 100644
--- a/plone/app/content/browser/actions.py
+++ b/plone/app/content/browser/actions.py
@@ -38,7 +38,6 @@ def is_locked(self):
class DeleteConfirmationForm(form.Form, LockingBase):
-
fields = field.Fields()
template = ViewPageTemplateFile("templates/delete_confirmation.pt")
enableCSRFProtection = True
@@ -140,7 +139,6 @@ class IRenameForm(Interface):
class RenameForm(form.Form):
-
fields = field.Fields(IRenameForm)
template = ViewPageTemplateFile("templates/object_rename.pt")
enableCSRFProtection = True
diff --git a/plone/app/content/browser/configure.zcml b/plone/app/content/browser/configure.zcml
index b69207b9..f2762e98 100644
--- a/plone/app/content/browser/configure.zcml
+++ b/plone/app/content/browser/configure.zcml
@@ -1,204 +1,213 @@