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

Unclosed socket(s) when running Python-side tests under Windows. #11

Open
rodrigogiraoserrao opened this issue Oct 14, 2021 · 0 comments
Labels
bug Things not working as they should. question Further reasoning/investigation is needed to make a decision.

Comments

@rodrigogiraoserrao
Copy link
Contributor

rodrigogiraoserrao commented Oct 14, 2021

When running the test suite with python -m unittest under Windows 10, I get several ResourceWarning complaining about unclosed sockets.

This is probably a bug.

> python -m unittest
C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=648, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 56987), raddr=('127.0.0.1', 56992)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=740, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 56993), raddr=('127.0.0.1', 56997)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=604, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 56998), raddr=('127.0.0.1', 57003)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=700, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57004), raddr=('127.0.0.1', 57008)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\Array.py:293: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  if isinstance(obj, collections.Iterable) \
C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=740, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57010), raddr=('127.0.0.1', 57014)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=732, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57015), raddr=('127.0.0.1', 57019)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=732, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57020), raddr=('127.0.0.1', 57024)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
...C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=732, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57025), raddr=('127.0.0.1', 57029)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\IPC.py:83: ResourceWarning: unclosed <socket.socket fd=660, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57030), raddr=('127.0.0.1', 57034)>
  self.sockfile=self.sock=None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
...
----------------------------------------------------------------------
Ran 13 tests in 32.845s

OK
@rodrigogiraoserrao rodrigogiraoserrao added bug Things not working as they should. question Further reasoning/investigation is needed to make a decision. labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things not working as they should. question Further reasoning/investigation is needed to make a decision.
Projects
None yet
Development

No branches or pull requests

1 participant