Thanks to visit codestin.com
Credit goes to github.com

Skip to content

inspect.getargspec() deprecated in Python 3 #35

@MichaelMcAleer

Description

@MichaelMcAleer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions