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
55986d1b
Commit
55986d1b
authored
Feb 06, 2011
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't publish acquired attributes if acquired object has no docstring.
See
https://bugs.launchpad.net/zope2/+bug/713253/
parent
747ce19e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
10 deletions
+23
-10
doc/CHANGES.txt
doc/CHANGES.txt
+8
-0
inst/WinBuilders/mk/zope.mk
inst/WinBuilders/mk/zope.mk
+1
-1
inst/versions.py
inst/versions.py
+1
-1
lib/python/ZPublisher/BaseRequest.py
lib/python/ZPublisher/BaseRequest.py
+5
-7
lib/python/ZPublisher/tests/testBaseRequest.py
lib/python/ZPublisher/tests/testBaseRequest.py
+7
-0
setup.py
setup.py
+1
-1
No files found.
doc/CHANGES.txt
View file @
55986d1b
...
...
@@ -4,6 +4,14 @@ Zope Changes
Change information for previous versions of Zope can be found in the
file HISTORY.txt.
Zope 2.10.13 (2011/02/04)
Bugs fixed
- Prevent publication of acquired attributes, where the acquired
object does not have a docstring.
https://bugs.launchpad.net/zope2/+bug/713253/
Zope 2.10.12 (2010/09/01)
Bugs fixed
...
...
inst/WinBuilders/mk/zope.mk
View file @
55986d1b
ZOPEVERSION
=
2.10.1
2
-final
ZOPEVERSION
=
2.10.1
3
-final
ZOPEDIRNAME
:=
Zope-
$(ZOPEVERSION)
ZOPE_REQUIRED_FILES
=
tmp/
$(ZOPEDIRNAME)
.tgz
...
...
inst/versions.py
View file @
55986d1b
ZOPE_MAJOR_VERSION
=
'2.10'
ZOPE_MINOR_VERSION
=
'1
2
'
ZOPE_MINOR_VERSION
=
'1
3
'
ZOPE_BRANCH_NAME
=
'$Name$'
[
6
:]
or
'no-branch'
# always start prerelease branches with '0' to avoid upgrade
...
...
lib/python/ZPublisher/BaseRequest.py
View file @
55986d1b
...
...
@@ -116,23 +116,21 @@ class DefaultPublishTraverse(object):
# Again, clear any error status created by __bobo_traverse__
# because we actually found something:
request
.
response
.
setStatus
(
200
)
return
subobject
except
AttributeError
:
pass
# Lastly we try with key access:
try
:
subobject
=
object
[
name
]
except
TypeError
:
# unsubscriptable
raise
KeyError
(
name
)
if
subobject
is
None
:
try
:
subobject
=
object
[
name
]
except
TypeError
:
# unsubscriptable
raise
KeyError
(
name
)
# Ensure that the object has a docstring, or that the parent
# object has a pseudo-docstring for the object. Objects that
# have an empty or missing docstring are not published.
doc
=
getattr
(
subobject
,
'__doc__'
,
None
)
if
doc
is
None
:
doc
=
getattr
(
object
,
'%s__doc__'
%
name
,
None
)
if
not
doc
:
raise
Forbidden
(
"The object at %s has an empty or missing "
\
...
...
lib/python/ZPublisher/tests/testBaseRequest.py
View file @
55986d1b
...
...
@@ -166,6 +166,13 @@ class TestBaseRequest(unittest.TestCase):
r
=
self
.
_makeOne
(
root
)
self
.
assertRaises
(
NotFound
,
r
.
traverse
,
'folder/objBasic/noview'
)
def
test_traverse_acquired_attribute_without_docstring
(
self
):
from
ZPublisher
import
NotFound
root
,
folder
=
self
.
_makeRootAndFolder
()
root
.
_setObject
(
'objBasic'
,
DummyObjectWithoutDocstring
())
r
=
self
.
_makeOne
(
root
)
self
.
assertRaises
(
NotFound
,
r
.
traverse
,
'folder/objBasic'
)
def
test_traverse_class_without_docstring
(
self
):
from
ZPublisher
import
NotFound
root
,
folder
=
self
.
_makeRootAndFolder
()
...
...
setup.py
View file @
55986d1b
...
...
@@ -462,7 +462,7 @@ doclines = __doc__.split("\n")
setup
(
name
=
'Zope'
,
author
=
AUTHOR
,
version
=
"2.10.
7-dev
"
,
version
=
"2.10.
13
"
,
maintainer
=
"Zope Corporation"
,
maintainer_email
=
"zope-dev@zope.org"
,
url
=
"http://www.zope.org/"
,
...
...
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