From 3b031f61cddab34c1da23caed7f7b5d2606578d3 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Tue, 23 Feb 2016 15:40:56 +0100 Subject: [PATCH] Replace deprecated zope.site.hooks import with zope.component.hooks. --- CHANGES.rst | 3 +++ Products/Archetypes/fieldproperty.py | 4 +--- Products/Archetypes/tests/traversal.txt | 2 +- setup.py | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 50414fe4..0b7424ac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,9 @@ New: Fixes: +- Replace deprecated ``zope.site.hooks`` import with ``zope.component.hooks``. + [thet] + - Fix tinymce pattern-options merging to be compatible with change in p.a.widgets and p.a.z3cform. [alecm] diff --git a/Products/Archetypes/fieldproperty.py b/Products/Archetypes/fieldproperty.py index 575df73a..575b2c0c 100644 --- a/Products/Archetypes/fieldproperty.py +++ b/Products/Archetypes/fieldproperty.py @@ -2,11 +2,9 @@ """ from DateTime import DateTime -from datetime import datetime +from zope.component.hooks import getSite from zope.datetime import parseDatetimetz -from zope.site.hooks import getSite - class ATFieldProperty(object): """Field properties based on Archetypes schema diff --git a/Products/Archetypes/tests/traversal.txt b/Products/Archetypes/tests/traversal.txt index 71f279e2..72016e30 100644 --- a/Products/Archetypes/tests/traversal.txt +++ b/Products/Archetypes/tests/traversal.txt @@ -177,7 +177,7 @@ We need to do some site magic, or our we end up with the SimpleView class being persisted in the local component registry. We really shouldn't do ZCML registrations in function tests. - >>> from zope.site.hooks import getSite, setSite + >>> from zope.component.hooks import getSite, setSite >>> site = getSite() >>> setSite(None) diff --git a/setup.py b/setup.py index e83e7464..16873e49 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,6 @@ 'zope.lifecycleevent', 'zope.publisher', 'zope.schema', - 'zope.site', 'zope.tal', 'zope.viewlet', 'Products.CMFCore',