Skip to content

Commit 6c1499c

Browse files
[docker] Run stubtest on Windows to cover the named pipe transport (#16422)
docker-py installs pywin32 on Windows, so docker.transport.npipeconn and docker.transport.npipesocket import there and stubtest reported the global allowlist entries for them as unused. Move those entries to the linux and darwin allowlists, where the modules fail to import, and add win32 to ci-platforms so the npipe stubs are checked against the runtime.
1 parent 88806a5 commit 6c1499c

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎stubs/docker/@tests/stubtest_allowlist.txt‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# additional requirements are needed, e.g. win32 apis
2-
docker.transport.npipeconn
3-
docker.transport.npipesocket
1+
# requires paramiko, which is only installed with the ssh extra
42
docker.transport.sshconn
53

64
# model is always set by child classes
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# the named pipe transport requires pywin32, which is only installed on Windows
2+
docker.transport.npipeconn
3+
docker.transport.npipesocket
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# the named pipe transport requires pywin32, which is only installed on Windows
2+
docker.transport.npipeconn
3+
docker.transport.npipesocket

‎stubs/docker/METADATA.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ version = "7.2.*"
22
upstream-repository = "https://github.com/docker/docker-py"
33
dependencies = ["types-requests", "urllib3>=2"]
44
optional-dependencies = ["types-paramiko"]
5+
6+
[tool.stubtest]
7+
ci-platforms = ["linux", "win32"]

0 commit comments

Comments
 (0)