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

Support python 3 #440

Merged
merged 8 commits into from
Aug 25, 2015
Merged

Support python 3 #440

merged 8 commits into from
Aug 25, 2015

Conversation

dnephin
Copy link

@dnephin dnephin commented Aug 24, 2014

Progress on #219

The test suite passes, but I ran into some errors while trying to run it under python 3.4 manually (d11wtq/dockerpty#8 is the first).

It might be a good idea to have the test suite running python3 even if it doesn't work for real yet. That way new code will have to be compatible and it'll be less work to fix the remaining python3 issues (as we add tests which expose the problems).

@@ -227,7 +227,7 @@ def _stream_helper(self, response):
# Because Docker introduced newlines at the end of chunks in v0.9,
# and only on some API endpoints, we have to cater for both cases.
size_line = socket.readline()
if size_line == '\r\n':
if size_line == '\r\n' or size_line == '\n':
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is already upstream, so it should be "ok" to make this even in a vendored package:

https://github.com/docker/docker-py/blob/master/docker/client.py#L274

@d11wtq
Copy link

d11wtq commented Aug 27, 2014

Sorry for the delay checking this out. Life has been a bit hectic lately. I'm just catching up on emails etc now. I probably don't have time to look at the dockerpty thing until tomorrow evening, but it's on my radar, thanks.

@bfirsh
Copy link

bfirsh commented Sep 6, 2014

Looks great, needs a rebase though. I wonder if we can use tox on travis: http://www.dominicrodger.com/tox-and-travis.html

@dirk-thomas
Copy link

@dnephin Are you going to rebase the PR in the near future? Otherwise someone else might pick it up and create a new PR against the current tip.

@dnephin dnephin force-pushed the python3 branch 3 times, most recently from d68ad46 to a23629e Compare October 14, 2014 00:04
@dnephin
Copy link
Author

dnephin commented Oct 14, 2014

Rebase complete

@bfirsh bfirsh added this to the 1.0.1 milestone Oct 14, 2014
@bfirsh
Copy link

bfirsh commented Oct 20, 2014

Oops – needs another rebase. Sorry!

@bfirsh bfirsh removed this from the 1.0.1 milestone Oct 23, 2014
@dirk-thomas
Copy link

@dnephin Can you please do another rebase?

@dnephin
Copy link
Author

dnephin commented Oct 23, 2014

rebased, tests still running, so not sure if I need to make any other changes

@dnephin
Copy link
Author

dnephin commented Oct 23, 2014

There are a bunch of failures on 3.4 now. Some things that need to be imported from six.moves, etc

@mauricioabreu
Copy link

Hey fig collaborators, do you need some help on this? I don't use python3 but I would like to help since I use fig daily.

@aanand
Copy link

aanand commented Nov 27, 2014

@mauricioabreu Help with Python 3 would be great, yes.

@mauricioabreu
Copy link

hey @dnephin I created a pull request against your python3 branch.
There is a comment there explaining that we still get two errors when using Python 3.4 (probably 3.x.x matrix). Thanks!

@dnephin
Copy link
Author

dnephin commented Dec 3, 2014

@mauricioabreu thanks!

I merged them in, but the tests didn't run because of a missing signoff. We'll have to rebase this branch with signed-off commits.

@mauricioabreu
Copy link

I am sorry for this. I think a lot of people are not used to commit using sign-off feature.
I ran the tests on my machine and like I said in the pull request, I think we have some errors caused by an external library called dockerpty.

I am glad to help anyways. :)

@dnephin dnephin mentioned this pull request Jan 13, 2015
@dnephin dnephin mentioned this pull request Jan 26, 2015
@zdexter
Copy link

zdexter commented Jan 26, 2015

+1 on this, need it, anything that can be done to help this get merged up?

@dnephin
Copy link
Author

dnephin commented Mar 21, 2015

I've cherry-picked my original commit on the latest master.

dnephin and others added 7 commits August 25, 2015 10:37
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
In particular it includes:
- some extension of CONTRIBUTING.md
- one fix for Python 2.6 in tests/integration/cli_test.py
- one fix for Python 3.3 in tests/integration/service_test.py
- removal of unused imports

Make stream_output Python 3-compatible

Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
… for py2 and py3.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
…r-py response.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
@dnephin
Copy link
Author

dnephin commented Aug 25, 2015

The tests seem to be passing, there was a couple flakes against 1.8.1 on the last run, so I'm re-running them now.

from . import colors
from .multiplexer import Multiplexer
from .utils import split_buffer
from compose import utils
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason this is from compose and not from ..?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, no reason, I can change it to be more consistent, but we do a bit of both in other modules

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can normalise it all in another PR, I reckon

@mnowster
Copy link

This will be so exciting to get this PR merged in. Aces ♠️

@aanand
Copy link

aanand commented Aug 25, 2015

LGTM

1 similar comment
@mnowster
Copy link

LGTM

@aanand
Copy link

aanand commented Aug 25, 2015

python-survey-2014-python3-mistake

aanand added a commit that referenced this pull request Aug 25, 2015
@aanand aanand merged commit fc63454 into docker:master Aug 25, 2015
@mnowster
Copy link

✨ 🎆 🗽

@dnephin dnephin deleted the python3 branch August 25, 2015 17:27
@thaJeztah
Copy link
Member

Oh! Great! Thanks @dnephin! Think this must've been the longest open PR, so glad to see this merged

Does this also open the road to Windows? Or does that rely on other things?

@dnephin dnephin added this to the 1.5.0 milestone Aug 25, 2015
@dnephin dnephin mentioned this pull request Aug 26, 2015
@funkyfuture
Copy link

i might be feeling like my grandma when the wall in our city came down.

(but there are arguments to consider that what followed as a mistake; Python 3 is not.)

@dnephin dnephin mentioned this pull request Aug 27, 2015
xulike666 pushed a commit to xulike666/compose that referenced this pull request Jan 19, 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.

None yet