aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework
diff options
context:
space:
mode:
authorGravatar IMBurbank <bassmanburbank@gmail.com>2018-09-27 22:21:47 -0600
committerGravatar IMBurbank <bassmanburbank@gmail.com>2018-09-27 22:21:47 -0600
commitefe17306442aa91192df953ae537d3f9b824dae6 (patch)
treecd36fdea64c4927bb9e868abdda2f0e08d21e630 /tensorflow/python/framework
parent5bbcdb8a58efd97b0f73927218d5896da67f5203 (diff)
Updated python3 tf_inspect.getargspec calls to use getfullargspec and repackage the return values into the getargspec struct.
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r--tensorflow/python/framework/errors_impl.py2
-rw-r--r--tensorflow/python/framework/function.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/python/framework/errors_impl.py b/tensorflow/python/framework/errors_impl.py
index c373e75a74..5af71f2cfb 100644
--- a/tensorflow/python/framework/errors_impl.py
+++ b/tensorflow/python/framework/errors_impl.py
@@ -55,7 +55,7 @@ class OpError(Exception):
def __reduce__(self):
# Allow the subclasses to accept less arguments in their __init__.
- init_argspec = tf_inspect.getfullargspec(self.__class__.__init__)
+ init_argspec = tf_inspect.getargspec(self.__class__.__init__)
args = tuple(getattr(self, arg) for arg in init_argspec.args[1:])
return self.__class__, args
diff --git a/tensorflow/python/framework/function.py b/tensorflow/python/framework/function.py
index 3db6f683c9..225208944e 100644
--- a/tensorflow/python/framework/function.py
+++ b/tensorflow/python/framework/function.py
@@ -132,9 +132,9 @@ class Defun(object):
raise ValueError("func %s must be callable" % func)
# Func should not use kwargs and defaults.
- argspec = tf_inspect.getfullargspec(func)
- if argspec.varkw or argspec.defaults:
- raise ValueError("Functions with argument defaults or varkw "
+ argspec = tf_inspect.getargspec(func)
+ if argspec.keywords or argspec.defaults:
+ raise ValueError("Functions with argument defaults or keywords "
"arguments are not supported.")
# Computes how many arguments 'func' has.