|
|
dc1d55 |
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
|
|
|
dc1d55 |
index 213f3a0..1518d2b 100644
|
|
|
dc1d55 |
--- a/lib/sqlalchemy/util/langhelpers.py
|
|
|
dc1d55 |
+++ b/lib/sqlalchemy/util/langhelpers.py
|
|
|
dc1d55 |
@@ -371,7 +371,9 @@ def format_argspec_plus(fn, grouped=True):
|
|
|
dc1d55 |
else:
|
|
|
dc1d55 |
# we accept an existing argspec...
|
|
|
dc1d55 |
spec = fn
|
|
|
dc1d55 |
- args = inspect.formatargspec(*spec)
|
|
|
dc1d55 |
+ with warnings.catch_warnings():
|
|
|
dc1d55 |
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
|
dc1d55 |
+ args = inspect.formatargspec(*spec)
|
|
|
dc1d55 |
if spec[0]:
|
|
|
dc1d55 |
self_arg = spec[0][0]
|
|
|
dc1d55 |
elif spec[1]:
|
|
|
dc1d55 |
@@ -380,8 +382,10 @@ def format_argspec_plus(fn, grouped=True):
|
|
|
dc1d55 |
self_arg = None
|
|
|
dc1d55 |
|
|
|
dc1d55 |
if compat.py3k:
|
|
|
dc1d55 |
- apply_pos = inspect.formatargspec(spec[0], spec[1],
|
|
|
dc1d55 |
- spec[2], None, spec[4])
|
|
|
dc1d55 |
+ with warnings.catch_warnings():
|
|
|
dc1d55 |
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
|
dc1d55 |
+ apply_pos = inspect.formatargspec(spec[0], spec[1],
|
|
|
dc1d55 |
+ spec[2], None, spec[4])
|
|
|
dc1d55 |
num_defaults = 0
|
|
|
dc1d55 |
if spec[3]:
|
|
|
dc1d55 |
num_defaults += len(spec[3])
|
|
|
dc1d55 |
@@ -400,9 +404,11 @@ def format_argspec_plus(fn, grouped=True):
|
|
|
dc1d55 |
else:
|
|
|
dc1d55 |
defaulted_vals = ()
|
|
|
dc1d55 |
|
|
|
dc1d55 |
- apply_kw = inspect.formatargspec(name_args, spec[1], spec[2],
|
|
|
dc1d55 |
- defaulted_vals,
|
|
|
dc1d55 |
- formatvalue=lambda x: '=' + x)
|
|
|
dc1d55 |
+ with warnings.catch_warnings():
|
|
|
dc1d55 |
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
|
dc1d55 |
+ apply_kw = inspect.formatargspec(name_args, spec[1], spec[2],
|
|
|
dc1d55 |
+ defaulted_vals,
|
|
|
dc1d55 |
+ formatvalue=lambda x: '=' + x)
|
|
|
dc1d55 |
if grouped:
|
|
|
dc1d55 |
return dict(args=args, self_arg=self_arg,
|
|
|
dc1d55 |
apply_pos=apply_pos, apply_kw=apply_kw)
|
|
|
dc1d55 |
@@ -646,8 +652,10 @@ def monkeypatch_proxied_specials(into_cls, from_cls, skip=None, only=None,
|
|
|
dc1d55 |
continue
|
|
|
dc1d55 |
try:
|
|
|
dc1d55 |
spec = compat.inspect_getargspec(fn)
|
|
|
dc1d55 |
- fn_args = inspect.formatargspec(spec[0])
|
|
|
dc1d55 |
- d_args = inspect.formatargspec(spec[0][1:])
|
|
|
dc1d55 |
+ with warnings.catch_warnings():
|
|
|
dc1d55 |
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
|
dc1d55 |
+ fn_args = inspect.formatargspec(spec[0])
|
|
|
dc1d55 |
+ d_args = inspect.formatargspec(spec[0][1:])
|
|
|
dc1d55 |
except TypeError:
|
|
|
dc1d55 |
fn_args = '(self, *args, **kw)'
|
|
|
dc1d55 |
d_args = '(*args, **kw)'
|