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
Documentation: num_fds() should be get_num_fds() #509
Comments
Link to the documentation I was following: http://pythonhosted.org//psutil/#psutil.Process.num_fds |
Prior to 2.0.0 all Process methods started with "get_". |
It's strange. In your blog post you mention that p.get_num_fds() was replaced with p.num_fds(). However, in psutils 2.1.1 (the version that |
Define "doesn't work". What do you get? |
Well, this happend at my office computer, and I went home, so I cannot check from there. I tried to reproduce the same problem at home, but it appears num_fds() works perfectly here! Well, I guess it's possible I was doing something stupid, who knows. I'll just close this and ask to reopen later if I can reproduce it at work. Thanks. |
My best guess is that you had a version < 2.0.0 installed. |
Well, not in theory, I was running everything in a virtualenv created with --no-site-packages. I don't usually make such noob mistakes, but who knows, maybe I did... |
Argh, I'm such a noob! My problem is that I have a virtualenv, but it is used by some Python 3 code, while the problem I had was with some Python 2 code (a supervisord extension). So in fact, the code that uses psutil was Python 2 and did not use the virtual environment at all :P |
Shit happens (all the time). =) |
I am using psutil 2.1.1. Documentation mentions a method Process.num_fds(), but apparently it is named get_num_fds() instead. Probably other getters are mis-named as well.
The text was updated successfully, but these errors were encountered: