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
189b9bfd
Commit
189b9bfd
authored
Apr 27, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge philikon-local-components branch into this one. This retires
philikon-local-components branch.
parent
6556b65a
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
48 additions
and
33 deletions
+48
-33
lib/python/App/ImageFile.py
lib/python/App/ImageFile.py
+1
-1
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+1
-1
lib/python/OFS/DTMLDocument.py
lib/python/OFS/DTMLDocument.py
+1
-1
lib/python/OFS/DTMLMethod.py
lib/python/OFS/DTMLMethod.py
+1
-1
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+1
-1
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+16
-0
lib/python/OFS/content_types.py
lib/python/OFS/content_types.py
+2
-3
lib/python/OFS/event.py
lib/python/OFS/event.py
+1
-1
lib/python/OFS/interfaces.py
lib/python/OFS/interfaces.py
+6
-6
lib/python/OFS/subscribers.py
lib/python/OFS/subscribers.py
+12
-7
lib/python/Products/PageTemplates/ZopePageTemplate.py
lib/python/Products/PageTemplates/ZopePageTemplate.py
+1
-1
lib/python/TAL/TALInterpreter.py
lib/python/TAL/TALInterpreter.py
+2
-7
lib/python/ZClasses/Method.py
lib/python/ZClasses/Method.py
+1
-1
lib/python/Zope2/Startup/handlers.py
lib/python/Zope2/Startup/handlers.py
+1
-1
lib/python/webdav/NullResource.py
lib/python/webdav/NullResource.py
+1
-1
No files found.
lib/python/App/ImageFile.py
View file @
189b9bfd
...
...
@@ -26,7 +26,7 @@ from Globals import package_home
from
Common
import
rfc1123_date
from
DateTime
import
DateTime
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
class
ImageFile
(
Acquisition
.
Explicit
):
"""Image objects stored in external files."""
...
...
lib/python/OFS/CopySupport.py
View file @
189b9bfd
...
...
@@ -37,7 +37,7 @@ from zExceptions import Unauthorized, BadRequest
from
ZODB.POSException
import
ConflictError
from
zope.interface
import
implements
from
zope.event
import
notify
from
zope.
app.event.object
event
import
ObjectCopiedEvent
from
zope.
lifecycle
event
import
ObjectCopiedEvent
from
zope.app.container.contained
import
ObjectMovedEvent
from
zope.app.container.contained
import
notifyContainerModified
from
OFS.event
import
ObjectWillBeMovedEvent
...
...
lib/python/OFS/DTMLDocument.py
View file @
189b9bfd
...
...
@@ -17,7 +17,7 @@ $Id$
from
Globals
import
InitializeClass
from
ZPublisher.Converters
import
type_converters
from
Globals
import
HTML
,
DTMLFile
,
MessageDialog
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
from
DTMLMethod
import
DTMLMethod
,
decapitate
from
PropertyManager
import
PropertyManager
from
webdav.common
import
rfc1123_date
...
...
lib/python/OFS/DTMLMethod.py
View file @
189b9bfd
...
...
@@ -18,7 +18,7 @@ import History
from
Globals
import
HTML
,
DTMLFile
,
MessageDialog
from
Globals
import
InitializeClass
from
SimpleItem
import
Item_w__name__
,
pretty_tb
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
from
PropertyManager
import
PropertyManager
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.Role
import
RoleManager
...
...
lib/python/OFS/Image.py
View file @
189b9bfd
...
...
@@ -15,7 +15,7 @@
$Id$
"""
import
struct
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
from
Globals
import
DTMLFile
from
Globals
import
InitializeClass
from
PropertyManager
import
PropertyManager
...
...
lib/python/OFS/ObjectManager.py
View file @
189b9bfd
...
...
@@ -46,6 +46,7 @@ from zExceptions import BadRequest
from
ZODB.POSException
import
ConflictError
from
zope.interface
import
implements
from
zope.component.interfaces
import
ComponentLookupError
import
CopySupport
from
interfaces
import
IObjectManager
...
...
@@ -166,6 +167,21 @@ class ObjectManager(
isPrincipiaFolderish
=
1
# IPossibleSite API
_components
=
None
security
.
declarePublic
(
'getSiteManager'
)
def
getSiteManager
(
self
):
if
self
.
_components
is
None
:
raise
ComponentLookupError
(
'No component registry defined.'
)
return
self
.
_components
security
.
declareProtected
(
'Manage Site'
,
'setSiteManager'
)
def
setSiteManager
(
self
,
components
):
self
.
_components
=
components
def
__class_init__
(
self
):
try
:
mt
=
list
(
self
.
meta_types
)
except
:
mt
=
[]
...
...
lib/python/OFS/content_types.py
View file @
189b9bfd
...
...
@@ -14,11 +14,10 @@
$Id$
"""
import
warnings
warnings
.
warn
(
'Using OFS.content_types is deprecated (will be removed in Zope '
'2.11). Instead use zope.
app.contenttypes
.'
,
'2.11). Instead use zope.
contenttype
.'
,
DeprecationWarning
,
stacklevel
=
2
)
from
zope.
app.contenttypes
import
text_type
,
guess_content_type
,
add_files
from
zope.
contenttype
import
text_type
,
guess_content_type
,
add_files
lib/python/OFS/event.py
View file @
189b9bfd
...
...
@@ -18,7 +18,7 @@ $Id$
"""
from
zope.interface
import
implements
from
zope.
app.event.objectevent
import
ObjectEvent
from
zope.
component.interfaces
import
ObjectEvent
import
OFS.interfaces
...
...
lib/python/OFS/interfaces.py
View file @
189b9bfd
...
...
@@ -27,7 +27,8 @@ from persistent.interfaces import IPersistent
from
webdav.interfaces
import
IDAVCollection
from
webdav.interfaces
import
IDAVResource
from
zope.app.traversing.interfaces
import
IContainmentRoot
from
zope.traversing.interfaces
import
IContainmentRoot
from
zope.app.component.interfaces
import
IPossibleSite
class
IOrderedContainer
(
Interface
):
...
...
@@ -476,13 +477,12 @@ class ICopyContainer(Interface):
# not synced with ZopeBook API Reference;
# based on OFS.ObjectManager.ObjectManager
class
IObjectManager
(
IZopeObject
,
ICopyContainer
,
INavigation
,
IManageable
,
IAcquirer
,
IPersistent
,
IDAVCollection
,
ITraversable
):
IAcquirer
,
IPersistent
,
IDAVCollection
,
ITraversable
,
IPossibleSite
):
"""Generic object manager
This interface provides core behavior for collections of heterogeneous
objects.
"""
objects."""
meta_types
=
Tuple
(
title
=
u"Meta types"
,
...
...
@@ -903,7 +903,7 @@ class IApplication(IFolder, IContainmentRoot):
##################################################
# Event interfaces
from
zope.
app.ev
ent.interfaces
import
IObjectEvent
from
zope.
compon
ent.interfaces
import
IObjectEvent
class
IObjectWillBeMovedEvent
(
IObjectEvent
):
"""An object will be moved."""
...
...
lib/python/OFS/subscribers.py
View file @
189b9bfd
...
...
@@ -21,17 +21,17 @@ import warnings
import
sys
from
logging
import
getLogger
import
OFS.interfaces
from
Acquisition
import
aq_base
from
App.config
import
getConfiguration
from
AccessControl
import
getSecurityManager
from
ZODB.POSException
import
ConflictError
import
OFS.interfaces
from
zope.interface
import
implements
from
zope.component
import
adapts
import
zope.component
import
zope.interface
import
zope.location.interfaces
from
zope.app.container.contained
import
dispatchToSublocations
from
zope.app.location.interfaces
import
ISublocations
from
zope.app.container.interfaces
import
IObjectMovedEvent
deprecatedManageAddDeleteClasses
=
[]
...
...
@@ -79,8 +79,8 @@ def maybeWarnDeprecated(ob, method_name):
class
ObjectManagerSublocations
(
object
):
"""Get the sublocations for an ObjectManager.
"""
adapts
(
OFS
.
interfaces
.
IObjectManager
)
implements
(
ISublocations
)
zope
.
component
.
adapts
(
OFS
.
interfaces
.
IObjectManager
)
zope
.
interface
.
implements
(
zope
.
location
.
interfaces
.
ISublocations
)
def
__init__
(
self
,
container
):
self
.
container
=
container
...
...
@@ -99,6 +99,8 @@ class ObjectManagerSublocations(object):
# could have a simple subscriber for IObjectManager that directly calls
# dispatchToSublocations.
@
zope
.
component
.
adapter
(
OFS
.
interfaces
.
IItem
,
OFS
.
interfaces
.
IObjectWillBeMovedEvent
)
def
dispatchObjectWillBeMovedEvent
(
ob
,
event
):
"""Multi-subscriber for IItem + IObjectWillBeMovedEvent.
"""
...
...
@@ -108,6 +110,7 @@ def dispatchObjectWillBeMovedEvent(ob, event):
# Next, do the manage_beforeDelete dance
callManageBeforeDelete
(
ob
,
event
.
object
,
event
.
oldParent
)
@
zope
.
component
.
adapter
(
OFS
.
interfaces
.
IItem
,
IObjectMovedEvent
)
def
dispatchObjectMovedEvent
(
ob
,
event
):
"""Multi-subscriber for IItem + IObjectMovedEvent.
"""
...
...
@@ -117,6 +120,8 @@ def dispatchObjectMovedEvent(ob, event):
if
OFS
.
interfaces
.
IObjectManager
.
providedBy
(
ob
):
dispatchToSublocations
(
ob
,
event
)
@
zope
.
component
.
adapter
(
OFS
.
interfaces
.
IItem
,
OFS
.
interfaces
.
IObjectClonedEvent
)
def
dispatchObjectClonedEvent
(
ob
,
event
):
"""Multi-subscriber for IItem + IObjectClonedEvent.
"""
...
...
lib/python/Products/PageTemplates/ZopePageTemplate.py
View file @
189b9bfd
...
...
@@ -20,7 +20,7 @@ import os
import
Acquisition
from
Globals
import
ImageFile
,
package_home
,
InitializeClass
from
OFS.SimpleItem
import
SimpleItem
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
from
DateTime.DateTime
import
DateTime
from
Shared.DC.Scripts.Script
import
Script
from
Shared.DC.Scripts.Signature
import
FuncCode
...
...
lib/python/TAL/TALInterpreter.py
View file @
189b9bfd
...
...
@@ -24,11 +24,7 @@ from StringIO import StringIO
from
DocumentTemplate.DT_Util
import
ustr
from
ZODB.POSException
import
ConflictError
# BBB 2005/10/10 -- MessageIDs are to be removed for Zope 3.3
import
zope.deprecation
zope
.
deprecation
.
__show__
.
off
()
from
zope.i18nmessageid
import
Message
,
MessageID
zope
.
deprecation
.
__show__
.
on
()
from
zope.i18nmessageid
import
Message
from
TALDefs
import
attrEscape
,
TAL_VERSION
,
METALError
from
TALDefs
import
isCurrentVersion
...
...
@@ -36,8 +32,7 @@ from TALDefs import getProgramVersion, getProgramMode
from
TALGenerator
import
TALGenerator
from
TranslationContext
import
TranslationContext
# This will become (MessageID, Message) when we use Zope 3.1 as a base:
I18nMessageTypes
=
Message
,
MessageID
I18nMessageTypes
=
(
Message
,)
# TODO: In Python 2.4 we can use frozenset() instead of dict.fromkeys()
BOOLEAN_HTML_ATTRS
=
dict
.
fromkeys
([
...
...
lib/python/ZClasses/Method.py
View file @
189b9bfd
...
...
@@ -25,7 +25,7 @@ from zExceptions import BadRequest
import
marshal
from
cgi
import
escape
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
_marker
=
[]
class
ZClassMethodsSheet
(
...
...
lib/python/Zope2/Startup/handlers.py
View file @
189b9bfd
...
...
@@ -175,7 +175,7 @@ def root_handler(config):
# Augment the set of MIME types:
if
config
.
mime_types
:
from
zope.
app.contenttypes
import
add_files
from
zope.
contenttype
import
add_files
add_files
(
config
.
mime_types
)
# if no servers are defined, create default http server and ftp server
...
...
lib/python/webdav/NullResource.py
View file @
189b9bfd
...
...
@@ -39,7 +39,7 @@ from interfaces import IWriteLock
from
Resource
import
Resource
from
WriteLockInterface
import
WriteLockInterface
from
zope.
app.contenttypes
import
guess_content_type
from
zope.
contenttype
import
guess_content_type
class
NullResource
(
Persistent
,
Acquisition
.
Implicit
,
Resource
):
...
...
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