Skip to content

Conversation

mjbright
Copy link
Contributor

@mjbright mjbright commented May 4, 2017

No longer use obsolete 'docker-py' version

The Python 'docker' module is now at version 2.2.1 and has changed significantly since the 'docker-py' 1.10 version.

This minor change allows python-docker-machine to work with the current module.

Note: previously installing python-docker-machine was rendering existing 'docker' module unusable as 'docker-py' would be installed.

No longer use obsolete 'docker-py' version
@gijzelaerr
Copy link
Owner

Hi @mjbright! thanks

Did you run the test suite? Didn't the API change in a backwards incompatible way? I didn't manage to get the travis test suite run to work and I can't run it at the moment.

@mjbright
Copy link
Contributor Author

mjbright commented May 5, 2017 via email

@mjbright
Copy link
Contributor Author

mjbright commented May 5, 2017

I ran the nosetests which failed on access to docker.Client.

Updating this to docker.APIClient allowed all tests, including "skipped" tests, to pass.

Tested with docker-machine-0.11 on Ubuntu 16.04.2 LTS with Anaconda (conda v4.3.14).
Tested with docker-machine-0.9 on Fedora 24 with Anaconda (conda v4.3.14).

I was unable to run the tox tests in both environments (basic misunderstanding on my part I believe).

@gijzelaerr
Copy link
Owner

thanks! did you try with python3? i'm getting an error:

λ  .virtualenv/bin/nosetests
.E..SS...................
======================================================================
ERROR: test_config (test_commands.TestCommands)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/gijs/Work/python-docker-machine/tests/test_commands.py", line 46, in test_config
    client = docker.APIClient(**config)
AttributeError: module 'docker' has no attribute 'APIClient'

----------------------------------------------------------------------
Ran 25 tests in 337.889s

FAILED (SKIP=2, errors=1)

@mjbright
Copy link
Contributor Author

mjbright commented May 8, 2017 via email

@AnTuanHa
Copy link

AnTuanHa commented Jun 19, 2017

@gijzelaerr Will this be merged? @mjbright's changes looks good to me and works fine on my machine.

I ran the nosetests for python2.7, python3.6 and pypy on Arch Linux. All tests passed (2 were skipped)

@gijzelaerr gijzelaerr self-assigned this Jul 3, 2017
@gijzelaerr gijzelaerr self-requested a review July 3, 2017 19:47
@gijzelaerr
Copy link
Owner

yes, it looks fine with python3. Sorry for the delay guys, i will amke a new release.

@gijzelaerr gijzelaerr merged commit c3d5be1 into gijzelaerr:master Jul 6, 2017
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

Successfully merging this pull request may close these issues.

3 participants