From 6048388c3e1334f055ea93062e7b3e3ae79e1be9 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Sat, 20 Jun 2009 18:13:12 +0700 Subject: [PATCH] proc: add deprecation warning to trap_errors() --- eventlet/proc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eventlet/proc.py b/eventlet/proc.py index 7b18b77..6b2a947 100644 --- a/eventlet/proc.py +++ b/eventlet/proc.py @@ -624,7 +624,10 @@ def spawn_link_exception(function, *args, **kwargs): def trap_errors(errors, func, *args, **kwargs): - """DEPRECATED in favor of wrap_errors""" + """DEPRECATED; use wrap_errors""" + import warnings + warnings.warn("proc.trap_errors function is deprecated in favor of proc.wrap_errors class", + DeprecationWarning, stacklevel=2) try: return func(*args, **kwargs) except errors, ex: