Skip to content

Commit

Permalink
Remove long deprecated backward compatibility imports of getSite and …
Browse files Browse the repository at this point in the history
…setHooks.
  • Loading branch information
jensens committed Aug 10, 2020
1 parent 3363446 commit ae4ce17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changes
1.0.0 (unreleased)
------------------

- Breaking: Remove long deprecated backward compatibility imports of getSite and setHooks.
[jensens]

- Fix #8: Broken on Windows (non case-sensitive filesystem).
[jensens]

Expand Down
5 changes: 1 addition & 4 deletions src/z3c/jbot/tests/test_five.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ class MockSite(object):
REQUEST = TestRequest("en")
getSiteManager = component.getSiteManager

try:
from zope.site.hooks import setHooks, setSite
except ImportError:
from zope.app.component.hooks import setHooks, setSite
from zope.component.hooks import setHooks, setSite

setHooks()
setSite(MockSite())
Expand Down
5 changes: 1 addition & 4 deletions src/z3c/jbot/utility.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
from z3c.jbot.interfaces import ITemplateManager
from zope.component import getGlobalSiteManager
from zope.component.hooks import getSite
from zope.interface import Interface
from zope.interface import providedBy
from zope.publisher.interfaces import IRequest
import zope.security.interfaces
import zope.security.management

try:
from zope.site.hooks import getSite
except ImportError:
from zope.app.component.hooks import getSite

try:
import Acquisition # noqa
Expand Down

0 comments on commit ae4ce17

Please sign in to comment.