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 #2833

Merged
merged 3 commits into from
Dec 26, 2018
Merged

Support Python 3 #2833

merged 3 commits into from
Dec 26, 2018

Conversation

gmmeyer
Copy link
Contributor

@gmmeyer gmmeyer commented Dec 26, 2018

What does this PR do?

Moves GoExpvar to Python3! This one was a straightforward one. I was worried about that, but it seems like the string manipulation issues are mostly handled in this one.

Motivation

🐍 3️⃣ 🚂

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests
  • Git history is clean
  • If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo
  • If PR adds a configuration option, it has been added to the configuration file.

Additional Notes

Anything else we should know when reviewing?

@codecov-io
Copy link

codecov-io commented Dec 26, 2018

Codecov Report

Merging #2833 into master will increase coverage by 3.85%.
The diff coverage is 90%.

@@            Coverage Diff             @@
##           master    #2833      +/-   ##
==========================================
+ Coverage   84.69%   88.54%   +3.85%     
==========================================
  Files         662        7     -655     
  Lines       37611      262   -37349     
  Branches     4507       40    -4467     
==========================================
- Hits        31853      232   -31621     
+ Misses       4436       19    -4417     
+ Partials     1322       11    -1311

Copy link
Collaborator

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

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

Looks good! Left two small comments.

import requests

# project
from six.moves.urllib.parse import urlparse

Copy link
Collaborator

Choose a reason for hiding this comment

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

Small nit, but looks like an extra newline here.

@@ -72,14 +73,15 @@ def _get_data(self, url, instance):
'ssl_certfile': instance.get('ssl_certfile'),
'ssl_verify': instance.get('ssl_verify'),
}
for key, param in ssl_params.items():
ssl_params_copy = copy.copy(ssl_params)
for key, param in iteritems(ssl_params_copy):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
for key, param in iteritems(ssl_params_copy):
for key, param in list(iteritems(ssl_params)):

We could remove the copy line then. Using list() is supposed to be slightly faster as well.

Copy link
Collaborator

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

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

Thanks! 🐍3️⃣

@gmmeyer gmmeyer merged commit b623883 into master Dec 26, 2018
@gmmeyer gmmeyer deleted the greg/goexpvar3 branch December 26, 2018 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants