-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Port examples #6210
Port examples #6210
Conversation
@@ -8,8 +8,8 @@ | |||
from distutils.core import Extension | |||
|
|||
|
|||
c_module = Extension(str('c_greet'), sources=[str('c_greet.c')]) | |||
cpp_module = Extension(str('cpp_greet'), sources=[str('cpp_greet.cpp')]) | |||
c_module = Extension(b'c_greet', sources=[b'c_greet.c']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming the call to str()
around string literals was to convert into byte strings, because from __future__ import unicode_literals
is toggled on? If not, and unicode works, we can remove both b
prefix and str()
.
@@ -14,7 +14,7 @@ | |||
# This is for testing purposes so we can assert that setup_requires is functioning | |||
# correctly (because Pants swallows print statements). | |||
if os.getenv('PANTS_TEST_SETUP_REQUIRES', ''): | |||
output = [str(pycountry)] | |||
output = [bytes(pycountry)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming similar logic here that you want bytes instead of unicode?
If you want unicode, I don't know of a Py2 Py3 compatible way of specifying we want unicode because we can't import six or future. unicode()
is only supported in Py2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me.
@CMLivingston : PTAL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, these need to be bytes and not unicode.
Part of #6062
This folder was unlike any we've worked with. Because it's a dist, you aren't allowed to include
future
as a 3rd party library. So we unfortunately can't use the backports.I also couldn't find tests for the particular folder
cc @CMLivingston if you could help review please.