Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Remove deprecated calls to inspect.getargspec #1324

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Dec 22, 2018

inspect.getargspec is deprecated since Python 3.0. This PR replaces it's usage with getfullargspec to get rid of deprecation warnings. This PR replaces it's usage with tf_inspect to remove the warnings.

Fixes #1294 after tensorflow/tensorflow#22517 is shipped.

@googlebot googlebot added the cla: yes PR author has signed CLA label Dec 22, 2018
@lgeiger
Copy link
Contributor Author

lgeiger commented Dec 22, 2018

Looks like getfullargspec isn't available in Python 2 :(
Meaning we should either use tf_inspect or write our own. I replaced native inspect with tf_inspect for better Python 2/3 compatibility.

@lgeiger lgeiger force-pushed the inspect-deprecation branch from 523e041 to ec99e59 Compare December 30, 2018 19:29
Copy link
Contributor

@lukaszkaiser lukaszkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@lukaszkaiser
Copy link
Contributor

Enormous thanks for correcting this problem for everyone!

@lukaszkaiser lukaszkaiser merged commit 3e483ad into tensorflow:master Jan 4, 2019
tensorflow-copybara pushed a commit that referenced this pull request Jan 4, 2019
PiperOrigin-RevId: 227888281
@lgeiger lgeiger deleted the inspect-deprecation branch January 4, 2019 19:45
kpe pushed a commit to kpe/tensor2tensor that referenced this pull request Mar 2, 2019
kpe pushed a commit to kpe/tensor2tensor that referenced this pull request Mar 2, 2019
PiperOrigin-RevId: 227888281
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants