Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
13214269
Commit
13214269
authored
Nov 26, 2005
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stitch in more recent Zope 3 and get rid of a monkey in Five
parent
6cc188e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
75 deletions
+0
-75
lib/python/Products/Five/__init__.py
lib/python/Products/Five/__init__.py
+0
-4
lib/python/Products/Five/monkey.py
lib/python/Products/Five/monkey.py
+0
-71
No files found.
lib/python/Products/Five/__init__.py
View file @
13214269
...
@@ -18,12 +18,8 @@ $Id: __init__.py 20254 2005-11-25 18:45:08Z efge $
...
@@ -18,12 +18,8 @@ $Id: __init__.py 20254 2005-11-25 18:45:08Z efge $
import
Acquisition
import
Acquisition
from
Globals
import
INSTANCE_HOME
from
Globals
import
INSTANCE_HOME
import
monkey
# BBB: goes away when Zope 3.2 >= r40368 is stiched in
import
zcml
import
zcml
# trigger monkey patches
monkey
.
monkeyPatch
()
# public API provided by Five
# public API provided by Five
# usage: from Products.Five import <something>
# usage: from Products.Five import <something>
from
browser
import
BrowserView
from
browser
import
BrowserView
...
...
lib/python/Products/Five/monkey.py
deleted
100644 → 0
View file @
6cc188e3
##############################################################################
#
# Copyright (c) 2005 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Bad monkey!
BBB: goes away when Zope 3.2 >= r40368 is stiched in
$Id$
"""
def
monkeyPatch
():
"""Trigger all monkey patches needed to make Five work.
Monkey patches are kept to a minimum level.
"""
zope3_monkey
()
def
zope3_monkey
():
"""Fix Zope 3 to have the proper ContainerModifiedEvent that has
been added for 3.2.
"""
try
:
from
zope.app.container.contained
import
notifyContainerModified
except
ImportError
:
pass
else
:
return
# BBB: goes away when Zope 3.2 >= r40368 is stiched in
from
zope.event
import
notify
from
zope.interface
import
implements
import
zope.app.container.contained
import
zope.app.container.interfaces
from
zope.app.event.objectevent
import
ObjectModifiedEvent
from
zope.app.event.interfaces
import
IObjectModifiedEvent
class
IContainerModifiedEvent
(
IObjectModifiedEvent
):
"""The container has been modified.
This event is specific to "containerness" modifications, which
means addition, removal or reordering of sub-objects.
"""
zope
.
app
.
container
.
interfaces
.
IContainerModifiedEvent
=
\
IContainerModifiedEvent
class
ContainerModifiedEvent
(
ObjectModifiedEvent
):
"""The container has been modified."""
implements
(
IContainerModifiedEvent
)
zope
.
app
.
container
.
contained
.
ContainerModifiedEvent
=
\
ContainerModifiedEvent
def
notifyContainerModified
(
object
,
*
descriptions
):
"""Notify that the container was modified."""
notify
(
ContainerModifiedEvent
(
object
,
*
descriptions
))
zope
.
app
.
container
.
contained
.
notifyContainerModified
=
\
notifyContainerModified
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment