Skip to content

Commit 614121c

Browse files
epicfaacefacebook-github-bot
authored andcommitted
Replace getargspec with getfullargspec (pytorch#15396)
Summary: Replace `getargspec` with `getfullargspec` to resolve test warnings. Fixes pytorch#15344 . Pull Request resolved: pytorch#15396 Differential Revision: D13529548 Pulled By: zou3519 fbshipit-source-id: 50d3be92423a9ce89bc4895b67569663e1abbaa6
1 parent 2b23ba8 commit 614121c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/common_utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ def to_gpu(obj, type_map={}):
178178

179179

180180
def get_function_arglist(func):
181-
return inspect.getargspec(func).args
181+
if sys.version_info > (3,):
182+
return inspect.getfullargspec(func).args
183+
else:
184+
return inspect.getargspec(func).args
182185

183186

184187
def set_rng_seed(seed):

0 commit comments

Comments
 (0)