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

ResourceWarning: unclosed <socket.socket> [still occuring] #3268

Open
kasium opened this issue Jun 3, 2024 · 2 comments
Open

ResourceWarning: unclosed <socket.socket> [still occuring] #3268

kasium opened this issue Jun 3, 2024 · 2 comments

Comments

@kasium
Copy link

kasium commented Jun 3, 2024

I can still see the resource warning from #1293 in some cases:

pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=1, type=1, proto=0>

Traceback (most recent call last):
  File "<frozen _collections_abc>", line 435, in __subclasshook__
ResourceWarning: unclosed <socket.socket fd=41, family=1, type=1, proto=0, raddr=/var/run/docker.sock>

I use python 3.12 and docker-py 7.1.

I guess that the close method of BaseHTTPAdapter in docker/transport/basehttpadapter.py should call close on the pool rather than clear

@Khushiyant
Copy link
Contributor

I'm not able to reproduce the warning. Also, Calling clear closes all urllib3.poolmanager.PoolManager instance so no issue here

@kasium
Copy link
Author

kasium commented Jun 17, 2024

Maybe it's worth to mention that I use 1.26.18

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

2 participants