From ebd88a178dc165bd2c819f6204f53be810582721 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:49:51 +0200 Subject: [PATCH 1/9] Configuring with plone/meta --- .editorconfig | 39 +++++++++++++++++++++++ .meta.toml | 5 +++ .pre-commit-config.yaml | 42 +++++++++++++++++++++++++ news/3b8337e6.internal | 2 ++ pyproject.toml | 42 +++++++++++++++++++++++++ setup.cfg | 23 +++++++++++++- tox.ini | 68 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .meta.toml create mode 100644 .pre-commit-config.yaml create mode 100644 news/3b8337e6.internal create mode 100644 tox.ini diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b4158b8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +# +# 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 + +[{Makefile,.gitmodules}] +# Tab indentation (no size specified, but view as 4 spaces) +indent_style = tab +indent_size = unset +tab_width = unset diff --git a/.meta.toml b/.meta.toml new file mode 100644 index 0000000..eb3c765 --- /dev/null +++ b/.meta.toml @@ -0,0 +1,5 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +[meta] +template = "default" +commit-id = "3b8337e6" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fdafec1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,42 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +ci: + autofix_prs: false + autoupdate_schedule: monthly + +repos: +- repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 + 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.3.0 + hooks: + - id: black +- repo: https://github.com/collective/zpretty + rev: 3.0.3 + hooks: + - id: zpretty +- repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 +- repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + additional_dependencies: + - tomli +- 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 diff --git a/news/3b8337e6.internal b/news/3b8337e6.internal new file mode 100644 index 0000000..c08f539 --- /dev/null +++ b/news/3b8337e6.internal @@ -0,0 +1,2 @@ +Update configuration files. +[plone devs] diff --git a/pyproject.toml b/pyproject.toml index 05b615d..9eb73f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,5 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default [tool.towncrier] filename = "CHANGES.rst" directory = "news/" @@ -18,3 +20,43 @@ showcontent = true directory = "bugfix" name = "Bug fixes:" showcontent = true + +[[tool.towncrier.type]] +directory = "internal" +name = "Internal:" +showcontent = true + +[[tool.towncrier.type]] +directory = "documentation" +name = "Documentation:" +showcontent = true + +[[tool.towncrier.type]] +directory = "tests" +name = "Tests" +showcontent = true + +[tool.isort] +profile = "plone" + +[tool.black] +target-version = ["py38"] + +[tool.dependencychecker] +Zope = [ + # Zope own provided namespaces + 'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates', + 'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils', + 'Zope2', 'webdav', 'zmi', + # Zope dependencies + 'Acquisition', 'DateTime', 'transaction', 'zExceptions', 'ZODB', 'zope.component', + 'zope.configuration', 'zope.container', 'zope.deferredimport', 'zope.event', + 'zope.exceptions', 'zope.globalrequest', 'zope.i18n', 'zope.i18nmessageid', + 'zope.interface', 'zope.lifecycleevent', 'zope.location', 'zope.publisher', + 'zope.schema', 'zope.security', 'zope.site', 'zope.traversing', 'AccessControl', +] +'plone.base' = [ + 'AccessControl', 'Products.BTreeFolder2', 'Products.CMFCore', + 'Products.CMFDynamicViewFTI', 'zope.deprecation', +] +python-dateutil = ['dateutil'] diff --git a/setup.cfg b/setup.cfg index 2a9acf1..0da8f8f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,23 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default [bdist_wheel] -universal = 1 +universal = 0 + +[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, + +[check-manifest] +ignore = + .editorconfig + .meta.toml + .pre-commit-config.yaml + tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..5cd9573 --- /dev/null +++ b/tox.ini @@ -0,0 +1,68 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +[tox] +# We need 4.4.0 for constrain_package_deps. +min_version = 4.4.0 +envlist = + format + lint + test + +[testenv] +allowlist_externals = + sh + +[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 and generate a graph out of them +deps = + z3c.dependencychecker==2.11 + pipdeptree==2.5.1 + graphviz # optional dependency of pipdeptree +commands = + dependencychecker + sh -c 'pipdeptree --exclude setuptools,wheel,pipdeptree,z3c.dependencychecker,zope.interface,zope.component --graph-output svg > dependencies.svg' + +[testenv:test] +usedevelop = true +constrain_package_deps = true +set_env = ROBOT_BROWSER=headlesschrome +deps = + zope.testrunner + -c https://dist.plone.org/release/6.0-dev/constraints.txt +commands = + zope-testrunner --all --test-path={toxinidir} -s plone.app.intid {posargs} +extras = + test + +[testenv:coverage] +usedevelop = true +constrain_package_deps = true +set_env = ROBOT_BROWSER=headlesschrome +deps = + coverage + zope.testrunner + -c https://dist.plone.org/release/6.0-dev/constraints.txt +commands = + coverage run {envbindir}/zope-testrunner --all --test-path={toxinidir} -s plone.app.intid {posargs} + coverage report -m --format markdown +extras = + test From 75bd1f82108a61cf4a458aa2356f087041320f94 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:50:32 +0200 Subject: [PATCH 2/9] chore: pyupgrade --- plone/__init__.py | 1 - plone/app/__init__.py | 1 - plone/app/intid/__init__.py | 1 - plone/app/intid/setuphandlers.py | 3 +-- plone/app/intid/testing.py | 1 - plone/app/intid/tests/test_setup.py | 1 - setup.py | 2 +- 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/plone/__init__.py b/plone/__init__.py index 68c04af..de40ea7 100644 --- a/plone/__init__.py +++ b/plone/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__('pkg_resources').declare_namespace(__name__) diff --git a/plone/app/__init__.py b/plone/app/__init__.py index 68c04af..de40ea7 100644 --- a/plone/app/__init__.py +++ b/plone/app/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- __import__('pkg_resources').declare_namespace(__name__) diff --git a/plone/app/intid/__init__.py b/plone/app/intid/__init__.py index 40a96af..e69de29 100644 --- a/plone/app/intid/__init__.py +++ b/plone/app/intid/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/plone/app/intid/setuphandlers.py b/plone/app/intid/setuphandlers.py index 8b52b3d..917b57f 100644 --- a/plone/app/intid/setuphandlers.py +++ b/plone/app/intid/setuphandlers.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from five.intid.intid import IntIds from five.intid.site import addUtility from Products.CMFCore.interfaces import IContentish @@ -73,5 +72,5 @@ def registerContent(context): return portal = context.getSite() registered, existing = register_all_content_for_intids(portal) - return ('Assigned intids to {0} content objects, {1} objects ' + return ('Assigned intids to {} content objects, {} objects ' 'already had intids.'.format(registered, existing)) diff --git a/plone/app/intid/testing.py b/plone/app/intid/testing.py index a92f96a..fbeebe8 100644 --- a/plone/app/intid/testing.py +++ b/plone/app/intid/testing.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from plone.app.testing import IntegrationTesting from plone.app.testing import PLONE_FIXTURE from plone.app.testing import PloneSandboxLayer diff --git a/plone/app/intid/tests/test_setup.py b/plone/app/intid/tests/test_setup.py index bd9cc69..c17e1b0 100644 --- a/plone/app/intid/tests/test_setup.py +++ b/plone/app/intid/tests/test_setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from plone.app.intid.testing import SETUP_TESTING from plone.app.testing import setRoles from plone.app.testing import TEST_USER_ID diff --git a/setup.py b/setup.py index 63652e4..645c7e1 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ version=version, description="Installation and migration support for five.intid within " "Plone/CMF", - long_description='%s\n%s' % ( + long_description='{}\n{}'.format( open("README.rst").read(), open(os.path.join("CHANGES.rst")).read(), ), From 216ab106aed975c0fdb59aeb9ec3919b16bd279f Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:50:44 +0200 Subject: [PATCH 3/9] chore: isort --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 645c7e1..5169004 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,9 @@ -from setuptools import setup, find_packages +from setuptools import find_packages +from setuptools import setup + import os + version = '1.1.5.dev0' setup( From cd2d910193718910e214f0df57e2563b574439ee Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:51:35 +0200 Subject: [PATCH 4/9] chore: black --- plone/__init__.py | 2 +- plone/app/__init__.py | 2 +- plone/app/intid/setuphandlers.py | 27 ++++++++++----------- plone/app/intid/testing.py | 6 ++--- plone/app/intid/tests/test_setup.py | 24 +++++++++---------- setup.py | 37 ++++++++++++++--------------- 6 files changed, 48 insertions(+), 50 deletions(-) diff --git a/plone/__init__.py b/plone/__init__.py index de40ea7..5284146 100644 --- a/plone/__init__.py +++ b/plone/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__import__("pkg_resources").declare_namespace(__name__) diff --git a/plone/app/__init__.py b/plone/app/__init__.py index de40ea7..5284146 100644 --- a/plone/app/__init__.py +++ b/plone/app/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__import__("pkg_resources").declare_namespace(__name__) diff --git a/plone/app/intid/setuphandlers.py b/plone/app/intid/setuphandlers.py index 917b57f..eb475a3 100644 --- a/plone/app/intid/setuphandlers.py +++ b/plone/app/intid/setuphandlers.py @@ -14,6 +14,7 @@ try: # XXX here we must consider plone.app.multilingual as well! import Products.LinguaPlone + Products.LinguaPlone HAS_LINGUAPLONE = True except ImportError: @@ -23,22 +24,19 @@ def register_all_content_for_intids(portal): """Registers all existing content with the intid utility. This will not be fast.""" - cat = getToolByName(portal, 'portal_catalog', None) + cat = getToolByName(portal, "portal_catalog", None) if cat is None: return intids = getUtility(IIntIds) # Take advantage of paths stored in keyreferences in five.intid to optimize # registration - registered_paths = { - ref.path for ref in intids.ids - if hasattr(ref, 'path') - } + registered_paths = {ref.path for ref in intids.ids if hasattr(ref, "path")} # Count how many objects we register registered = 0 existing = 0 - query = {'object_provides': IContentish.__identifier__} + query = {"object_provides": IContentish.__identifier__} if HAS_LINGUAPLONE: - query['Language'] = 'all' + query["Language"] = "all" for brain in cat(query): if brain.getPath() in registered_paths: existing += 1 @@ -55,22 +53,23 @@ def register_all_content_for_intids(portal): def add_intids(context): - addUtility(context, IIntIds, IntIds, ofs_name='intids', - findroot=False) + addUtility(context, IIntIds, IntIds, ofs_name="intids", findroot=False) def installIntIds(context): - if context.readDataFile('install_intids.txt') is None: + if context.readDataFile("install_intids.txt") is None: return portal = context.getSite() add_intids(portal) - return 'Added intid utility.' + return "Added intid utility." def registerContent(context): - if context.readDataFile('intid_register_content.txt') is None: + if context.readDataFile("intid_register_content.txt") is None: return portal = context.getSite() registered, existing = register_all_content_for_intids(portal) - return ('Assigned intids to {} content objects, {} objects ' - 'already had intids.'.format(registered, existing)) + return ( + "Assigned intids to {} content objects, {} objects " + "already had intids.".format(registered, existing) + ) diff --git a/plone/app/intid/testing.py b/plone/app/intid/testing.py index fbeebe8..757c775 100644 --- a/plone/app/intid/testing.py +++ b/plone/app/intid/testing.py @@ -4,15 +4,15 @@ class IntidSetupFixture(PloneSandboxLayer): - defaultBases = (PLONE_FIXTURE, ) + defaultBases = (PLONE_FIXTURE,) def setUpZope(self, app, configurationContext): # pylint: disable=W0613 import plone.app.intid + self.loadZCML(package=plone.app.intid) SETUP_TESTING = IntegrationTesting( - bases=(IntidSetupFixture(), ), - name='IntidSetupFixture:Setup' + bases=(IntidSetupFixture(),), name="IntidSetupFixture:Setup" ) diff --git a/plone/app/intid/tests/test_setup.py b/plone/app/intid/tests/test_setup.py index c17e1b0..c05d09a 100644 --- a/plone/app/intid/tests/test_setup.py +++ b/plone/app/intid/tests/test_setup.py @@ -13,17 +13,17 @@ class TestSetup(unittest.TestCase): layer = SETUP_TESTING def setUp(self): - self.portal = self.layer['portal'] + self.portal = self.layer["portal"] # XXX below code is only needed if theres no Folder FTI already setup. - typetool = getToolByName(self.portal, 'portal_types') - if 'Folder' not in typetool.objectIds(): + typetool = getToolByName(self.portal, "portal_types") + if "Folder" not in typetool.objectIds(): # XXX Check if this is needed for Plone 5.0! In 4.3 the FTI is # already setup - fti = DexterityFTI('Folder') - typetool._setObject('Folder', fti) + fti = DexterityFTI("Folder") + typetool._setObject("Folder", fti) def tearDown(self): - setRoles(self.portal, TEST_USER_ID, ['Member']) + setRoles(self.portal, TEST_USER_ID, ["Member"]) def test_already_installed(self): """plone.app.intid is a dependency of plone.app.linkintegrity @@ -31,13 +31,13 @@ def test_already_installed(self): This tests if this is true. """ # we create a folder - setRoles(self.portal, TEST_USER_ID, ['Manager']) - folder_id = self.portal.invokeFactory('Folder', 'folder') + setRoles(self.portal, TEST_USER_ID, ["Manager"]) + folder_id = self.portal.invokeFactory("Folder", "folder") folder = self.portal[folder_id] intids = getUtility(IIntIds) self.assertIsNotNone(intids.getId(folder)) - @unittest.skip('p.a.intid is always installed') + @unittest.skip("p.a.intid is always installed") def test_install(self): """When p.app.intid is intalled it registers some utility from zope.intid and five.intid and search in portal_catalog @@ -50,8 +50,8 @@ def test_install(self): from plone.app.testing import applyProfile # we create a folder before the intallation of plone.app.intid - setRoles(self.portal, TEST_USER_ID, ['Manager']) - folder_id = self.portal.invokeFactory('Folder', 'folder') + setRoles(self.portal, TEST_USER_ID, ["Manager"]) + folder_id = self.portal.invokeFactory("Folder", "folder") folder = self.portal[folder_id] # now we install manually the intid utilities @@ -62,5 +62,5 @@ def test_install(self): self.assertRaises(KeyError, intids.getId, folder) # when we install p.app.intid our folder is referencend by intid - applyProfile(self.portal, 'plone.app.intid:default') + applyProfile(self.portal, "plone.app.intid:default") self.assertIsNotNone(intids.getId(folder)) diff --git a/setup.py b/setup.py index 5169004..49b9eff 100644 --- a/setup.py +++ b/setup.py @@ -4,14 +4,13 @@ import os -version = '1.1.5.dev0' +version = "1.1.5.dev0" setup( - name='plone.app.intid', + name="plone.app.intid", version=version, - description="Installation and migration support for five.intid within " - "Plone/CMF", - long_description='{}\n{}'.format( + description="Installation and migration support for five.intid within " "Plone/CMF", + long_description="{}\n{}".format( open("README.rst").read(), open(os.path.join("CHANGES.rst")).read(), ), @@ -33,26 +32,26 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ], - keywords='plone zope five intid', - author='Alec Mitchell', - author_email='apm13@columbia.edu', - url='https://github.com/plone/plone.app.intid', - license='GPL', + keywords="plone zope five intid", + author="Alec Mitchell", + author_email="apm13@columbia.edu", + url="https://github.com/plone/plone.app.intid", + license="GPL", packages=find_packages(), - namespace_packages=['plone', 'plone.app'], + namespace_packages=["plone", "plone.app"], include_package_data=True, zip_safe=False, install_requires=[ - 'setuptools', - 'zope.intid', - 'zope.lifecycleevent', - 'five.intid>=1.0', - 'Products.CMFCore', + "setuptools", + "zope.intid", + "zope.lifecycleevent", + "five.intid>=1.0", + "Products.CMFCore", ], extras_require={ - 'test': [ - 'plone.app.testing', - 'plone.dexterity', + "test": [ + "plone.app.testing", + "plone.dexterity", ], }, entry_points=""" From b481d85b5fd68d45fa7a43fe187dfb0777f7d860 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:51:49 +0200 Subject: [PATCH 5/9] chore: zpretty --- plone/app/intid/configure.zcml | 19 ++++--- plone/app/intid/profiles.zcml | 53 ++++++++++--------- plone/app/intid/profiles/default/metadata.xml | 2 +- 3 files changed, 42 insertions(+), 32 deletions(-) diff --git a/plone/app/intid/configure.zcml b/plone/app/intid/configure.zcml index bddfd9e..15fcf4e 100644 --- a/plone/app/intid/configure.zcml +++ b/plone/app/intid/configure.zcml @@ -2,27 +2,34 @@ xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:zcml="http://namespaces.zope.org/zcml" - i18n_domain="plone.app.intid"> + i18n_domain="plone.app.intid" + > - - + + diff --git a/plone/app/intid/profiles.zcml b/plone/app/intid/profiles.zcml index 0874b27..9e2db0b 100644 --- a/plone/app/intid/profiles.zcml +++ b/plone/app/intid/profiles.zcml @@ -1,32 +1,35 @@ + i18n_domain="plone.app.intid" + > - + - - - + + + - - - - + + + + - \ No newline at end of file + diff --git a/plone/app/intid/profiles/default/metadata.xml b/plone/app/intid/profiles/default/metadata.xml index cf4492a..08b37b6 100644 --- a/plone/app/intid/profiles/default/metadata.xml +++ b/plone/app/intid/profiles/default/metadata.xml @@ -1,4 +1,4 @@ - + 1 From 92d20126ca05b400ae49bcbb37f5337b2eeed591 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:53:16 +0200 Subject: [PATCH 6/9] feat: codespell --- CHANGES.rst | 2 +- plone/app/intid/tests/test_setup.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ec35148..2c169a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -112,7 +112,7 @@ Fixes: 1.0b2 2010-02-22 ------------------- -- fixed dependecy of import profiles +- fixed dependency of import profiles [naro] 1.0b1 2010-02-07 diff --git a/plone/app/intid/tests/test_setup.py b/plone/app/intid/tests/test_setup.py index c05d09a..a1aba00 100644 --- a/plone/app/intid/tests/test_setup.py +++ b/plone/app/intid/tests/test_setup.py @@ -14,7 +14,7 @@ class TestSetup(unittest.TestCase): def setUp(self): self.portal = self.layer["portal"] - # XXX below code is only needed if theres no Folder FTI already setup. + # XXX below code is only needed if there's no Folder FTI already setup. typetool = getToolByName(self.portal, "portal_types") if "Folder" not in typetool.objectIds(): # XXX Check if this is needed for Plone 5.0! In 4.3 the FTI is @@ -39,7 +39,7 @@ def test_already_installed(self): @unittest.skip("p.a.intid is always installed") def test_install(self): - """When p.app.intid is intalled it registers some utility + """When p.app.intid is installed it registers some utility from zope.intid and five.intid and search in portal_catalog all contents in order to register them in these utilities. @@ -49,7 +49,7 @@ def test_install(self): from plone.app.intid.setuphandlers import add_intids from plone.app.testing import applyProfile - # we create a folder before the intallation of plone.app.intid + # we create a folder before the installation of plone.app.intid setRoles(self.portal, TEST_USER_ID, ["Manager"]) folder_id = self.portal.invokeFactory("Folder", "folder") folder = self.portal[folder_id] From 4b8c7bd4337a81bcd040d57e35a79d6c63e13561 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:54:08 +0200 Subject: [PATCH 7/9] feat: pyroma --- setup.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 49b9eff..b35390e 100644 --- a/setup.py +++ b/setup.py @@ -17,16 +17,10 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Framework :: Plone", - "Framework :: Plone :: 5.0", - "Framework :: Plone :: 5.1", - "Framework :: Plone :: 5.2", "Framework :: Plone :: 6.0", "Framework :: Plone :: Core", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -41,6 +35,7 @@ namespace_packages=["plone", "plone.app"], include_package_data=True, zip_safe=False, + python_requires=">=3.8", install_requires=[ "setuptools", "zope.intid", From a4844231836f1147f8708cc9f8ddc9e59caaaa4d Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:56:09 +0200 Subject: [PATCH 8/9] cleanup: drop LinguaPlone references --- plone/app/intid/setuphandlers.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/plone/app/intid/setuphandlers.py b/plone/app/intid/setuphandlers.py index eb475a3..e3cde20 100644 --- a/plone/app/intid/setuphandlers.py +++ b/plone/app/intid/setuphandlers.py @@ -11,16 +11,6 @@ logger = logging.getLogger(__name__) -try: - # XXX here we must consider plone.app.multilingual as well! - import Products.LinguaPlone - - Products.LinguaPlone - HAS_LINGUAPLONE = True -except ImportError: - HAS_LINGUAPLONE = False - - def register_all_content_for_intids(portal): """Registers all existing content with the intid utility. This will not be fast.""" @@ -35,8 +25,6 @@ def register_all_content_for_intids(portal): registered = 0 existing = 0 query = {"object_provides": IContentish.__identifier__} - if HAS_LINGUAPLONE: - query["Language"] = "all" for brain in cat(query): if brain.getPath() in registered_paths: existing += 1 From 541569201c1a1e5413d049d17bf0bcb3c609671b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 7 Apr 2023 16:57:05 +0200 Subject: [PATCH 9/9] feat: declare dependencies --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index b35390e..1142730 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ "zope.lifecycleevent", "five.intid>=1.0", "Products.CMFCore", + "Products.GenericSetup", ], extras_require={ "test": [