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
0c3ecbb0
Commit
0c3ecbb0
authored
Aug 06, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated slated for removal in Zope 4.
Also adjust some deprecation warnings to refer to Zope 5.0.
parent
24d566b4
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
28 additions
and
313 deletions
+28
-313
src/Globals/__init__.py
src/Globals/__init__.py
+1
-50
src/Products/Five/browser/absoluteurl.py
src/Products/Five/browser/absoluteurl.py
+0
-21
src/Products/Five/browser/decode.py
src/Products/Five/browser/decode.py
+8
-4
src/Products/Five/browser/menu.py
src/Products/Five/browser/menu.py
+0
-23
src/Products/Five/event.zcml
src/Products/Five/event.zcml
+0
-6
src/Products/Five/eventconfigure.py
src/Products/Five/eventconfigure.py
+0
-21
src/Products/Five/fiveconfigure.py
src/Products/Five/fiveconfigure.py
+5
-39
src/Products/Five/fivedirectives.py
src/Products/Five/fivedirectives.py
+5
-35
src/Products/Five/interfaces.py
src/Products/Five/interfaces.py
+0
-21
src/Products/Five/meta.zcml
src/Products/Five/meta.zcml
+0
-7
src/Products/Five/metaconfigure.py
src/Products/Five/metaconfigure.py
+8
-2
src/Products/Five/schema.py
src/Products/Five/schema.py
+0
-7
src/Products/Five/security.py
src/Products/Five/security.py
+0
-34
src/Products/Five/testbrowser.py
src/Products/Five/testbrowser.py
+0
-10
src/Products/Five/zcml.py
src/Products/Five/zcml.py
+0
-12
src/ZPublisher/TaintedString.py
src/ZPublisher/TaintedString.py
+0
-20
src/Zope2/Startup/zopeschema.xml
src/Zope2/Startup/zopeschema.xml
+1
-1
No files found.
src/Globals/__init__.py
View file @
0c3ecbb0
...
...
@@ -15,56 +15,7 @@
o N.B.: DO NOT IMPORT ANYTHING HERE! This module is just for shared data!
"""
# BBB imports
from
zope.deferredimport
import
deprecated
deprecated
(
"import TreeDisplay directly"
,
TreeDisplay
=
"TreeDisplay"
,
)
deprecated
(
"import from App.Common instead"
,
package_home
=
'App.Common:package_home'
,
attrget
=
'App.Common:attrget'
,
Dictionary
=
'App.Common:Dictionary'
,
)
deprecated
(
"import from Persistence instead"
,
Persistent
=
'Persistence:Persistent'
,
PersistentMapping
=
'Persistence:PersistentMapping'
,
)
deprecated
(
"import from AccessControl.class_init instead"
,
InitializeClass
=
'AccessControl.class_init:InitializeClass'
,
)
deprecated
(
"import from AccessControl.Permission instead"
,
ApplicationDefaultPermissions
=
'AccessControl.Permission:ApplicationDefaultPermissions'
,
)
deprecated
(
"import from App.special_dtml instead"
,
HTML
=
'App.special_dtml:HTML'
,
HTMLFile
=
'App.special_dtml:HTMLFile'
,
DTMLFile
=
'App.special_dtml:DTMLFile'
,
)
deprecated
(
"import from App.Dialogs instead"
,
MessageDialog
=
'App.Dialogs:MessageDialog'
,
)
deprecated
(
"import from App.ImageFile instead"
,
ImageFile
=
'App.ImageFile:ImageFile'
,
)
deprecated
(
"import from OFS.ObjectManager instead"
,
UNIQUE
=
'OFS.ObjectManager:UNIQUE'
,
REPLACEABLE
=
'OFS.ObjectManager:REPLACEABLE'
,
NOT_REPLACEABLE
=
'OFS.ObjectManager:NOT_REPLACEABLE'
,
)
del
deprecated
DevelopmentMode
=
False
#
XXX
ZODB stashes the main database object here
# ZODB stashes the main database object here
opened
=
[]
src/Products/Five/browser/absoluteurl.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2004, 2005 Zope Foundation 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.
#
##############################################################################
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from OFS.absoluteurl"
,
AbsoluteURL
=
'OFS.absoluteurl:AbsoluteURL'
,
OFSTraversableAbsoluteURL
=
'OFS.absoluteurl:OFSTraversableAbsoluteURL'
,
RootAbsoluteURL
=
'OFS.absoluteurl:RootAbsoluteURL'
,
)
src/Products/Five/browser/decode.py
View file @
0c3ecbb0
...
...
@@ -20,10 +20,11 @@ from warnings import warn
from
ZPublisher.HTTPRequest
import
isCGI_NAMEs
from
zope.i18n.interfaces
import
IUserPreferredCharsets
# taken and adapted from zope.publisher.browser.BrowserRequest
def
_decode
(
text
,
charsets
):
"""Try to decode the text using one of the available charsets.
"""
# taken and adapted from zope.publisher.browser.BrowserRequest
for
charset
in
charsets
:
try
:
text
=
unicode
(
text
,
charset
)
...
...
@@ -32,12 +33,13 @@ def _decode(text, charsets):
pass
return
text
def
processInputValue
(
value
,
charsets
):
"""Recursively look for values (e.g. elements of lists, tuples or dicts)
and attempt to decode.
"""
warn
(
u'processInputValue() is deprecated and will be removed in Zope '
u'
2.16
.'
,
u'
5.0
.'
,
DeprecationWarning
,
stacklevel
=
2
)
if
isinstance
(
value
,
list
):
...
...
@@ -53,12 +55,13 @@ def processInputValue(value, charsets):
else
:
return
value
def
processInputs
(
request
,
charsets
=
None
):
"""Process the values in request.form to decode strings to unicode, using
the passed-in list of charsets. If none are passed in, look up the user's
preferred charsets. The default is to use utf-8.
"""
warn
(
u'processInputs() is deprecated and will be removed in Zope
2.16
. If '
warn
(
u'processInputs() is deprecated and will be removed in Zope
5.0
. If '
u'your view implements IBrowserPage, similar processing is now '
u'executed automatically.'
,
DeprecationWarning
,
stacklevel
=
2
)
...
...
@@ -74,12 +77,13 @@ def processInputs(request, charsets=None):
if
not
(
name
in
isCGI_NAMEs
or
name
.
startswith
(
'HTTP_'
)):
request
.
form
[
name
]
=
processInputValue
(
value
,
charsets
)
def
setPageEncoding
(
request
):
"""Set the encoding of the form page via the Content-Type header.
ZPublisher uses the value of this header to determine how to
encode unicode data for the browser.
"""
warn
(
u'setPageEncoding() is deprecated and will be removed in Zope
2.16
. '
warn
(
u'setPageEncoding() is deprecated and will be removed in Zope
5.0
. '
u'It is recommended to let the ZPublisher use the default_encoding. '
u'Please consider setting default-zpublisher-encoding to utf-8.'
,
DeprecationWarning
,
stacklevel
=
2
)
...
...
src/Products/Five/browser/menu.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2005 Zope Foundation 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.
#
##############################################################################
"""Some menu code
"""
import
zope.deferredimport
zope
.
deferredimport
.
deprecated
(
"The Five specific view has been made obsolete. Please use the "
"view from zope.browsermenu directly."
,
MenuAccessView
=
'zope.browsermenu.menu.MenuAccessView'
,
)
src/Products/Five/event.zcml
deleted
100644 → 0
View file @
24d566b4
<configure xmlns="http://namespaces.zope.org/zope">
<!-- BBB shim -->
<include package="OFS" file="event.zcml"/>
</configure>
src/Products/Five/eventconfigure.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2005 Zope Foundation 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.
#
##############################################################################
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from OFS.metaconfigure"
,
deprecatedManageAddDelete
=
'OFS.metaconfigure:deprecatedManageAddDelete'
,
setDeprecatedManageAddDelete
=
\
'OFS.metaconfigure:setDeprecatedManageAddDelete'
,
)
src/Products/Five/fiveconfigure.py
View file @
0c3ecbb0
...
...
@@ -19,37 +19,19 @@ These directives are specific to Five and have no equivalents outside of it.
import
logging
import
os
import
glob
import
warning
s
import
sy
s
from
App.config
import
getConfiguration
from
zope.interface
import
classImplements
from
zope.component.interface
import
provideInterface
from
zope.configuration.exceptions
import
ConfigurationError
from
zope.publisher.interfaces.browser
import
IDefaultBrowserLayer
from
Products.Five.browser.metaconfigure
import
page
logger
=
logging
.
getLogger
(
'Products.Five'
)
if
sys
.
version_info
>=
(
3
,
0
):
basestring
=
str
logger
=
logging
.
getLogger
(
'Products.Five'
)
def
implements
(
_context
,
class_
,
interface
):
warnings
.
warn
(
'Using <five:implements /> in %s is deprecated. Please use '
'the <class class="foo.Bar">'
'<implements interface="foo.interfaces.IBar" /></class> '
'directive instead.'
%
_context
.
info
,
DeprecationWarning
,
stacklevel
=
2
)
for
interface
in
interface
:
_context
.
action
(
discriminator
=
None
,
callable
=
classImplements
,
args
=
(
class_
,
interface
)
)
_context
.
action
(
discriminator
=
None
,
callable
=
provideInterface
,
args
=
(
interface
.
__module__
+
'.'
+
interface
.
getName
(),
interface
)
)
def
pagesFromDirectory
(
_context
,
directory
,
module
,
for_
=
None
,
layer
=
IDefaultBrowserLayer
,
permission
=
'zope.Public'
):
...
...
@@ -63,7 +45,7 @@ def pagesFromDirectory(_context, directory, module, for_=None,
if
not
os
.
path
.
isdir
(
directory
):
raise
ConfigurationError
(
"Directory %s does not exist"
%
directory
)
)
for
fname
in
glob
.
glob
(
os
.
path
.
join
(
directory
,
'*.pt'
)):
name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
fname
))[
0
]
...
...
@@ -77,19 +59,3 @@ def handleBrokenProduct(product):
raise
# Not debug mode. Zope should continue to load. Print a log message:
logger
.
exception
(
'Could not import Product %s'
%
product
.
__name__
)
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from OFS.metaconfigure"
,
findProducts
=
'OFS.metaconfigure:findProducts'
,
loadProducts
=
'OFS.metaconfigure:loadProducts'
,
loadProductsOverrides
=
'OFS.metaconfigure:loadProductsOverrides'
,
_register_monkies
=
'OFS.metaconfigure:_register_monkies'
,
_meta_type_regs
=
'OFS.metaconfigure:_meta_type_regs'
,
_registerClass
=
'OFS.metaconfigure:_registerClass'
,
registerClass
=
'OFS.metaconfigure:registerClass'
,
_registerPackage
=
'OFS.metaconfigure:_registerPackage'
,
registerPackage
=
'OFS.metaconfigure:registerPackage'
,
unregisterClass
=
'OFS.metaconfigure:unregisterClass'
,
)
src/Products/Five/fivedirectives.py
View file @
0c3ecbb0
...
...
@@ -16,26 +16,10 @@
from
zope.interface
import
Interface
from
zope.browserresource.metadirectives
import
IBasicResourceInformation
from
zope.configuration.fields
import
GlobalObject
,
Tokens
from
zope.configuration.fields
import
GlobalObject
from
zope.schema
import
TextLine
# Deprecated, the class directive from zope.security allows the same
class
IImplementsDirective
(
Interface
):
"""State that a class implements something.
"""
class_
=
GlobalObject
(
title
=
u"Class"
,
required
=
True
)
interface
=
Tokens
(
title
=
u"One or more interfaces"
,
required
=
True
,
value_type
=
GlobalObject
()
)
class
ISizableDirective
(
Interface
):
"""Attach sizable adapters to classes.
"""
...
...
@@ -43,7 +27,7 @@ class ISizableDirective(Interface):
class_
=
GlobalObject
(
title
=
u"Class"
,
required
=
True
)
)
class
IPagesFromDirectoryDirective
(
IBasicResourceInformation
):
...
...
@@ -53,29 +37,15 @@ class IPagesFromDirectoryDirective(IBasicResourceInformation):
for_
=
GlobalObject
(
title
=
u"The interface this view is for."
,
required
=
False
)
)
module
=
GlobalObject
(
title
=
u"Module"
,
required
=
True
)
)
directory
=
TextLine
(
title
=
u"Directory"
,
description
=
u"The directory containing the resource data."
,
required
=
True
)
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from OFS.metadirectives"
,
IRegisterPackageDirective
=
'OFS.metadirectives:IRegisterPackageDirective'
,
IRegisterClassDirective
=
'OFS.metadirectives:IRegisterClassDirective'
,
IDeprecatedManageAddDeleteDirective
=
\
'OFS.metadirectives:IDeprecatedManageAddDeleteDirective'
,
)
deprecated
(
"Please import from zope.configuration.xmlconfig"
,
IInclude
=
'zope.configuration.xmlconfig:IInclude'
,
)
)
src/Products/Five/interfaces.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2004, 2005 Zope Foundation 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.
#
##############################################################################
"""Five interfaces
"""
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from zope.browsermenu.interfaces"
,
IMenuItemType
=
'zope.browsermenu.interfaces:IMenuItemType'
,
)
src/Products/Five/meta.zcml
View file @
0c3ecbb0
...
...
@@ -21,13 +21,6 @@
handler=".fiveconfigure.pagesFromDirectory"
/>
<!-- Deprecated, use the class directive instead. -->
<meta:directive
name="implements"
schema=".fivedirectives.IImplementsDirective"
handler=".fiveconfigure.implements"
/>
</meta:directives>
</configure>
src/Products/Five/metaconfigure.py
View file @
0c3ecbb0
# BBB
from
AccessControl.metaconfigure
import
ClassDirective
# BBB Zope 5.0
from
zope.deferredimport
import
deprecated
deprecated
(
'Please import from AccessControl.metaconfigure'
,
ClassDirective
=
'AccessControl.metaconfigure:ClassDirective'
,
)
src/Products/Five/schema.py
deleted
100644 → 0
View file @
24d566b4
# BBB
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from Zope2.App.schema"
,
Zope2VocabularyRegistry
=
'Zope2.App.schema:Zope2VocabularyRegistry'
,
)
src/Products/Five/security.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2004, 2005 Zope Foundation 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.
#
##############################################################################
"""Five security handling
"""
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import InitializeClass from App.class_init"
,
initializeClass
=
'App.class_init:InitializeClass'
,
)
deprecated
(
"Please import from AccessControl.security"
,
CheckerPublicId
=
'AccessControl.security:CheckerPublicId'
,
CheckerPrivateId
=
'AccessControl.security:CheckerPrivateId'
,
getSecurityInfo
=
'AccessControl.security:getSecurityInfo'
,
clearSecurityInfo
=
'AccessControl.security:clearSecurityInfo'
,
checkPermission
=
'AccessControl.security:checkPermission'
,
FiveSecurityPolicy
=
'AccessControl.security:SecurityPolicy'
,
newInteraction
=
'AccessControl.security:newInteraction'
,
_getSecurity
=
'AccessControl.security:_getSecurity'
,
protectName
=
'AccessControl.security:protectName'
,
protectClass
=
'AccessControl.security:protectClass'
,
)
src/Products/Five/testbrowser.py
deleted
100644 → 0
View file @
24d566b4
# BBB
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from Testing.testbrowser"
,
PublisherConnection
=
'Testing.testbrowser:PublisherConnection'
,
PublisherHTTPHandler
=
'Testing.testbrowser:PublisherHTTPHandler'
,
PublisherMechanizeBrowser
=
'Testing.testbrowser:PublisherMechanizeBrowser'
,
Browser
=
'Testing.testbrowser:Browser'
,
)
src/Products/Five/zcml.py
deleted
100644 → 0
View file @
24d566b4
# BBB
from
zope.deferredimport
import
deprecated
deprecated
(
"Please import from Zope2.App.zcml"
,
_context
=
'Zope2.App.zcml:_context'
,
_initialized
=
'Zope2.App.zcml:_initialized'
,
cleanUp
=
'Zope2.App.zcml:cleanUp'
,
load_config
=
'Zope2.App.zcml:load_config'
,
load_site
=
'Zope2.App.zcml:load_site'
,
load_string
=
'Zope2.App.zcml:load_string'
,
)
src/ZPublisher/TaintedString.py
deleted
100644 → 0
View file @
24d566b4
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# 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.
#
##############################################################################
"""TaintedString legacy module.
"""
from
zope.deferredimport
import
deprecated
deprecated
(
'ZPublisher.TaintedString will be removed in Zope 4.0 Please '
'import from AccessControl.tainted instead.'
,
TaintedString
=
'AccessControl.tainted:TaintedString'
,
)
src/Zope2/Startup/zopeschema.xml
View file @
0c3ecbb0
...
...
@@ -223,7 +223,7 @@
<key
name=
"enable-product-installation"
datatype=
"boolean"
default=
"off"
>
<description>
BBB: This directive has no effect anymore.
BBB
Zope 5.0
: This directive has no effect anymore.
</description>
<metadefault>
off
</metadefault>
</key>
...
...
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