From 100502e5dae7d21d2b8d19e4896ae3e8d70b1b38 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:59:31 +0000 Subject: [PATCH 1/5] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d60054bd..da56023f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,7 +44,7 @@ repos: # """ ## - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell additional_dependencies: From 442a1d8c0d7b53dafcab271be468e27552dedc53 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Thu, 6 Jun 2024 22:07:08 +0200 Subject: [PATCH 2/5] Configuring with plone/meta --- .editorconfig | 6 ++++-- .github/workflows/meta.yml | 7 +++++++ .meta.toml | 2 +- dependabot.yml | 11 +++++++++++ pyproject.toml | 13 ++++++++++--- tox.ini | 12 ++++++++---- 6 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 dependabot.yml diff --git a/.editorconfig b/.editorconfig index fa698fb1..5b3c112c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,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 @@ -33,7 +34,8 @@ indent_size = 4 # 2 space indentation indent_size = 2 -[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] # Frontend development +[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] +# Frontend development # 2 space indentation indent_size = 2 max_line_length = 80 diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index b8edec02..c9848bcb 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -57,6 +57,13 @@ jobs: # os_dependencies = "git libxml2 libxslt" ## +## +# To test against a specific matrix of python versions +# when running tests jobs, add in .meta.toml: +# [github] +# py_versions = "['3.12', '3.11']" +## + ## # Specify additional jobs in .meta.toml: diff --git a/.meta.toml b/.meta.toml index 9a7ab5ce..bcd1aff6 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 = "6e36bcc4" +commit-id = "a89af8f2" [pyproject] codespell_ignores = "oder,ist,crate" diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 00000000..bbd3ab05 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,11 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/config/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/pyproject.toml b/pyproject.toml index 7f6cc189..35e47cbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ target-version = ["py38"] ## [tool.codespell] -ignore-words-list = "discreet,oder,ist,crate" +ignore-words-list = "discreet,assertin,oder,ist,crate" skip = "*.po," ## # Add extra configuration options in .meta.toml: @@ -134,13 +134,15 @@ ignore-packages = ['ZServer', 'plone.app.event', 'Products.CMFPlone',] [tool.check-manifest] ignore = [ ".editorconfig", + ".flake8", ".meta.toml", ".pre-commit-config.yaml", - "tox.ini", - ".flake8", + "dependabot.yml", "mx.ini", + "tox.ini", ] + ## # Add extra configuration options in .meta.toml: # [pyproject] @@ -148,6 +150,11 @@ ignore = [ # "*.map.js", # "*.pyc", # """ +# check_manifest_extra_lines = """ +# ignore-bad-ideas = [ +# "some/test/file/PKG-INFO", +# ] +# """ ## diff --git a/tox.ini b/tox.ini index 5cc50c67..e46028c0 100644 --- a/tox.ini +++ b/tox.ini @@ -109,7 +109,7 @@ set_env = deps = zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt - + ## # Specify additional deps in .meta.toml: # [tox] @@ -153,12 +153,13 @@ deps = coverage zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt - + commands = rfbrowser init coverage run --branch --source plone.app.contenttypes {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.contenttypes {posargs} coverage report -m --format markdown coverage xml + coverage html extras = test @@ -171,7 +172,7 @@ deps = build towncrier -c https://dist.plone.org/release/6.0-dev/constraints.txt - + commands = # fake version to not have to install the package # we build the change log as news entries might break @@ -184,6 +185,9 @@ commands = 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 = ## @@ -199,7 +203,7 @@ deps = pipdeptree pipforester -c https://dist.plone.org/release/6.0-dev/constraints.txt - + commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 11488f50797c51ca810e474cc65f4789b2ef296b Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Thu, 6 Jun 2024 23:16:26 +0200 Subject: [PATCH 3/5] No longer set portal_properties.site_properties.visible_ids on site creation. The ``portal_properties`` tools is deprecated, ``visible_ids`` was not set as real property, and usage of ``visible_ids`` was largely removed in Plone 5.0 already. You already can no longer set ``visible ids`` in the Editing control panel, nor in the member preferences. The only remaining use for ``visible_ids``, if set to true, was to show the page ids on the 'select default page' form. --- news/125.bugfix | 5 +++++ .../browser/templates/full_view_item.pt | 1 - plone/app/contenttypes/setuphandlers.py | 21 ------------------- setup.py | 1 - 4 files changed, 5 insertions(+), 23 deletions(-) create mode 100644 news/125.bugfix diff --git a/news/125.bugfix b/news/125.bugfix new file mode 100644 index 00000000..22b6b61c --- /dev/null +++ b/news/125.bugfix @@ -0,0 +1,5 @@ +No longer set ``portal_properties.site_properties.visible_ids`` on site creation. +The ``portal_properties`` tools is deprecated, ``visible_ids`` was not set as real property, and usage of ``visible_ids`` was largely removed in Plone 5.0 already. +You already can no longer set ``visible ids`` in the Editing control panel, nor in the member preferences. +The only remaining use for ``visible_ids``, if set to true, was to show the page ids on the 'select default page' form. +[maurits] diff --git a/plone/app/contenttypes/browser/templates/full_view_item.pt b/plone/app/contenttypes/browser/templates/full_view_item.pt index 208207d2..e17e5790 100644 --- a/plone/app/contenttypes/browser/templates/full_view_item.pt +++ b/plone/app/contenttypes/browser/templates/full_view_item.pt @@ -57,7 +57,6 @@ dummy python: plone_layout.mark_view(view); portal_url portal_state/portal_url; checkPermission nocall: context/portal_membership/checkPermission; - site_properties context/portal_properties/site_properties; ">
diff --git a/plone/app/contenttypes/setuphandlers.py b/plone/app/contenttypes/setuphandlers.py index f1b88145..d312d862 100644 --- a/plone/app/contenttypes/setuphandlers.py +++ b/plone/app/contenttypes/setuphandlers.py @@ -9,7 +9,6 @@ from plone.base.utils import unrestricted_construct_instance from plone.dexterity.fti import IDexterityFTI from plone.dexterity.utils import createContent -from plone.i18n.normalizer.interfaces import IURLNormalizer from plone.portlets.interfaces import ILocalPortletAssignmentManager from plone.portlets.interfaces import IPortletManager from plone.registry.interfaces import IRegistry @@ -131,25 +130,6 @@ def _setup_calendar(portal, locale): portal_calendar.firstweekday = first -def _setup_visible_ids(portal, target_language, locale): - portal_properties = getToolByName(portal, "portal_properties") - site_properties = portal_properties.site_properties - - # See if we have a URL normalizer - normalizer = queryUtility(IURLNormalizer, name=target_language) - if normalizer is None: - normalizer = queryUtility(IURLNormalizer) - - # If we get a script other than Latn we enable visible_ids - if locale.id.script is not None: - if locale.id.script.lower() != "latn": - site_properties.visible_ids = True - - # If we have a normalizer it is safe to disable the visible ids - if normalizer is not None: - site_properties.visible_ids = False - - def _setup_constrains(container, allowed_types): behavior = ISelectableConstrainTypes(container) behavior.setConstrainTypesMode(constrains.ENABLED) @@ -361,7 +341,6 @@ def setup_various(context): portal = getSite() target_language, is_combined_language, locale = _get_locales_info(portal) _setup_calendar(portal, locale) - _setup_visible_ids(portal, target_language, locale) # install explicitly the plone.app.event if HAS_EVENT: diff --git a/setup.py b/setup.py index 510d4eca..e0953ea7 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,6 @@ def read(*rnames): "plone.autoform", "plone.event", "plone.folder", - "plone.i18n", "plone.indexer", "plone.memoize", "plone.portlets", From 0517b471faa5d80d66e21faeeeaf16d1d4047f71 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Fri, 7 Jun 2024 18:05:08 +0200 Subject: [PATCH 4/5] Preparing release 3.0.9 [ci skip] --- CHANGES.rst | 13 +++++++++++++ news/125.bugfix | 5 ----- setup.py | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 news/125.bugfix diff --git a/CHANGES.rst b/CHANGES.rst index 75369dfc..cfccebc6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,19 @@ Changelog .. towncrier release notes start +3.0.9 (2024-06-07) +------------------ + +Bug fixes: + + +- No longer set ``portal_properties.site_properties.visible_ids`` on site creation. + The ``portal_properties`` tools is deprecated, ``visible_ids`` was not set as real property, and usage of ``visible_ids`` was largely removed in Plone 5.0 already. + You already can no longer set ``visible ids`` in the Editing control panel, nor in the member preferences. + The only remaining use for ``visible_ids``, if set to true, was to show the page ids on the 'select default page' form. + [maurits] (#125) + + 3.0.8 (2024-05-30) ------------------ diff --git a/news/125.bugfix b/news/125.bugfix deleted file mode 100644 index 22b6b61c..00000000 --- a/news/125.bugfix +++ /dev/null @@ -1,5 +0,0 @@ -No longer set ``portal_properties.site_properties.visible_ids`` on site creation. -The ``portal_properties`` tools is deprecated, ``visible_ids`` was not set as real property, and usage of ``visible_ids`` was largely removed in Plone 5.0 already. -You already can no longer set ``visible ids`` in the Editing control panel, nor in the member preferences. -The only remaining use for ``visible_ids``, if set to true, was to show the page ids on the 'select default page' form. -[maurits] diff --git a/setup.py b/setup.py index e0953ea7..63a7431f 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os -version = "3.0.9.dev0" +version = "3.0.9" def read(*rnames): From 45f5665523ee01d9c01c9b841958b7d4442b412f Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Fri, 7 Jun 2024 18:05:26 +0200 Subject: [PATCH 5/5] Back to development: 3.0.10 [ci skip] --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 63a7431f..43f94e02 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os -version = "3.0.9" +version = "3.0.10.dev0" def read(*rnames):