[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/ Removed weakref Python monkey patch

Jim Fulton jim at zope.com
Fri Jun 4 17:35:19 EDT 2004


Log message for revision 25267:
Removed weakref Python monkey patch

So Python 2.3.4 is now required.

Merged trunk 25266





-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/__init__.py	2004-06-04 21:25:45 UTC (rev 25266)
+++ Zope3/branches/ZopeX3-3.0/src/zope/__init__.py	2004-06-04 21:35:19 UTC (rev 25267)
@@ -13,23 +13,3 @@
 ##############################################################################
 #
 # This file is necessary to make this directory a package.
-
-# XXX Evil monkey patch of weakref to avoid a Python 2.3.3 weakref bug that
-# causes sporadic segfaults
-
-def monkey_patch():
-    import weakref
-    import gc
-    ref = weakref.ref
-    disable = gc.disable
-    enable = gc.enable
-    def monkey_ref(*args, **kw):
-        disable()
-        r = ref(*args, **kw)
-        enable()
-        return r
-
-    weakref.ref = monkey_ref
-
-monkey_patch()
-del monkey_patch

Modified: Zope3/branches/ZopeX3-3.0/z3.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/z3.py	2004-06-04 21:25:45 UTC (rev 25266)
+++ Zope3/branches/ZopeX3-3.0/z3.py	2004-06-04 21:35:19 UTC (rev 25267)
@@ -23,10 +23,10 @@
 
 def run(argv=list(sys.argv)):
 
-    if sys.version_info < ( 2,3,2 ):
+    if sys.version_info < ( 2,3,4 ):
         print """\
         ERROR: Your python version is not supported by Zope3.
-        Zope3 needs Python 2.3.2 or greater. You are running:""" + sys.version
+        Zope3 needs Python 2.3.4 or greater. You are running:""" + sys.version
         sys.exit(1)
 
     # Refuse to run without principals.zcml




More information about the Zope3-Checkins mailing list