From 6eab14d15479e6b902e079af2ccd9ce691a9ac4a Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Mon, 4 Nov 2024 16:07:31 +0100 Subject: [PATCH 1/7] Do not use eea.api.taxonomy because it is deprecated --- CHANGES.rst | 4 +++- setup.py | 3 ++- src/design/plone/contenttypes/overrides.zcml | 4 ++++ src/design/plone/contenttypes/patches/configure.zcml | 9 --------- src/design/plone/contenttypes/patches/patches.py | 10 ---------- .../plone/contenttypes/profiles/default/metadata.xml | 2 +- src/design/plone/contenttypes/testing.py | 3 --- src/design/plone/contenttypes/upgrades/configure.zcml | 7 +++++++ src/design/plone/contenttypes/upgrades/to_730x.py | 6 ++++++ 9 files changed, 23 insertions(+), 25 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 14450c1b..2cf8e48d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,9 @@ Changelog 6.2.23 (unreleased) ------------------- -- Nothing changed yet. +- Do not use eea.api.taxonomy because it is deprecated. + We still leave it as dependency to not broke old sites before uninstall (made by an upgrade-step). It need to be removed later. + [cekk] 6.2.22 (2024-10-30) diff --git a/setup.py b/setup.py index 36424ee0..162f3e9e 100644 --- a/setup.py +++ b/setup.py @@ -65,9 +65,10 @@ "redturtle.bandi", "z3c.unconfigure", "plone.restapi", - "eea.api.taxonomy", + "collective.taxonomy", "openpyxl", "collective.volto.enhancedlinks", + "eea.api.taxonomy", # BBB to be removed. Remove also the unconfigure in overrides.zcml ], extras_require={ "test": [ diff --git a/src/design/plone/contenttypes/overrides.zcml b/src/design/plone/contenttypes/overrides.zcml index ffeb130d..9061e5c8 100644 --- a/src/design/plone/contenttypes/overrides.zcml +++ b/src/design/plone/contenttypes/overrides.zcml @@ -23,6 +23,10 @@ Products.ZCatalog.interfaces.IZCatalog" name="SearchableText" /> + + + + diff --git a/src/design/plone/contenttypes/patches/configure.zcml b/src/design/plone/contenttypes/patches/configure.zcml index 09da7b3f..8258e0e8 100644 --- a/src/design/plone/contenttypes/patches/configure.zcml +++ b/src/design/plone/contenttypes/patches/configure.zcml @@ -6,13 +6,4 @@ - - diff --git a/src/design/plone/contenttypes/patches/patches.py b/src/design/plone/contenttypes/patches/patches.py index beec5fcd..40a96afc 100644 --- a/src/design/plone/contenttypes/patches/patches.py +++ b/src/design/plone/contenttypes/patches/patches.py @@ -1,11 +1 @@ # -*- coding: utf-8 -*- -from collective.taxonomy.vocabulary import Vocabulary - - -def eea_api_taxonomy_taxonomy_call(self, context): - if not self.data: - return Vocabulary(self.name, {}, {}, {}, 2) - - request = getattr(context, "REQUEST", None) - language = self.getCurrentLanguage(request) - return self.makeVocabulary(language) diff --git a/src/design/plone/contenttypes/profiles/default/metadata.xml b/src/design/plone/contenttypes/profiles/default/metadata.xml index ac3691e3..3cdf2fe5 100644 --- a/src/design/plone/contenttypes/profiles/default/metadata.xml +++ b/src/design/plone/contenttypes/profiles/default/metadata.xml @@ -5,9 +5,9 @@ profile-redturtle.bandi:default profile-collective.venue:default profile-redturtle.volto:default - profile-eea.api.taxonomy:default profile-collective.z3cform.datagridfield:default profile-design.plone.contenttypes:taxonomy profile-collective.volto.enhancedlinks:default + profile-collective.taxonomy:default diff --git a/src/design/plone/contenttypes/testing.py b/src/design/plone/contenttypes/testing.py index 55166081..eaaff1ad 100644 --- a/src/design/plone/contenttypes/testing.py +++ b/src/design/plone/contenttypes/testing.py @@ -16,7 +16,6 @@ import collective.volto.enhancedlinks import collective.z3cform.datagridfield import design.plone.contenttypes -import eea.api.taxonomy import kitconcept.seo import plone.app.caching import plone.formwidget.geolocation @@ -43,7 +42,6 @@ def setUpZope(self, app, configurationContext): ) self.loadZCML(package=redturtle.bandi) self.loadZCML(package=kitconcept.seo) - self.loadZCML(package=eea.api.taxonomy) self.loadZCML(package=collective.taxonomy) self.loadZCML(package=collective.z3cform.datagridfield) @@ -75,7 +73,6 @@ def setUpZope(self, app, configurationContext): self.loadZCML(package=collective.volto.enhancedlinks) self.loadZCML(package=design.plone.contenttypes, context=configurationContext) self.loadZCML(package=plone.formwidget.geolocation) - self.loadZCML(package=eea.api.taxonomy) self.loadZCML(package=collective.taxonomy) self.loadZCML(package=collective.z3cform.datagridfield) xmlconfig.file( diff --git a/src/design/plone/contenttypes/upgrades/configure.zcml b/src/design/plone/contenttypes/upgrades/configure.zcml index 05268fd6..7f46fce5 100644 --- a/src/design/plone/contenttypes/upgrades/configure.zcml +++ b/src/design/plone/contenttypes/upgrades/configure.zcml @@ -912,4 +912,11 @@ destination="7308" handler=".to_730x.to_7308" /> + diff --git a/src/design/plone/contenttypes/upgrades/to_730x.py b/src/design/plone/contenttypes/upgrades/to_730x.py index ed67eefb..33b2443c 100644 --- a/src/design/plone/contenttypes/upgrades/to_730x.py +++ b/src/design/plone/contenttypes/upgrades/to_730x.py @@ -158,3 +158,9 @@ def to_7308(context): if i % 15 == 0: logger.info("Progress: {}/{}".format(i, tot)) brain.getObject().reindexObject(idxs=["effectivestart"]) + + +def to_7309(context): + ps = api.portal.get_tool(name="portal_setup") + ps.runAllImportStepsFromProfile("profile-eea.api.taxonomy:uninstall") + ps.unsetLastVersionForProfile("eea.api.taxonomy:default") From ccf63e015b893197842f70292a250ebfa963b533 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Thu, 7 Nov 2024 23:23:06 +0100 Subject: [PATCH 2/7] fix tests --- buildout.cfg | 2 +- test-5.2.x-py27.cfg | 10 ------ test-5.2.x.cfg | 15 --------- test-6.0.x.cfg | 6 +--- test_plone60.cfg | 77 --------------------------------------------- 5 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 test-5.2.x-py27.cfg delete mode 100644 test-5.2.x.cfg delete mode 100644 test_plone60.cfg diff --git a/buildout.cfg b/buildout.cfg index d7db0388..c2b4e9b3 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -2,4 +2,4 @@ # use this extend one of the buildout configuration: extends = - test_plone60.cfg + test-6.0.x.cfg diff --git a/test-5.2.x-py27.cfg b/test-5.2.x-py27.cfg deleted file mode 100644 index e2b0ab9a..00000000 --- a/test-5.2.x-py27.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[buildout] -extends = test-5.2.x.cfg - -[versions] -# python 2 -bravado = 11.0.3 -bravado-core = 5.17.0 -typing-extensions = 3.10.0.2 -jsonref = 0.2 -webcolors = 1.10 diff --git a/test-5.2.x.cfg b/test-5.2.x.cfg deleted file mode 100644 index 16c7fced..00000000 --- a/test-5.2.x.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -extends = - https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-5.2.x.cfg - https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg - base.cfg - -[instance] -eggs += - collective.dexteritytextindexer - -[versions] -collective.z3cform.datagridfield = 2.0 -# FIXME: se si rimuove il profilo di caching da qui (perchè c'è?), si può togliere anche questo pin -# 3.0.0a14 e successive richiedono plone.base che è solo su plone 6 -plone.app.caching = 3.0.0a13 diff --git a/test-6.0.x.cfg b/test-6.0.x.cfg index 19dfec09..e7455034 100644 --- a/test-6.0.x.cfg +++ b/test-6.0.x.cfg @@ -2,11 +2,7 @@ extends = https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg + https://raw.githubusercontent.com/RedTurtle/iocomune-backend/main/versions.cfg base.cfg [versions] -zc.buildout = >=3.0.0rc3 -pip = 22.2.2 -setuptools = 65.3.0 -collective.z3cform.datagridfield = >=3.0.0 -collective.contentrules.mailfromfield = >=1.1.0 diff --git a/test_plone60.cfg b/test_plone60.cfg deleted file mode 100644 index 60840265..00000000 --- a/test_plone60.cfg +++ /dev/null @@ -1,77 +0,0 @@ -[buildout] - -extends = - https://raw.github.com/collective/buildout.plonetest/master/test-6.0.x.cfg - https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg - https://raw.githubusercontent.com/RedTurtle/iocomune-backend/main/versions.cfg - base.cfg - -update-versions-file = test_plone60.cfg - -[versions] - -# Added by buildout at 2023-03-03 11:30:23.040213 -bleach = 3.3.1 -build = 0.10.0 -coverage = 7.1.0 -createcoverage = 1.5 -flake8 = 6.0.0 -flake8-coding = 1.3.2 -flake8-debugger = 4.1.2 -flake8-print = 5.0.0 -i18ndude = 5.5.0 -keyring = 22.0.1 -lml = 0.1.0 -mccabe = 0.7.0 -pkginfo = 1.8.3 -plone.recipe.codeanalysis = 3.0.1 -pyexcel-ezodf = 0.3.4 -pyexcel-io = 0.6.6 -pyexcel-ods3 = 0.6.1 -pyflakes = 3.0.1 -pyproject-hooks = 1.0.0 -readme-renderer = 28.0 -requests-toolbelt = 0.10.1 -rfc3986 = 2.0.0 -tqdm = 4.64.1 -twine = 3.3.0 -zest.releaser = 6.22.2 -zpretty = 2.4.1 - -# Required by: -# plone.recipe.codeanalysis==3.0.1 -check-manifest = 0.49 - -# Required by: -# zest.releaser==6.22.2 -colorama = 0.4.6 - -# Required by: -# flake8-debugger==4.1.2 -# flake8-print==5.0.0 -pycodestyle = 2.10.0 - -# Required by: -# check-manifest==0.49 -tomli = 2.0.1 - -# Required by: -# bleach==3.3.1 -webencodings = 0.5.1 - -# Added by buildout at 2023-03-22 23:05:32.974075 - -# Added by buildout at 2024-04-19 12:51:02.457936 - -# Required by: -# Plone==6.0.10 -# collective.volto.blocksfield==2.0.0 -# redturtle.bandi==1.4.3 - -# Added by buildout at 2024-05-02 17:26:10.555785 - -# Required by: -# Plone==6.0.11 -# collective.volto.blocksfield==2.0.0 -# design.plone.contenttypes==6.2.9.dev0 -plone.restapi = 9.6.1 From 052648549d77766de901df25154421f6976613fa Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Thu, 7 Nov 2024 23:32:02 +0100 Subject: [PATCH 3/7] fix tests --- base.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/base.cfg b/base.cfg index 4bd7f462..0c5a0399 100644 --- a/base.cfg +++ b/base.cfg @@ -137,6 +137,5 @@ eggs = createcoverage [versions] # Don't use a released version of design.plone.contenttypes design.plone.contenttypes = -plone.restapi = [sources] From 4f58c90fa7b65b95d3a2cdb9b10d78bc8c9c70fb Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Fri, 29 Nov 2024 17:31:07 +0100 Subject: [PATCH 4/7] completely remove eea.api.taxonomy deps --- setup.py | 3 +-- src/design/plone/contenttypes/configure.zcml | 7 +++++++ src/design/plone/contenttypes/overrides.zcml | 3 --- .../plone/contenttypes/profiles/default/metadata.xml | 2 +- .../profiles/remove_eea_api_taxonomy/browserlayer.xml | 4 ++++ src/design/plone/contenttypes/upgrades/to_730x.py | 4 +++- test-6.0.x.cfg | 1 + 7 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 src/design/plone/contenttypes/profiles/remove_eea_api_taxonomy/browserlayer.xml diff --git a/setup.py b/setup.py index 162f3e9e..0b4ee34a 100644 --- a/setup.py +++ b/setup.py @@ -65,10 +65,9 @@ "redturtle.bandi", "z3c.unconfigure", "plone.restapi", - "collective.taxonomy", + "collective.taxonomy>=3.1", "openpyxl", "collective.volto.enhancedlinks", - "eea.api.taxonomy", # BBB to be removed. Remove also the unconfigure in overrides.zcml ], extras_require={ "test": [ diff --git a/src/design/plone/contenttypes/configure.zcml b/src/design/plone/contenttypes/configure.zcml index 715b8049..8c7b867b 100644 --- a/src/design/plone/contenttypes/configure.zcml +++ b/src/design/plone/contenttypes/configure.zcml @@ -65,6 +65,13 @@ directory="profiles/fix_syndication" /> + - - - diff --git a/src/design/plone/contenttypes/profiles/default/metadata.xml b/src/design/plone/contenttypes/profiles/default/metadata.xml index 3cdf2fe5..58edf1c4 100644 --- a/src/design/plone/contenttypes/profiles/default/metadata.xml +++ b/src/design/plone/contenttypes/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 7308 + 7309 profile-redturtle.bandi:default profile-collective.venue:default diff --git a/src/design/plone/contenttypes/profiles/remove_eea_api_taxonomy/browserlayer.xml b/src/design/plone/contenttypes/profiles/remove_eea_api_taxonomy/browserlayer.xml new file mode 100644 index 00000000..ab11dda3 --- /dev/null +++ b/src/design/plone/contenttypes/profiles/remove_eea_api_taxonomy/browserlayer.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/design/plone/contenttypes/upgrades/to_730x.py b/src/design/plone/contenttypes/upgrades/to_730x.py index 33b2443c..492b273c 100644 --- a/src/design/plone/contenttypes/upgrades/to_730x.py +++ b/src/design/plone/contenttypes/upgrades/to_730x.py @@ -162,5 +162,7 @@ def to_7308(context): def to_7309(context): ps = api.portal.get_tool(name="portal_setup") - ps.runAllImportStepsFromProfile("profile-eea.api.taxonomy:uninstall") + ps.runAllImportStepsFromProfile( + "profile-design.plone.contenttypes:remove_eea_api_taxonomy" + ) ps.unsetLastVersionForProfile("eea.api.taxonomy:default") diff --git a/test-6.0.x.cfg b/test-6.0.x.cfg index e7455034..0060e5fa 100644 --- a/test-6.0.x.cfg +++ b/test-6.0.x.cfg @@ -6,3 +6,4 @@ extends = base.cfg [versions] +collective.taxonomy = From 47d2f2ab70b3beb9e4da1cdf3fc16981295605e3 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 3 Dec 2024 09:51:22 +0100 Subject: [PATCH 5/7] update changelog --- CHANGES.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 388d1366..399d7916 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,6 @@ Changelog ------------------- - Do not use eea.api.taxonomy because it is deprecated. - We still leave it as dependency to not broke old sites before uninstall (made by an upgrade-step). It need to be removed later. [cekk] From 1a7a1a5a650d310d7b9e5aa077a1e1f98e1ea259 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 3 Dec 2024 10:37:44 +0100 Subject: [PATCH 6/7] fix buildout versions --- test-6.0.x.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-6.0.x.cfg b/test-6.0.x.cfg index 5a178710..ad22417a 100644 --- a/test-6.0.x.cfg +++ b/test-6.0.x.cfg @@ -6,4 +6,4 @@ extends = base.cfg [versions] -collective.taxonomy = \ No newline at end of file +collective.taxonomy = 2.2.0 From 4c30b775a0805a8fbc4cd13d3a86a1f943225739 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 3 Dec 2024 10:42:50 +0100 Subject: [PATCH 7/7] fix buildout versions --- test-6.0.x.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-6.0.x.cfg b/test-6.0.x.cfg index ad22417a..ea2094c9 100644 --- a/test-6.0.x.cfg +++ b/test-6.0.x.cfg @@ -6,4 +6,4 @@ extends = base.cfg [versions] -collective.taxonomy = 2.2.0 +collective.taxonomy = 3.1.5