[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/ Added `__name__` to the FSPythonScript execution scope in addition to `__file__`. This makes Python 2.6's warnings module happy.
Hanno Schlichting
plone at hannosch.info
Sat Jan 17 17:08:41 EST 2009
Log message for revision 94814:
Added `__name__` to the FSPythonScript execution scope in addition to `__file__`. This makes Python 2.6's warnings module happy.
Changed:
U Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
U Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py
-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt 2009-01-17 22:08:04 UTC (rev 94813)
+++ Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt 2009-01-17 22:08:41 UTC (rev 94814)
@@ -4,6 +4,9 @@
2.2.0 (unreleased)
------------------
+- Added `__name__` to the FSPythonScript execution scope in addition to
+ `__file__`. This makes Python 2.6's warnings module happy.
+
- Cleaned up / normalized imports:
o Don't import from Globals; instead, use real locations.
Modified: Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py 2009-01-17 22:08:04 UTC (rev 94813)
+++ Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py 2009-01-17 22:08:41 UTC (rev 94814)
@@ -180,6 +180,7 @@
new_globals['__traceback_supplement__'] = (
FSPythonScriptTracebackSupplement, self)
new_globals['__file__'] = self._filepath
+ new_globals['__name__'] = self.id
if bound_names:
new_globals.update(bound_names)
if f.func_defaults:
More information about the Checkins
mailing list