-
Notifications
You must be signed in to change notification settings - Fork 6
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 no longer available on Python 3.11 #4
Comments
@adiroiban Thanks for reporting this. I found a workaround: pyinvoke/invoke#833 (comment) I'll be shipping a new release with the fix very soon. |
This is the way I am patching it for nose
|
@adiroiban If you use: if not hasattr(inspect, 'getargspec'):
inspect.getargspec = inspect.getfullargspec does that work for you? That seems to be the solution that many people liked. |
As far as I remember, no. It doesn't work. See the docs https://docs.python.org/3/library/inspect.html#inspect.getfullargspec
but nose is only using the Wouldn't it be better to have everything in the That is, instead of patching the vanilla nose, why not continue the development as a separate project? |
@adiroiban I'll start with the quick patches, and then make more changes as needed. I'll use the following after importing inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4] If you say that solves your current issue, I can make the necessary changes quickly and push a release within an hour. |
I don't think that we need to rush. I think is best to update the automated tests to reveal this issue and then push a fix. Let me give this a try. I will push a PR and I will give you access to the branch. |
@adiroiban If the only change is: if not hasattr(inspect, "getargspec"):
inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4] I can push that change quickly. |
I am not sure that is the only change. But most probably it is. It would have been nice to have the full nose test available and run those tests, rather than reinventing tests for pynose Let's check the changes in the PR. I first would like to see the CI failing and then fix the issue :) And also add a NEWS.md or some release notes file to keep track of latest changes in the repo :p |
Resolved in |
Hi Michael
Thanks for setting up this fork.
I am trying to use this project, in an effort to stop using my personal fork of nose.
I can't get this to work with Python 3.11
I see that the GitHub Action job run with 3.11 is green - https://github.com/mdmintz/pynose/actions/runs/4867487327/jobs/8680119707
I guess that the automated tests don't do any package discovery
The error is
I have something like this.
The text was updated successfully, but these errors were encountered: