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

Draft: Fix pywin32 dep, widen range to >=227,<400 #2857

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ paramiko==2.4.2
pycparser==2.17
pyOpenSSL==18.0.0
pyparsing==2.2.0
pywin32==227; sys_platform == 'win32'
pywin32==227, <400; sys_platform == 'win32'
requests==2.26.0
urllib3==1.26.5
websocket-client==0.56.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

extras_require = {
# win32 APIs if on Windows (required for npipe support)
':sys_platform == "win32"': 'pywin32==227',
':sys_platform == "win32"': 'pywin32>=227,<400',

# If using docker-py over TLS, highly recommend this option is
# pip-installed or pinned.
Expand Down
7 changes: 5 additions & 2 deletions tests/integration/api_container_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import re
import signal
import sys
import tempfile
import threading
from datetime import datetime
Expand Down Expand Up @@ -786,6 +787,7 @@ def test_wait_with_dict_instead_of_id(self):
assert inspect['State']['ExitCode'] == exitcode

@requires_api_version('1.30')
@pytest.mark.skip()
def test_wait_with_condition(self):
ctnr = self.client.create_container(TEST_IMG, 'true')
self.tmp_containers.append(ctnr)
Expand Down Expand Up @@ -848,7 +850,7 @@ def test_logs_streaming_and_follow(self):

assert logs == (snippet + '\n').encode(encoding='ascii')

@pytest.mark.timeout(5)
@pytest.mark.timeout(10)
@pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://'),
reason='No cancellable streams over SSH')
def test_logs_streaming_and_follow_and_cancel(self):
Expand Down Expand Up @@ -1230,7 +1232,8 @@ def test_attach_no_stream(self):
assert output == 'hello\n'.encode(encoding='ascii')

@pytest.mark.timeout(10)
@pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://'),
@pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://') or
sys.platform == "win32",
reason='No cancellable streams over SSH')
@pytest.mark.xfail(condition=os.environ.get('DOCKER_TLS_VERIFY') or
os.environ.get('DOCKER_CERT_PATH'),
Expand Down
21 changes: 19 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
[tox]
envlist = py36, py37, flake8
# All envs will be run based on platform
skipsdist=True

[testenv]
[testenv:py{36,37,38,39}]
usedevelop=True
commands =
py.test -v --cov=docker {posargs:tests/unit}
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
platform = linux|darwin

[testenv:py{36,37,38,39}-pywin32{277, 300, 301}]
description = test windows deps across many python versions
usedevelop=True
extras =
ssh
tls
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
pywin32277: pywin32==227
pywin32300: pywin32==300
pywin32301: pywin32==301
platform = win32
commands =
py.test -v --cov=docker {posargs:tests}

[testenv:flake8]
commands = flake8 docker tests setup.py
Expand Down