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
f497b85d
Commit
f497b85d
authored
Jun 23, 2007
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #2295: Comments in PythonScripts could lead to syntax
errors
parent
cb47030a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
doc/CHANGES.txt
doc/CHANGES.txt
+4
-1
lib/python/Products/PythonScripts/tests/testPythonScript.py
lib/python/Products/PythonScripts/tests/testPythonScript.py
+3
-0
lib/python/RestrictedPython/RCompile.py
lib/python/RestrictedPython/RCompile.py
+2
-2
No files found.
doc/CHANGES.txt
View file @
f497b85d
...
@@ -4,10 +4,13 @@ Zope Changes
...
@@ -4,10 +4,13 @@ Zope Changes
Change information for previous versions of Zope can be found in the
Change information for previous versions of Zope can be found in the
file HISTORY.txt.
file HISTORY.txt.
Zope 2.10.4 (
unreleased
)
Zope 2.10.4 (
23.06.2007
)
Bugs fixed
Bugs fixed
- Collector #2295: Comments in PythonScripts could lead to syntax
errors
- Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
- Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
- Collector #2304: fixed markup issue in ptEdit.zpt
- Collector #2304: fixed markup issue in ptEdit.zpt
...
...
lib/python/Products/PythonScripts/tests/testPythonScript.py
View file @
f497b85d
...
@@ -128,6 +128,9 @@ class TestPythonScriptNoAq(PythonScriptTestBase):
...
@@ -128,6 +128,9 @@ class TestPythonScriptNoAq(PythonScriptTestBase):
res
=
self
.
_newPS
(
'return 1 * 5 + 4 / 2 - 6'
)()
res
=
self
.
_newPS
(
'return 1 * 5 + 4 / 2 - 6'
)()
self
.
assertEqual
(
res
,
1
)
self
.
assertEqual
(
res
,
1
)
def
testCollector2295
(
self
):
res
=
self
.
_newPS
(
'if False:
\
n
pass
\
n
#hi'
)
def
testReduce
(
self
):
def
testReduce
(
self
):
res
=
self
.
_newPS
(
'return reduce(lambda x, y: x + y, [1,3,5,7])'
)()
res
=
self
.
_newPS
(
'return reduce(lambda x, y: x + y, [1,3,5,7])'
)()
self
.
assertEqual
(
res
,
16
)
self
.
assertEqual
(
res
,
16
)
...
...
lib/python/RestrictedPython/RCompile.py
View file @
f497b85d
...
@@ -43,7 +43,7 @@ class RestrictedCompileMode(AbstractCompileMode):
...
@@ -43,7 +43,7 @@ class RestrictedCompileMode(AbstractCompileMode):
def
__init__
(
self
,
source
,
filename
):
def
__init__
(
self
,
source
,
filename
):
if
source
:
if
source
:
source
=
'
\
n
'
.
join
(
source
.
splitlines
())
source
=
'
\
n
'
.
join
(
source
.
splitlines
())
+
'
\
n
'
self
.
rm
=
RestrictionMutator
()
self
.
rm
=
RestrictionMutator
()
AbstractCompileMode
.
__init__
(
self
,
source
,
filename
)
AbstractCompileMode
.
__init__
(
self
,
source
,
filename
)
...
@@ -209,7 +209,7 @@ class RFunction(RModule):
...
@@ -209,7 +209,7 @@ class RFunction(RModule):
def
__init__
(
self
,
p
,
body
,
name
,
filename
,
globals
):
def
__init__
(
self
,
p
,
body
,
name
,
filename
,
globals
):
self
.
params
=
p
self
.
params
=
p
if
body
:
if
body
:
body
=
'
\
n
'
.
join
(
body
.
splitlines
())
body
=
'
\
n
'
.
join
(
body
.
splitlines
())
+
'
\
n
'
self
.
body
=
body
self
.
body
=
body
self
.
name
=
name
self
.
name
=
name
self
.
globals
=
globals
or
[]
self
.
globals
=
globals
or
[]
...
...
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