Closed munkybutt closed 1 year ago
just hit the same issue, wanted to open PR for it and voila - its already here! Thanks
Looks good to me. 🍻
I just did a quick codebase search and I found out that in here in pyblish/compat.py
also uses deprecated inspect.getargspec
. Should we also update that one?
The other appearance is in pyblish/vendor/mock.py
, but it's for testing and it's a vendored module so maybe other PR when needed.
Really good point - I will fix those up too
looks like vendor/mock already has this handled: https://github.com/pyblish/pyblish-base/blob/master/pyblish/vendor/mock.py#L170
inspect.getargspec
has been removed from Python 3.11 so it's no longer just a matter of depreciation warnings and slower startup times. Pyblish currently will not run on the latest stable Python release because of this bug so it would be great to get this PR merged.
Bump - any chance of proceeding with a merge, especially as it is making Pyblish nonfunctional on Python 3.11
Marcus is on vacation at the moment, should be back in a couple weeks. :)
Hey - any progress on getting this merged?
@mottosso @davidlatwe What's needed to get this merged?
Hi everyone, sorry this slipped under my radar. Feel free to @mottosso me like the above to make it appear on my list of things todo.
As for the PR, this looks solid to me - short and sweet - and all tests still pass. Merging this!
This PR adds Py3 specific import for
inspect.getfullargspec
asinspect.getargspec
is depreciated since Py3.0. More info here: https://docs.python.org/3/library/inspect.html#inspect.getargspecThis also removes warnings output from Pyblish upon plugin discovery which prints the following 3 times per plugin discovered:
"DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec(), at line 350, in "...\pyblish\plugin.py""
. This has a noticeable impact on startup performance for projects with a large number of plugins.Py2: functionality remains unchanged Py3: tested in Py37 + Py39