Commit d9741d14 authored by Barry Warsaw's avatar Barry Warsaw

Sigh. ZODB4 and ZODB3 share this package exactly, so we can't enable

the warnings until the other fixes are ported to ZODB4.

Added an XXX to memind me.
parent a42b2dd2
...@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop ...@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop
thread calls loop(), each registered callback will be called with the thread calls loop(), each registered callback will be called with the
socket map as its first argument. socket map as its first argument.
""" """
__version__ = '$Revision: 1.7 $'[11:-2] __version__ = '$Revision: 1.8 $'[11:-2]
import asyncore import asyncore
import select import select
...@@ -157,12 +157,15 @@ def loop(timeout=30.0, use_poll=0, map=None): ...@@ -157,12 +157,15 @@ def loop(timeout=30.0, use_poll=0, map=None):
# break 3rd party code. So we'll issue a warning and let it continue -- for # break 3rd party code. So we'll issue a warning and let it continue -- for
# now. # now.
def deprecated_loop(*args, **kws): ##def deprecated_loop(*args, **kws):
import warnings ## import warnings
warnings.warn("""\ ## warnings.warn("""\
ThreadedAsync.loop() called through sneaky asyncore.loop() rebinding. ##ThreadedAsync.loop() called through sneaky asyncore.loop() rebinding.
You should change your code to call ThreadedAsync.loop() explicitly.""", ##You should change your code to call ThreadedAsync.loop() explicitly.""",
DeprecationWarning) ## DeprecationWarning)
loop(*args, **kws) ## loop(*args, **kws)
asyncore.loop = deprecated_loop ##asyncore.loop = deprecated_loop
# XXX Remove this once we've updated ZODB4 since they share this package
asyncore.loop = loop
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment