Skip to content

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

Open
@kasium

Description

@kasium

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions