Skip to content

Define cmp() in Python 3 - #7385

Merged
htuch merged 1 commit into
envoyproxy:masterfrom
cclauss:patch-4
Jun 26, 2019
Merged

htuch merged 1 commit into
envoyproxy:masterfrom
cclauss:patch-4

Conversation

@cclauss

@cclauss cclauss commented Jun 24, 2019 •

Copy link
Copy Markdown
Contributor

Related to #4552

cmp() was removed in Python 3 so redefine it in accordance with https://portingguide.readthedocs.io/en/latest/comparisons.html#the-cmp-function

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@cclauss these contributions are appreciated, thanks. Can you please try and group them though to avoid tons of PRs? It's worth splitting up if these become O(1k) SLOC deltas, but otherwise I think we can group them temporally at least.

try:
cmp
except NameError:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Prefer not to have blank line here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Me too but the yapf tests fail without it.

@htuch htuch self-assigned this Jun 24, 2019
@htuch htuch added the waiting label Jun 24, 2019
@htuch
htuch merged commit 136f1da into envoyproxy:master Jun 26, 2019
@cclauss
cclauss deleted the patch-4 branch June 26, 2019 04:57
htuch pushed a commit that referenced this pull request Jun 27, 2019
Blocked by: #7383, #7384, and #7385

Related to: #4552 #7322 

Signed-off-by: cclauss [email protected]

Also adds more critical flake8 tests.

Signed-off-by: cclauss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants