[Zope3-checkins] CVS: Zope3/src/zope/app/interpreter - python.py:1.4
Anthony Baxter
anthony at interlink.com.au
Mon Feb 2 10:04:12 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/interpreter
In directory cvs.zope.org:/tmp/cvs-serv25832/app/interpreter
Modified Files:
python.py
Log Message:
Fixed test failures (not mine - I was just setting up stuff for a live demo
tomorrow night and found them broken).
Note that the z.app.interpreter.python file had some "needed for
2.2" code - this did not work under 2.3. Indeed, as it was trying to
concatenate a code object and a newline, I can't see how it'd work
there, either. Since we don't run on less than 2.3, I can't see why
the code is needed.
If the package is meant to be usable under 2.2, feel free to revert
the change and replace it with code that still works on 2.3.
=== Zope3/src/zope/app/interpreter/python.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interpreter/python.py:1.3 Mon Nov 3 23:04:27 2003
+++ Zope3/src/zope/app/interpreter/python.py Mon Feb 2 10:03:41 2004
@@ -33,8 +33,9 @@
ri = RestrictedInterpreter()
ri.globals = globals
try:
- # The newline character is for Python 2.2 :(
- ri.ri_exec(code+'\n')
+ # This used to add a newline for Python 2.2. As far as
+ # I know, we only care about 2.3 and later.
+ ri.ri_exec(code)
finally:
result = sys.stdout
sys.stdout = tmp
More information about the Zope3-Checkins
mailing list