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
2e57a1b2
Commit
2e57a1b2
authored
May 22, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Officially deprecate the BBB methods on the iterator and add a note
regarding our plans for the other iterator BBB code
parent
a5d4d646
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
lib/python/Products/PageTemplates/Expressions.py
lib/python/Products/PageTemplates/Expressions.py
+18
-3
No files found.
lib/python/Products/PageTemplates/Expressions.py
View file @
2e57a1b2
...
...
@@ -35,6 +35,7 @@ SecureModuleImporter = ZRPythonExpr._SecureModuleImporter()
# BBB 2005/05/01 -- remove after 12 months
import
zope.deprecation
from
zope.deprecation
import
deprecate
zope
.
deprecation
.
deprecated
(
(
"StringExpr"
,
"NotExpr"
,
"PathExpr"
,
"SubPathExpr"
),
"Zope 2 uses the Zope 3 ZPT engine now. Expression types can be "
...
...
@@ -98,7 +99,12 @@ class ZopeIterator(Iterator):
__allow_access_to_unprotected_subobjects__
=
True
# these used to be properties in ZTUtils.Iterator.Iterator
# The things below used to be attributes in
# ZTUtils.Iterator.Iterator, however in zope.tales.tales.Iterator
# they're methods. We need BBB on the Python level so we redefine
# them as properties here. Eventually, we would like to get rid
# of them, though, so that we won't have to maintain yet another
# iterator class somewhere.
@
property
def
index
(
self
):
...
...
@@ -116,18 +122,27 @@ class ZopeIterator(Iterator):
def
item
(
self
):
return
super
(
ZopeIterator
,
self
).
item
()
# these aren't in zope.tales.tales.Iterator, but were in
# ZTUtils.Iterator.Iterator
# The following things were in ZTUtils.Iterator.Iterator but
# aren't anymore in zope.tales.tales.Iterator. For a good reason.
# They're just insane.
# BBB 2005/05/01 -- to be removed after 12 months
@
property
@
deprecate
(
"The 'nextIndex' method has been deprecated and will disappear "
"in Zope 2.12. Use 'iterator.index+1' instead."
)
def
nextIndex
(
self
):
return
self
.
index
+
1
@
deprecate
(
"The 'first' method has been deprecated and will disappear "
"in Zope 2.12. Use the 'start' property instead."
)
def
first
(
self
,
name
=
None
):
if
self
.
start
:
return
True
return
not
self
.
same_part
(
name
,
self
.
_last
,
self
.
item
)
@
deprecate
(
"The 'last' method has been deprecated and will disappear "
"in Zope 2.12. Use the 'end' property instead."
)
def
last
(
self
,
name
=
None
):
if
self
.
end
:
return
True
...
...
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