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

Project tests report unclosed socket warnings #270

Open
camallen opened this issue Nov 18, 2021 · 1 comment
Open

Project tests report unclosed socket warnings #270

camallen opened this issue Nov 18, 2021 · 1 comment

Comments

@camallen
Copy link
Contributor

Tests are showing warnings about unclosed sockets (python 3.9).

It appears we we aren't tearing down the request session socket correctly https://stackoverflow.com/questions/48160728/resourcewarning-unclosed-socket-in-python-3-unit-test but I don't see these warnings when using the code (perhaps due to logging contexts?)

From https://github.com/zooniverse/panoptes-python-client/runs/4251790766?check_suite_focus=true

./home/runner/work/panoptes-python-client/panoptes-python-client/panoptes_client/panoptes.py:622: ResourceWarning: unclosed <ssl.SSLSocket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.1.1.45', 39214), raddr=('13.107.213.41', 443)>
  return Panoptes.client().get(
ResourceWarning: Enable tracemalloc to get the object allocation traceback

These break the panoptes-cli tests

@camallen camallen changed the title Project tests report unclosed socker warnings Project tests report unclosed socket warnings Nov 18, 2021
@camallen
Copy link
Contributor Author

related psf/requests#1882 and psf/requests#3912

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

No branches or pull requests

1 participant