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

Fix a bug in unicode string dep inference. (cherrypick of #11879) #11881

Merged
merged 1 commit into from
Apr 10, 2021

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Apr 10, 2021

The dep extraction code calls print() to emit any imports and import-like strings it finds to stdout.
print() uses a default encoding, which in some cases might be ascii, causing it to fail on
non-ascii strings.

This change replaces the naive call to print() with explicitly encoding the string as utf8 and writing
the resulting raw bytes.

[ci skip-rust]

[ci skip-build-wheels]

…11879)

The dep extraction code calls print() to emit any imports and import-like strings it finds to stdout.
print() uses a default encoding, which in some cases might be ascii, causing it to fail on
non-ascii strings.

This change replaces the naive call to print() with explicitly encoding the string as utf8 and writing
the resulting raw bytes.

[ci skip-rust]

[ci skip-build-wheels]
@benjyw benjyw requested review from Eric-Arellano and jsirois April 10, 2021 15:52
@benjyw benjyw merged commit 66c94e2 into pantsbuild:2.2.x Apr 10, 2021
@benjyw benjyw deleted the cherrypick_11879_2.2.x branch April 10, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants