Closed coreyryanhanson closed 1 year ago
When making many requests with this library, resource warnings from unclosed ssl sockets are inevitable.
This is because new request sessions are created with each call to the API but never closed.
With this pull request each session is generated using a context manager and automatically closed after each request is made.
@coreyryanhanson thanks for the contribution
Just uploaded to PyPI https://pypi.org/project/usgs/0.3.5/
When making many requests with this library, resource warnings from unclosed ssl sockets are inevitable.
This is because new request sessions are created with each call to the API but never closed.
With this pull request each session is generated using a context manager and automatically closed after each request is made.