I have succeeded in migrating a site from 4.3.18 to 5.2.5 with Python2.7 but the 5.2.5 instance generates a bunch of DeprecationWarning messages that I think would be good to clean up if possible. The site is not complicated and was originally created in Plone about 20 years ago.
When I first migrated the site to 5.2.5, I was getting
AttributeError: type object 'IATCTTool' has no attribute 'iro'
AttributeError: type object 'IKSSRegistry' has no attribute 'iro'
error messages when running “sudo -u plone_daemon bin/instance fg”. I fixed these by updating eggs to include “Plone [archetypes]” and “Products.ResourceRegistries” and running buildout.
eggs =
Plone
Plone [archetypes]
Products.ResourceRegistries
With these eggs, the site loads fine but generates many DeprecationWarning messages.
root@plone2:/opt/plone5.2.5_python2.7.clean/zinstance# sudo -u plone_daemon bin/instance fg
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.Archetypes-1.16.5-py2.7.egg/Products/Archetypes/generator/widget.py:4: DeprecationWarning: InitializeClass is deprecated. Please import from AccessControl.class_init.
from App.class_init import InitializeClass
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.Archetypes-1.16.5-py2.7.egg/Products/Archetypes/ReferenceEngine.py:31: DeprecationWarning: LazyMap is deprecated. Please import from ZTUtils.Lazy.
from Products.ZCatalog.Lazy import LazyMap
2021-11-20 16:20:37,864 INFO [chameleon.config:38][MainThread] directory cache: /opt/plone5.2.5_python2.7.clean/zinstance/var/cache.
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/interfaces/factories.py:2: DeprecationWarning: IFileFactory is deprecated. Import IFileFactory from zope.filerepresentation.interfaces instead
from plone.app.widgets.interfaces import IFileFactory
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/permission.py:2: DeprecationWarning: IFieldPermissionChecker is deprecated. Import IFieldPermissionChecker from plone.app.z3cform.interfaces instead
from plone.app.widgets.interfaces import IFieldPermissionChecker
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/permission.py:8: DeprecationWarning: setDefaultRoles is deprecated. Please use addPermission from AccessControl.Permission.
from Products.CMFCore.permissions import setDefaultRoles
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/content/base.py:21: DeprecationWarning: ResourceLockedError is deprecated. Please import from zExceptions.
from webdav.Lockable import ResourceLockedError
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/lib/historyaware.py:4: DeprecationWarning: html_quote is deprecated. Please import from DocumentTemplate.html_quote. These shims will go away in DocumentTemplate 4.0.
from DocumentTemplate.DT_Util import html_quote
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/content/topic.py:35: DeprecationWarning: LazyCat is deprecated. Please import from ZTUtils.Lazy.
from Products.ZCatalog.Lazy import LazyCat
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:30: DeprecationWarning: call_object is deprecated. Please import from ZServer.ZPublisher.Publish.
from ZPublisher.Publish import call_object
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:31: DeprecationWarning: dont_publish_class is deprecated. Please import from ZServer.ZPublisher.Publish.
from ZPublisher.Publish import dont_publish_class
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:32: DeprecationWarning: missing_name is deprecated. Please import from ZServer.ZPublisher.Publish.
from ZPublisher.Publish import missing_name
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ExternalEditor-3.0.1-py2.7.egg/Products/ExternalEditor/ExternalEditor.py:23: DeprecationWarning: rfc1123_date is deprecated. Please import from zope.datetime. This backwards compatibility import will go away in Zope 6.
from App.Common import rfc1123_date
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ResourceRegistries-3.0.8-py2.7.egg/Products/ResourceRegistries/tools/BaseRegistry.py:40: DeprecationWarning: zope.site.hooks has moved to zope.component.hooks. Import of zope.site.hooks will become unsupported in Version 5.0
from zope.site.hooks import getSite
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/plone.app.upgrade-2.0.39-py2.7.egg/plone/app/upgrade/init.py:157: DeprecationWarning: GopipIndex is deprecated. Please import from plone.folder.nogopip
from plone.app.folder.nogopip import GopipIndex
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/plone.app.blob-1.8.1-py2.7.egg/plone/app/blob/content.py:23: DeprecationWarning: MimeTypeException is deprecated. Import from Products.MimetypesRegistry.interfaces instead
from Products.MimetypesRegistry.common import MimeTypeException
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/setuphandlers.py:9: DeprecationWarning: ILanguageSchema is deprecated. It has been moved to plone.i18n.interfaces, import from there instead.
from Products.CMFPlone.interfaces import ILanguageSchema
/opt/plone5.2.5_python2.7.clean/buildout-cache/eggs/cp27mu/plone.app.contenttypes-2.2.2-py2.7.egg/plone/app/contenttypes/migration/patches.py:13: DeprecationWarning: _marker is deprecated. Please import from Products.PluginIndexes.unindex.
from Products.PluginIndexes.common.UnIndex import _marker
2021-11-20 16:20:43,406 INFO [Zope:45][MainThread] Ready to handle requests
Starting server in PID 15970.
Serving on http://0.0.0.0:8080
Removing “Plone [archetypes]” and “Products.ResourceRegistries” from the eggs and running buildout fixes the above warning messages, but causes the two AttributeError messages to return and causes the site not to work.
I think it makes sense to somehow fix the site so that it does not depend on “Plone [archetypes]” and “Products.ResourceRegistries”.
I tried installing and removing Archetypes Content Types for Plone (backward compatibility)
and Multilingual Support (Archetypes)
from http://testing.losaltosrobotics.org:8080/Main/prefs_install_products_form but that did not work.
How can I remove the dependency of the site on “Plone [archetypes]” and “Products.ResourceRegistries”?
Perhaps these WARNING and ERROR messages from @@plone_upgrade will be helpful.
2021-11-20 16:43:21,214 WARNING [OFS.Uninstalled:84][waitress-1] Could not import class 'PasswordResetTool' from module 'Products.PasswordResetTool.PasswordResetTool'
2021-11-20 16:43:26,001 ERROR [GenericSetup:1296][waitress-2] Step languagetool has an invalid import handler
2021-11-20 16:43:26,328 WARNING [GenericSetup.portlets:100][waitress-2] Cannot register portlet type portlets.Calendar because it is already registered.
2021-11-20 16:43:26,329 WARNING [GenericSetup.portlets:100][waitress-2] Cannot register portlet type portlets.Events because it is already registered.
2021-11-20 16:43:30,105 WARNING [plone.app.upgrade:527][waitress-2] could not upgrade calendar_starting_year property
2021-11-20 16:43:30,105 WARNING [plone.app.upgrade:527][waitress-2] could not upgrade calendar_future_years_available property
2021-11-20 16:43:31,256 WARNING [GenericSetup.plone.app.registry:100][waitress-2] Interface Products.ResourceRegistries.interfaces.settings.IResourceRegistriesSettings specified for record %s has no field plone.lessvariables.
2021-11-20 16:43:32,707 WARNING [GenericSetup.componentregistry:100][waitress-2] The object None was not found, while trying to register an utility. The provided object definition was portal_syndication. The site used was: <PloneSite at /Main>
2021-11-20 16:43:32,707 WARNING [GenericSetup.componentregistry:100][waitress-2] The object None was not found, while trying to register an utility. The provided object definition was portal_undo. The site used was: <PloneSite at /Main>
2021-11-20 16:43:35,394 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile Products.CMFPlacefulWorkflow:CMFPlacefulWorkflow is unknown, refusing to upgrade.
2021-11-20 16:43:35,395 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile plone.app.contenttypes:default is unknown, refusing to upgrade.
2021-11-20 16:43:35,395 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile plone.app.dexterity:default is unknown, refusing to upgrade.
2021-11-20 16:43:35,454 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile plone.app.iterate:plone.app.iterate is unknown, refusing to upgrade.
2021-11-20 16:43:35,454 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile plone.app.multilingual:default is unknown, refusing to upgrade.
2021-11-20 16:43:35,456 WARNING [Products.GenericSetup.tool:1134][waitress-2] Version of profile plone.app.users:default is unknown, refusing to upgrade.
Unfortunately, the full output from @@plone_upgrade is too big to inlcude.
I would appreciate any help that you can give me with removing the site's dependencies on the “Plone [archetypes]” and Products.ResourceRegistries
eggs. Thanks, Michael