pyopenapi/pyswagger

requests.Session is not properly closed

PabloCastellano opened this issue · 0 comments

I'm using pyswagger inside a Django project to retrieve data from another API. On every request I'm getting the following warning:

/home/xxx/virtualenvs/aee/lib/python3.6/site-packages/django/views/generic/base.py:97: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 59088), raddr=('127.0.0.1', 8000)>
  return handler(request, *args, **kwargs)

After some debugging, looks like requests.Session is never closed. Pull request sent.