[Checkins] SVN: RestrictedPython/trunk/src/RestrictedPython/ - Fixed deprecation warning: 'with' is now a reserved keyword on
Sidnei da Silva
sidnei at enfoldsystems.com
Tue Oct 7 15:54:04 EDT 2008
Log message for revision 91883:
- Fixed deprecation warning: 'with' is now a reserved keyword on
Python 2.6. That means RestrictedPython should run on Python 2.6
now. Thanks to Ranjith Kannikara, GSoC Student for the patch.
Changed:
U RestrictedPython/trunk/src/RestrictedPython/README.txt
U RestrictedPython/trunk/src/RestrictedPython/Utilities.py
-=-
Modified: RestrictedPython/trunk/src/RestrictedPython/README.txt
===================================================================
--- RestrictedPython/trunk/src/RestrictedPython/README.txt 2008-10-07 19:49:59 UTC (rev 91882)
+++ RestrictedPython/trunk/src/RestrictedPython/README.txt 2008-10-07 19:54:04 UTC (rev 91883)
@@ -195,6 +195,13 @@
Changes
=======
+3.4.3 - Unreleased
+------------------
+
+- Fixed deprecation warning: 'with' is now a reserved keyword on
+ Python 2.6. That means RestrictedPython should run on Python 2.6
+ now. Thanks to Ranjith Kannikara, GSoC Student for the patch.
+
3.4.2 (2007/07/28)
------------------
Modified: RestrictedPython/trunk/src/RestrictedPython/Utilities.py
===================================================================
--- RestrictedPython/trunk/src/RestrictedPython/Utilities.py 2008-10-07 19:49:59 UTC (rev 91882)
+++ RestrictedPython/trunk/src/RestrictedPython/Utilities.py 2008-10-07 19:54:04 UTC (rev 91883)
@@ -53,11 +53,11 @@
if l%2: return args[-1]
utility_builtins['test'] = test
-def reorder(s, with=None, without=()):
- # s, with, and without are sequences treated as sets.
- # The result is subtract(intersect(s, with), without),
- # unless with is None, in which case it is subtract(s, without).
- if with is None: with=s
+def reorder(s, with_=None, without=()):
+ # s, with_, and without are sequences treated as sets.
+ # The result is subtract(intersect(s, with_), without),
+ # unless with_ is None, in which case it is subtract(s, without).
+ if with_ is None: with_=s
d={}
tt=type(())
for i in s:
@@ -73,7 +73,7 @@
else: k= v = i
if h(k): del d[k]
- for i in with:
+ for i in with_:
if type(i) is tt and len(i)==2: k, v = i
else: k= v = i
if h(k):
More information about the Checkins
mailing list