Closed
Conversation
Collaborator
Member
|
This is similar to #30023 |
Member
Author
|
indeed it is! but in this case the return value needs to mix with non-utf8 strings and python2 borks at that, hence the |
Collaborator
Collaborator
Collaborator
cclauss
approved these changes
Oct 21, 2019
Contributor
There was a problem hiding this comment.
LGTM.
Minor nit: for line in open(uvernum_h).readlines(): leaves the filehandle open so the preferred approach is:
with open(uvernum_h) as in_file:
for line in in_file:because the with open() as context manager will automate the filehandle close().
Member
Author
|
ok, have tried that approach, ptal @cclauss |
Collaborator
Contributor
|
I have already approved. For those who want to dig in... |
sam-github
approved these changes
Oct 21, 2019
richardlau
approved these changes
Oct 21, 2019
devnexen
approved these changes
Oct 21, 2019
40c91e1 to
88ecfee
Compare
Collaborator
rvagg
added a commit
that referenced
this pull request
Oct 23, 2019
PR-URL: #30047 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Member
Author
|
Landed in 779d7ef |
targos
pushed a commit
that referenced
this pull request
Oct 24, 2019
PR-URL: #30047 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 8, 2019
PR-URL: #30047 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 10, 2019
PR-URL: #30047 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 11, 2019
PR-URL: #30047 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
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.
Discovered while messing with some infra switching things around to
python3. On Linux, if you callconfiguredirectly with apython3(not letting it findpythonfor you) and haveLC_ALL=Cset, as we do in some of our infra, apparentlyopen()defaults to ascii. This is a problem for icu version detection because there's a©at the top of deps/icu-small/source/common/unicode/uvernum.h which it reads to find major version number.This change fixes it and makes it work for Python 2 & 3. Although I don't really know what I'm doing with the conversion back to ascii for later compatibility so someone who knows better should check.