ResourceWarning: unclosed socket #36

Open
elopio opened this Issue Nov 2, 2017 · 0 comments

Comments

Projects
None yet
1 participant

elopio commented Nov 2, 2017

Hello!

I'm getting a warning about the socket being unclosed. I'm using requests_unixsocket.Session() in a context manager, so I was expecting it to be closed for me.

To reproduce:

$ python3
>>> import requests_unixsocket
>>> import warnings
>>> warnings.simplefilter('default')
>>> with requests_unixsocket.Session() as session:
...    snap_info = session.get('http+unix://%2Frun%2Fsnapd.socket/v2/snaps/core')
... 
__main__:2: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/run/snapd.socket>
$ lsb_release -d
Description:    Ubuntu 16.04.3 LTS
$ python3 --version
Python 3.5.2
$ pip list | grep requests-unixsocket
requests-unixsocket (0.1.5)

@elopio elopio referenced this issue in snapcore/snapcraft Nov 2, 2017

Merged

Release changelog for 2.35 #1650

6 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment