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

Implement inet_ntop to support Windows XP #616

Merged
merged 1 commit into from
Jun 4, 2015

Conversation

mrjefftang
Copy link
Collaborator

Fixes the issue I found @ #597 (comment)

@giampaolo
Copy link
Owner

Sorry for getting at this so late. I don't like having a new file for this. Do you think it's possible to do this in psutil/_psutil_windows.c?

@mrjefftang
Copy link
Collaborator Author

It's possible but _psutil_windows.c seems to be focused on adding actual functionality (_psutil_functions) where as this is just adding a missing library function for Windows XP. It'd be a lot easier to drop in the future (once XP support is removed) if it's kept in a separate file.

@giampaolo
Copy link
Owner

I see your point. OK then. Can you please update HISTORY and CREDITS as well? Then we can merge.

@mrjefftang
Copy link
Collaborator Author

Done and rebased.

giampaolo added a commit that referenced this pull request Jun 4, 2015
Implement inet_ntop to support Windows XP
@giampaolo giampaolo merged commit a302a99 into giampaolo:master Jun 4, 2015
@giampaolo
Copy link
Owner

Merged. Thanks.

@giampaolo
Copy link
Owner

After this change I get 2 errors on Windows 7:

test_special_pid (_windows.WindowsSpecificTestCase) ... ok
test_total_phymem (_windows.WindowsSpecificTestCase) ... ok

======================================================================
ERROR: test_net_if_addrs (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test\test_psutil.py", line 986, in test_net_if_addrs
    nics = psutil.net_if_addrs()
  File "C:\Python27\lib\site-packages\psutil-3.0.0-py2.7-win32.egg\psutil\__init__.py", line 1763, in net_if_addrs
    rawlist = _psplatform.net_if_addrs()
WindowsError: [Error 10014] The system detected an invalid pointer address in attempting to use a pointer argument in a call

======================================================================
ERROR: test_ifconfig (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test\test_psutil.py", line 2730, in test_ifconfig
    self.assert_stdout('ifconfig.py')
  File "test\test_psutil.py", line 2679, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test\test_psutil.py", line 192, in sh
    raise RuntimeError(stderr)
RuntimeError: Traceback (most recent call last):
  File "C:\cygwin64\home\user\psutil\examples\ifconfig.py", line 78, in <module>
    main()
  File "C:\cygwin64\home\user\psutil\examples\ifconfig.py", line 60, in main
    for nic, addrs in psutil.net_if_addrs().items():
  File "C:\Python27\lib\site-packages\psutil-3.0.0-py2.7-win32.egg\psutil\__init__.py", line 1763, in net_if_addrs
    rawlist = _psplatform.net_if_addrs()
WindowsError: [Error 10014] The system detected an invalid pointer address in attempting to use a pointer argument in a call


----------------------------------------------------------------------

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

Successfully merging this pull request may close these issues.

2 participants