{{ message }}
Repository navigation
Clean up python2 style code - #7294
Merged
Merged
Conversation
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
2 times, most recently
from
March 14, 2020 11:59
861d194 to
2a813c8
Compare
Author
alexrecuenco
marked this pull request as ready for review
March 14, 2020 15:11
alexrecuenco
requested review from
ndeloof,
rumpl and
ulyssessouza
as code owners
March 14, 2020 15:11
Contributor
|
@alexrecuenco Could you please rebase so that we can include it in the next RC? |
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
3 times, most recently
from
June 18, 2020 05:37
c1dfb0b to
3ddcc25
Compare
Author
|
Do you mean to rebase on master? Or on |
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
from
June 18, 2020 06:37
3ddcc25 to
ec66c1b
Compare
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
from
August 5, 2020 23:17
ec66c1b to
8f7d7d1
Compare
Contributor
|
@alexrecuenco Rebase with from By the way, the removal of python2 was already merged in another PR. |
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
from
August 10, 2020 10:17
8f7d7d1 to
db01591
Compare
Author
|
I don't think I can rename the branch, for that I would need to make a new PR, let me know if you prefer that. Other than that, it should be rebased now. |
Contributor
|
The renaming was just for the title of the PR. The branch name has no impact |
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
2 times, most recently
from
August 11, 2020 10:41
1357f25 to
7076d7f
Compare
Closes: docker#6890 Some remarks, - `# coding ... utf-8` statements are not needed - isdigit on strings instead of a try-catch. - Default opening mode is read, so we can do `open()` without the `'r'` everywhere - Removed inheritinng from `object` class, it isn't necessary in python3. - `super(ClassName, self)` can now be replaced with `super()` - Use of itertools and `chain` on a couple places dealing with sets. - Used the operator module instead of lambdas when warranted `itemgetter(0)` instead of `lambda x: x[0]` `attrgetter('name')` instead of `lambda x: x.name` - `sorted` returns a list, so no need to use `list(sorted(...))` - Removed `dict()` using dictionary comprehensions whenever possible - Attempted to remove python3.2 support Signed-off-by: alexrecuenco <alejandrogonzalezrecuenco@gmail.com>
Removed unused versions, (we only support python3.4 onwards) Signed-off-by: alexrecuenco <alejandrogonzalezrecuenco@gmail.com>
alexrecuenco
force-pushed
the
remove-python2-1.26goal
branch
from
August 11, 2020 10:45
7076d7f to
46624ce
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This branch works on top of the PR by @venthur rebasing the branch on top of
1.26.xpyupgradeto the pre-commit hooks to allow an easier transition for developers used to python2.NOTNOTE: The only change to code-style when transferring to python3 I am not sure if people would agree is the change fromlambda c: c.nameto the more modern use of the operator module withattrgetter('name')Closes: #6890
Resolves #6890
Signed-off-by: alexrecuenco alejandrogonzalezrecuenco@gmail.com