Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inspect.getargspec() deprecated in Python 3 #35

Open
MichaelMcAleer opened this issue Mar 15, 2020 · 0 comments
Open

inspect.getargspec() deprecated in Python 3 #35

MichaelMcAleer opened this issue Mar 15, 2020 · 0 comments

Comments

@MichaelMcAleer
Copy link

Hi PBA Team,

Spotted this warning in my IDE when looking through your code:

if 'image_size' in inspect.getargspec(self.xform).args:

getargspec() has been deprecated since Python 3.0 in favour of getfullargspec()

It may be worthwhile adding a try/except block for this import because getfullargspec() isn't available in Python 2.x

https://docs.python.org/2.7/library/inspect.html#inspect.getargspec
https://docs.python.org/3.7/library/inspect.html#inspect.getargspec
https://docs.python.org/3.7/library/inspect.html#inspect.getfullargspec

Kind regards,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant