Skip to content

Commit c3c7ec9

Browse files
Merge pull request #3189 from plone/maurits/no-qi
Remove quick installer code [6.0]
2 parents 6d73df3 + 85d97e3 commit c3c7ec9

File tree

16 files changed

+16
-257
lines changed

16 files changed

+16
-257
lines changed

Products/CMFPlone/MigrationTool.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ class Addon:
2727
"""A profile or product.
2828
2929
This is meant for core Plone packages, especially packages that
30-
are marked as not installable (INonInstallable from
31-
CMFQuickInstallerTool). These are packages that an admin should
30+
are marked as not installable. These are packages that an admin should
3231
not activate, deactivate or upgrade manually, but that should be
3332
handled by Plone.
3433

Products/CMFPlone/QuickInstallerTool.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

Products/CMFPlone/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def initialize(context):
142142
from Products.CMFPlone import TypesTool
143143
from Products.CMFPlone import CatalogTool
144144
from Products.CMFPlone import SkinsTool
145-
from Products.CMFPlone import QuickInstallerTool
146145
from Products.CMFPlone import TranslationServiceTool
147146

148147
tools = (
@@ -158,7 +157,6 @@ def initialize(context):
158157
TypesTool.TypesTool,
159158
CatalogTool.CatalogTool,
160159
SkinsTool.SkinsTool,
161-
QuickInstallerTool.QuickInstallerTool,
162160
TranslationServiceTool.TranslationServiceTool,
163161
)
164162

Products/CMFPlone/controlpanel/browser/configure.zcml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,10 @@
210210
template="usergroups_groupdetails.pt"
211211
/>
212212

213-
<!-- Quick Installer -->
213+
<!-- Add-ons control panel -->
214214

215215
<!-- First register an easy to remember browser view '@@installer'.
216-
Maybe we want this as utility instead. It is intended as
217-
replacement for any use of the portal_quickinstaller. -->
216+
It is the replacement for any use of the portal_quickinstaller. -->
218217
<browser:page
219218
for="*"
220219
name="installer"

Products/CMFPlone/controlpanel/browser/quickinstaller.py

Lines changed: 2 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from Products.CMFCore.utils import getToolByName
22
from Products.CMFPlone import PloneMessageFactory as _
33
from Products.CMFPlone.interfaces import INonInstallable
4-
from Products.CMFQuickInstallerTool.interfaces import INonInstallable as \
5-
QINonInstallable
64
from Products.Five.browser import BrowserView
75
from Products.GenericSetup import EXTENSION
86
from Products.GenericSetup.tool import UNKNOWN
@@ -12,7 +10,7 @@
1210
import logging
1311
import pkg_resources
1412
import transaction
15-
import warnings
13+
1614

1715
logger = logging.getLogger('Plone')
1816

@@ -26,18 +24,6 @@ def __init__(self, *args, **kwargs):
2624
self.ps = getToolByName(self.context, 'portal_setup')
2725
self.errors = {}
2826

29-
def listInstallableProducts(self, skipInstalled=True):
30-
warnings.warn(
31-
'listInstallableProducts is no longer supported since Plone 5.1. '
32-
'It will be removed in Plone 6.0.',
33-
DeprecationWarning)
34-
35-
def listInstalledProducts(self, skipInstalled=True):
36-
warnings.warn(
37-
'listInstalledProducts is no longer supported since Plone 5.1. '
38-
'It will be removed in Plone 6.0.',
39-
DeprecationWarning)
40-
4127
def is_profile_installed(self, profile_id):
4228
return self.ps.getLastVersionForProfile(profile_id) != UNKNOWN
4329

@@ -47,25 +33,8 @@ def is_product_installed(self, product_id):
4733
return False
4834
return self.is_profile_installed(profile['id'])
4935

50-
def isProductInstalled(self, product_name):
51-
warnings.warn(
52-
'isProductInstalled is deprecated since Plone 5.1. '
53-
'It will be removed in Plone 6.0. '
54-
'Use is_product_installed instead.',
55-
DeprecationWarning)
56-
return self.is_product_installed(product_name)
57-
58-
def notifyInstalled(self, productname, **kwargs):
59-
warnings.warn(
60-
'notifyInstalled is no longer supported since Plone 5.1. '
61-
'It will be removed in Plone 6.0.',
62-
DeprecationWarning)
63-
6436
def _install_profile_info(self, product_id):
6537
"""List extension profile infos of a given product.
66-
67-
From CMFQuickInstallerTool/QuickInstallerTool.py
68-
_install_profile_info
6938
"""
7039
profiles = self.ps.listProfileInfo()
7140
# We are only interested in extension profiles for the product.
@@ -82,9 +51,6 @@ def _install_profile_info(self, product_id):
8251
def get_install_profiles(self, product_id):
8352
"""List all installer profile ids of the given name.
8453
85-
From CMFQuickInstallerTool/QuickInstallerTool.py
86-
getInstallProfiles
87-
8854
TODO Might be superfluous.
8955
"""
9056
return [prof['id'] for prof in self._install_profile_info(product_id)]
@@ -153,9 +119,6 @@ def _get_profile(self, product_id, name, strict=True, allow_hidden=False):
153119
def get_install_profile(self, product_id, allow_hidden=False):
154120
"""Return the default install profile.
155121
156-
From CMFQuickInstallerTool/QuickInstallerTool.py
157-
getInstallProfile
158-
159122
:param product_id: id of product/package
160123
:type product_id: string
161124
:param allow_hidden: Allow getting otherwise hidden profile.
@@ -177,28 +140,9 @@ def get_uninstall_profile(self, product_id):
177140
return self._get_profile(
178141
product_id, 'uninstall', strict=True, allow_hidden=True)
179142

180-
def isProductInstallable(self, productname):
181-
warnings.warn(
182-
'isProductInstallable is deprecated since Plone 5.1. '
183-
'It will be removed in Plone 6.0. '
184-
'Use is_product_installable instead.',
185-
DeprecationWarning)
186-
return self.is_product_installable(productname)
187-
188-
def isProductAvailable(self, productname):
189-
warnings.warn(
190-
'isProductAvailable is deprecated since Plone 5.1. '
191-
'It will be removed in Plone 6.0. '
192-
'Use is_product_installable instead.',
193-
DeprecationWarning)
194-
return self.is_product_installable(productname)
195-
196143
def is_product_installable(self, product_id, allow_hidden=False):
197144
"""Does a product have an installation profile?
198145
199-
From CMFQuickInstallerTool/QuickInstallerTool.py
200-
isProductInstallable (and the deprecated isProductAvailable)
201-
202146
:param allow_hidden: Allow installing otherwise hidden products.
203147
In the UI this will be False, but you can set it to True in
204148
for example a call from plone.app.upgrade where you want to
@@ -217,14 +161,6 @@ def is_product_installable(self, product_id, allow_hidden=False):
217161
not_installable.extend(gnip())
218162
if product_id in not_installable:
219163
return False
220-
# BBB. For backwards compatibility, we try the INonInstallable
221-
# from the old QI as well.
222-
not_installable = []
223-
utils = getAllUtilitiesRegisteredFor(QINonInstallable)
224-
for util in utils:
225-
not_installable.extend(util.getNonInstallableProducts())
226-
if product_id in not_installable:
227-
return False
228164

229165
profile = self.get_install_profile(
230166
product_id, allow_hidden=allow_hidden)
@@ -271,31 +207,8 @@ def is_product_installable(self, product_id, allow_hidden=False):
271207
return False
272208
return True
273209

274-
def getProductFile(self, productname, fname='readme.txt'):
275-
warnings.warn(
276-
'getProductFile is no longer supported since Plone 5.1. '
277-
'It will be removed in Plone 6.0.',
278-
DeprecationWarning)
279-
280-
def getProductReadme(self, productname):
281-
warnings.warn(
282-
'getProductReadme is no longer supported since Plone 5.1. '
283-
'It will be removed in Plone 6.0.',
284-
DeprecationWarning)
285-
286-
def getProductVersion(self, productname):
287-
warnings.warn(
288-
'getProductVersion is deprecated since Plone 5.1. '
289-
'It will be removed in Plone 6.0. '
290-
'Use get_product_version instead.',
291-
DeprecationWarning)
292-
293210
def get_product_version(self, product_id):
294211
"""Return the version of the product (package).
295-
296-
From CMFQuickInstallerTool/QuickInstallerTool
297-
getProductVersion
298-
That implementation used to fall back to getting the version.txt.
299212
"""
300213
try:
301214
dist = pkg_resources.get_distribution(product_id)
@@ -311,8 +224,6 @@ def get_latest_upgrade_step(self, profile_id):
311224
312225
If anything errors out then go back to "old way" by returning
313226
'unknown'.
314-
315-
From CMFPlone/QuickInstallerTool.py getLatestUpgradeStep
316227
"""
317228
profile_version = UNKNOWN
318229
try:
@@ -331,8 +242,6 @@ def upgrade_info(self, product_id):
331242
This is a dict with among others two booleans values, stating if
332243
an upgrade is required and available.
333244
334-
From CMFPlone/QuickInstaller.py upgradeInfo
335-
336245
:param product_id: id of product/package
337246
:type product_id: string
338247
:returns: dictionary with info about product
@@ -368,24 +277,6 @@ def upgrade_info(self, product_id):
368277
newVersion=profile_version,
369278
)
370279

371-
def reinstallProducts(self, products, **kwargs):
372-
"""Reinstalls a list of products, the main difference to
373-
uninstall/install is that it does not remove portal objects
374-
created during install (e.g. tools, etc.)
375-
"""
376-
warnings.warn(
377-
'reinstallProducts is no longer supported since Plone 5.1. '
378-
'It will be removed in Plone 6.0.',
379-
DeprecationWarning)
380-
381-
def upgradeProduct(self, pid):
382-
warnings.warn(
383-
'upgradeProduct is deprecated since Plone 5.1. '
384-
'It will be removed in Plone 6.0. '
385-
'Use upgrade_product instead.',
386-
DeprecationWarning)
387-
return self.upgrade_product(pid)
388-
389280
def upgrade_product(self, product_id):
390281
"""Run the upgrade steps for a product.
391282
@@ -398,34 +289,9 @@ def upgrade_product(self, product_id):
398289
self.ps.upgradeProfile(profile['id'])
399290
return True
400291

401-
def installProducts(self, products=None, **kwargs):
402-
warnings.warn(
403-
'installProducts is deprecated since Plone 5.1. '
404-
'It will be removed in Plone 6.0. '
405-
'Use install_product with a single product instead. '
406-
'All keyword arguments are ignored.',
407-
DeprecationWarning)
408-
if products is None:
409-
products = []
410-
for product_id in products:
411-
self.install_product(product_id)
412-
413-
def installProduct(self, product_name, **kwargs):
414-
"""Deprecated install product.
415-
"""
416-
warnings.warn(
417-
'installProduct is deprecated since Plone 5.1. '
418-
'It will be removed in Plone 6.0. '
419-
'Use install_product instead. '
420-
'All keyword arguments are ignored.',
421-
DeprecationWarning)
422-
return self.install_product(product_name)
423-
424292
def install_product(self, product_id, allow_hidden=False):
425293
"""Install a product by name.
426294
427-
From CMFQuickInstallerTool/QuickInstallerTool.py installProduct
428-
429295
:param product_id: id of product/package
430296
:type product_id: string
431297
:param allow_hidden: Allow installing otherwise hidden products.
@@ -461,20 +327,6 @@ def install_product(self, product_id, allow_hidden=False):
461327
# No problems encountered.
462328
return True
463329

464-
def uninstallProducts(self, products=None, **kwargs):
465-
"""Uninstall a list of products.
466-
"""
467-
warnings.warn(
468-
'uninstallProducts is deprecated since Plone 5.1. '
469-
'It will be removed in Plone 6.0. '
470-
'Use uninstall_product with a single product instead. '
471-
'All keyword arguments are ignored.',
472-
DeprecationWarning)
473-
if products is None:
474-
products = []
475-
for product_id in products:
476-
self.uninstall_product(product_id)
477-
478330
def uninstall_product(self, product_id):
479331
"""Uninstall a product by name.
480332
@@ -592,8 +444,7 @@ def marshall_addons(self):
592444

593445
def get_addons(self, apply_filter=None, product_name=None):
594446
"""
595-
100% based on generic setup profiles now. Kinda.
596-
For products magic, use the zope quickinstaller I guess.
447+
100% based on generic setup profiles now.
597448
598449
@filter:= 'installed': only products that are installed and not hidden
599450
'upgrades': only products with upgrades

Products/CMFPlone/factory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def getNonInstallableProfiles(self):
8181
'Products.CMFFormController:CMFFormController',
8282
'Products.CMFPlone:dependencies',
8383
'Products.CMFPlone:testfixture',
84-
'Products.CMFQuickInstallerTool:CMFQuickInstallerTool',
8584
'Products.NuPlone:uninstall',
8685
'Products.MimetypesRegistry:MimetypesRegistry',
8786
'Products.PasswordResetTool:PasswordResetTool',

Products/CMFPlone/interfaces/installable.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ def getNonInstallableProfiles():
1414
def getNonInstallableProducts():
1515
"""Returns a list of products that should not be available for
1616
installation.
17-
18-
This used to be in CMFQuickInstallerTool.
1917
"""

Products/CMFPlone/profiles/default/toolset.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
class="Products.CMFPlone.PasswordResetTool.PasswordResetTool"/>
3131
<required tool_id="portal_properties"
3232
class="Products.CMFPlone.PropertiesTool.PropertiesTool"/>
33-
<required tool_id="portal_quickinstaller"
34-
class="Products.CMFPlone.QuickInstallerTool.QuickInstallerTool"/>
3533
<required tool_id="portal_registration"
3634
class="Products.CMFPlone.RegistrationTool.RegistrationTool"/>
3735
<required tool_id="portal_skins"

Products/CMFPlone/setuphandlers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def assignTitles(portal):
7575
'portal_migration': 'Upgrades to newer Plone versions',
7676
'portal_password_reset': 'Handles password retention policy',
7777
'portal_properties': 'General settings registry',
78-
'portal_quickinstaller': 'Allows to install/uninstall products',
7978
'portal_registration': 'Handles registration of new users',
8079
'portal_setup': 'Add-on and configuration management',
8180
'portal_skins': 'Controls skin behaviour (search order etc)',

Products/CMFPlone/tests/testInterfaces.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from Products.CMFPlone.Portal import PloneSite
1212
from Products.CMFPlone.PropertiesTool import PropertiesTool
1313
from Products.CMFPlone.PropertiesTool import SimpleItemWithProperties
14-
from Products.CMFPlone.QuickInstallerTool import QuickInstallerTool
1514
from Products.CMFPlone.RegistrationTool import RegistrationTool
1615
from Products.CMFPlone.SkinsTool import SkinsTool
1716
from Products.CMFPlone.TypesTool import TypesTool
@@ -266,7 +265,6 @@ def _testStuff(self):
266265
(PloneTool, ()),
267266
(PloneSite, ()),
268267
(PropertiesTool, ()), (SimpleItemWithProperties, ()),
269-
(QuickInstallerTool, ()),
270268
(RegistrationTool, ()),
271269
(SkinsTool, ()),
272270
(TypesTool, ()),

0 commit comments

Comments
 (0)