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
6580745e
Commit
6580745e
authored
Jul 05, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
584a272d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Acquisition/_Acquisition.c
lib/python/Acquisition/_Acquisition.c
+1
-1
lib/python/Acquisition/tests.py
lib/python/Acquisition/tests.py
+27
-0
No files found.
doc/CHANGES.txt
View file @
6580745e
...
...
@@ -127,6 +127,8 @@ Zope Changes
Bugs fixed
- Collector #1406: fixed segmentation fault by acquisition
- Collector #1392: ExternalMethod ignored management_page_charset
- unrestrictedTraverse() refactored to remove hasattr calls (which mask
...
...
lib/python/Acquisition/_Acquisition.c
View file @
6580745e
...
...
@@ -466,7 +466,7 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
ASSIGN
(
r
,
PyECMethod_New
(
r
,
OBJECT
(
self
)));
else
if
(
has__of__
(
r
))
ASSIGN
(
r
,
__of__
(
r
,
OBJECT
(
self
)));
if
(
filter
)
if
(
r
&&
filter
)
switch
(
apply_filter
(
filter
,
OBJECT
(
self
),
oname
,
r
,
extra
,
orig
))
{
case
-
1
:
return
NULL
;
...
...
lib/python/Acquisition/tests.py
View file @
6580745e
...
...
@@ -534,6 +534,33 @@ def test_simple():
"""
def
test__of__exception
():
"""
Wrapper_findattr did't check for an exception in a user defined
__of__ method before passing the result to the filter. In this
case the 'value' argument of the filter was NULL, which caused
a segfault when being accessed.
>>> class UserError(Exception):
... pass
...
>>> class X(Acquisition.Implicit):
... def __of__(self, parent):
... if Acquisition.aq_base(parent) is not parent:
... raise UserError, 'ack'
... return X.inheritedAttribute('__of__')(self, parent)
...
>>> a = I('a')
>>> a.b = I('b')
>>> a.b.x = X('x')
>>> Acquisition.aq_acquire(a.b, 'x',
... lambda self, object, name, value, extra: repr(value))
Traceback (most recent call last):
...
UserError: ack
"""
def
test_muliple
():
r"""
>>> a = I('a')
...
...
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