From d940ad84d6ff8e305181c08e00e3a456f64b5eea Mon Sep 17 00:00:00 2001 From: hvelarde Date: Wed, 30 May 2018 17:08:17 -0300 Subject: [PATCH] Remove upgrade steps for old, unsupported releases Version 2.2 is now 3-years old and we are not going to maintain it. --- CHANGES.rst | 7 ++++ sc/social/like/setuphandlers.py | 6 --- sc/social/like/upgrades/configure.zcml | 5 --- sc/social/like/upgrades/v2000/__init__.py | 1 - sc/social/like/upgrades/v2000/configure.zcml | 27 ------------- sc/social/like/upgrades/v2000/handler.py | 10 ----- .../upgrades/v2000/profile/propertiestool.xml | 17 -------- sc/social/like/upgrades/v3000/__init__.py | 1 - sc/social/like/upgrades/v3000/configure.zcml | 32 --------------- sc/social/like/upgrades/v3000/handler.py | 26 ------------ .../upgrades/v3000/profile/propertiestool.xml | 9 ----- sc/social/like/upgrades/v3010/__init__.py | 1 - sc/social/like/upgrades/v3010/configure.zcml | 40 ------------------- sc/social/like/upgrades/v3010/handler.py | 28 ------------- .../upgrades/v3010/profile/propertiestool.xml | 8 ---- 15 files changed, 7 insertions(+), 211 deletions(-) delete mode 100644 sc/social/like/upgrades/v2000/__init__.py delete mode 100644 sc/social/like/upgrades/v2000/configure.zcml delete mode 100644 sc/social/like/upgrades/v2000/handler.py delete mode 100644 sc/social/like/upgrades/v2000/profile/propertiestool.xml delete mode 100644 sc/social/like/upgrades/v3000/__init__.py delete mode 100644 sc/social/like/upgrades/v3000/configure.zcml delete mode 100644 sc/social/like/upgrades/v3000/handler.py delete mode 100644 sc/social/like/upgrades/v3000/profile/propertiestool.xml delete mode 100644 sc/social/like/upgrades/v3010/__init__.py delete mode 100644 sc/social/like/upgrades/v3010/configure.zcml delete mode 100644 sc/social/like/upgrades/v3010/handler.py delete mode 100644 sc/social/like/upgrades/v3010/profile/propertiestool.xml diff --git a/CHANGES.rst b/CHANGES.rst index e9b16e7b..5fa18ec6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,13 @@ There's a frood who really knows where his towel is. 2.13b4 (unreleased) ^^^^^^^^^^^^^^^^^^^ +.. Warning:: + Upgrading from versions below 2.3 is no longer supported. + You must upgrade at least to version 2.3 before upgrading to this release. + +- Remove upgrade steps for old, unsupported releases. + [hvelarde] + - Fix upgrade step when there are no plone.app.tiles recrods. [erral] diff --git a/sc/social/like/setuphandlers.py b/sc/social/like/setuphandlers.py index 272b0746..3eb40d5a 100644 --- a/sc/social/like/setuphandlers.py +++ b/sc/social/like/setuphandlers.py @@ -9,9 +9,6 @@ class HiddenProducts(object): def getNonInstallableProducts(self): return [ - 'sc.social.like.upgrades.v2000', - 'sc.social.like.upgrades.v3000', - 'sc.social.like.upgrades.v3010', 'sc.social.like.upgrades.v3020', ] @@ -22,8 +19,5 @@ class HiddenProfiles(object): def getNonInstallableProfiles(self): return [ u'sc.social.like:uninstall', - u'sc.social.like.upgrades.v2000:default', - u'sc.social.like.upgrades.v3000:default', - u'sc.social.like.upgrades.v3010:default', u'sc.social.like.upgrades.v3020:default', ] diff --git a/sc/social/like/upgrades/configure.zcml b/sc/social/like/upgrades/configure.zcml index db93eec5..149579ed 100644 --- a/sc/social/like/upgrades/configure.zcml +++ b/sc/social/like/upgrades/configure.zcml @@ -1,8 +1,4 @@ - - - - @@ -14,5 +10,4 @@ - diff --git a/sc/social/like/upgrades/v2000/__init__.py b/sc/social/like/upgrades/v2000/__init__.py deleted file mode 100644 index 380474e0..00000000 --- a/sc/social/like/upgrades/v2000/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# -*- coding:utf-8 -*- diff --git a/sc/social/like/upgrades/v2000/configure.zcml b/sc/social/like/upgrades/v2000/configure.zcml deleted file mode 100644 index ced7c434..00000000 --- a/sc/social/like/upgrades/v2000/configure.zcml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/sc/social/like/upgrades/v2000/handler.py b/sc/social/like/upgrades/v2000/handler.py deleted file mode 100644 index fe09aec3..00000000 --- a/sc/social/like/upgrades/v2000/handler.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding:utf-8 -*- -from plone.app.upgrade.utils import loadMigrationProfile -from sc.social.like.logger import logger - - -def apply_profile(context): - """ Apply upgrade profile """ - profile = 'profile-sc.social.like.upgrades.v2000:default' - loadMigrationProfile(context, profile) - logger.info('Applied upgrade profile to version 2000') diff --git a/sc/social/like/upgrades/v2000/profile/propertiestool.xml b/sc/social/like/upgrades/v2000/profile/propertiestool.xml deleted file mode 100644 index f352bb75..00000000 --- a/sc/social/like/upgrades/v2000/profile/propertiestool.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - horizontal - True - - True - - - False - - diff --git a/sc/social/like/upgrades/v3000/__init__.py b/sc/social/like/upgrades/v3000/__init__.py deleted file mode 100644 index 380474e0..00000000 --- a/sc/social/like/upgrades/v3000/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# -*- coding:utf-8 -*- diff --git a/sc/social/like/upgrades/v3000/configure.zcml b/sc/social/like/upgrades/v3000/configure.zcml deleted file mode 100644 index 62187e03..00000000 --- a/sc/social/like/upgrades/v3000/configure.zcml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/sc/social/like/upgrades/v3000/handler.py b/sc/social/like/upgrades/v3000/handler.py deleted file mode 100644 index 24d9625d..00000000 --- a/sc/social/like/upgrades/v3000/handler.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding:utf-8 -*- -from plone.app.upgrade.utils import loadMigrationProfile -from Products.CMFCore.utils import getToolByName -from sc.social.like.logger import logger - - -def apply_profile(context): - """ Apply upgrade profile """ - profile = 'profile-sc.social.like.upgrades.v3000:default' - loadMigrationProfile(context, profile) - logger.info('Applied upgrade profile to version 3000') - - -def update_plugins(context): - """ Apply upgrade profile """ - pp = getToolByName(context, 'portal_properties') - sheet = getattr(pp, 'sc_social_likes_properties', None) - plugins_enabled = [] - if sheet.twitter_enabled: - plugins_enabled.append('Twitter') - if sheet.fb_enabled: - plugins_enabled.append('Facebook') - if sheet.gp_enabled: - plugins_enabled.append('Google+') - sheet.manage_changeProperties(plugins_enabled=plugins_enabled) - logger.info('Update enabled plugins list') diff --git a/sc/social/like/upgrades/v3000/profile/propertiestool.xml b/sc/social/like/upgrades/v3000/profile/propertiestool.xml deleted file mode 100644 index 6ec6c609..00000000 --- a/sc/social/like/upgrades/v3000/profile/propertiestool.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/sc/social/like/upgrades/v3010/__init__.py b/sc/social/like/upgrades/v3010/__init__.py deleted file mode 100644 index 380474e0..00000000 --- a/sc/social/like/upgrades/v3010/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# -*- coding:utf-8 -*- diff --git a/sc/social/like/upgrades/v3010/configure.zcml b/sc/social/like/upgrades/v3010/configure.zcml deleted file mode 100644 index 98b9b04b..00000000 --- a/sc/social/like/upgrades/v3010/configure.zcml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/sc/social/like/upgrades/v3010/handler.py b/sc/social/like/upgrades/v3010/handler.py deleted file mode 100644 index bc3f7d20..00000000 --- a/sc/social/like/upgrades/v3010/handler.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding:utf-8 -*- -from plone.app.upgrade.utils import loadMigrationProfile -from Products.CMFCore.utils import getToolByName -from sc.social.like.logger import logger - - -def cook_css_registry(context): - """ Apply upgrade profile """ - css_registry = getToolByName(context, 'portal_css') - css_registry.cookResources() - logger.info('CSS registry refreshed') - - -def apply_profile(context): - """ Apply upgrade profile """ - profile = 'profile-sc.social.like.upgrades.v3010:default' - loadMigrationProfile(context, profile) - logger.info('Applied upgrade profile to version 3010') - - -def remove_actionicons(context): - """ Remove registration from deprecated actionicons tool""" - portal_actionicons = getToolByName(context, 'portal_actionicons') - try: - portal_actionicons.removeActionIcon('controlpanel', 'sociallikes') - logger.info('Removed deprecated registration on portal_actionicons tool') - except KeyError: - pass diff --git a/sc/social/like/upgrades/v3010/profile/propertiestool.xml b/sc/social/like/upgrades/v3010/profile/propertiestool.xml deleted file mode 100644 index fe5d594e..00000000 --- a/sc/social/like/upgrades/v3010/profile/propertiestool.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -