You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inspect.getfullargspec() is deprecated in python 3.8 #295
we are using getargspec in exactly the prehistoric "turbogears" plugin, and we're using it on our own Template.init which seems kind of silly. we should just remove it
diff --git a/mako/ext/turbogears.py b/mako/ext/turbogears.py
index eaa2d78..8e0394d 100644
--- a/mako/ext/turbogears.py
+++ b/mako/ext/turbogears.py
@@ -29,9 +29,9 @@ class TGPlugin(object):
self.lookup = TemplateLookup(**lookup_options)
self.tmpl_options = {}
- # transfer lookup args to template args, based on those available
- # in getargspec
- for kw in compat.inspect_getargspec(Template.__init__)[0]:
+ # transfer lookup args to template args, based on those which
+ # the TemplateLookup would use
+ for kw in self.lookup.template_args:
if kw in lookup_options:
self.tmpl_options[kw] = lookup_options[kw]
but the rest has to be from a new approach to getfullargspec
Activity
zzzeek commentedon May 16, 2019
we are using getargspec in exactly the prehistoric "turbogears" plugin, and we're using it on our own Template.init which seems kind of silly. we should just remove it
zzzeek commentedon May 16, 2019
bzzt I'm wrong, we should fix the TG thing but we use it in runtime as well via inspect_func_args
zzzeek commentedon May 16, 2019
getargspec is used in Mako for
TG thing which we can remove
kwargs_for_callable and kwargs_for_include which are template callables generated by mako
zzzeek commentedon May 16, 2019
here is the turbogears part:
but the rest has to be from a new approach to getfullargspec
zzzeek commentedon Jul 27, 2019
this needs to be vendored the same way we did it at sqlalchemy/sqlalchemy#4674, cut and paste
sqla-tester commentedon Jul 27, 2019
Mike Bayer has proposed a fix for this issue in the master branch:
Bump Python versions, remove conditional imports https://gerrit.sqlalchemy.org/1380