GeezerVison is showing github.com — gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests by encukou · Pull Request #117569 · python/cpython
Conversation
encukou
commented
Apr 5, 2024
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
To test the errors argument, we read a UTF-16 file as UTF-8 with "backslashreplace" error handling. However, the utf-16 codec adds an endian-specific byte-order mark, so on big-endian machines the expectation doesn't match the test file (which was saved on a little-endian machine).
Use endswith to ignore the BOM.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… tests
To test the `errors` argument, we read a UTF-16 file as UTF-8
with "backslashreplace" error handling. However, the utf-16
codec adds an endian-specific byte-order mark, so on big-endian
machines the expectation doesn't match the test file (which was
saved on a little-endian machine).
Use endswith to ignore the BOM.
encukou
changed the title
gh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests
gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests
Apr 5, 2024
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 26ae210 🤖
The command will test the builders whose names match following regular expression: s390x
The builders matched are:
s390x Fedora Rawhide Clang Installed PR
s390x Fedora Rawhide Clang PR
s390x Fedora LTO PR
s390x Fedora Refleaks PR
s390x RHEL7 LTO + PGO PR
s390x Fedora LTO + PGO PR
s390x Fedora Clang PR
s390x Fedora PR
s390x Fedora Rawhide LTO PR
s390x Fedora Rawhide PR
s390x RHEL8 LTO PR
s390x Fedora Rawhide Refleaks PR
s390x Fedora Clang Installed PR
s390x RHEL8 PR
s390x Fedora Rawhide LTO + PGO PR
s390x RHEL8 Refleaks PR
s390x RHEL8 LTO + PGO PR
s390x RHEL7 PR
s390x RHEL7 LTO PR
s390x RHEL7 Refleaks PR
s390x SLES PR
s390x Debian PR
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@encukou Out of interest, was the endswith necessary? I thought using utf-16-le would strip the BOM automatically, and the issue you were hitting is that utf-16-be (implied by utf-16 on BE machines) was rejecting it. Explicitly specifying -le should have worked, I'd thought.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this pull request
Apr 17, 2024
… tests (pythonGH-117569)
pythongh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests
To test the `errors` argument, we read a UTF-16 file as UTF-8
with "backslashreplace" error handling. However, the utf-16
codec adds an endian-specific byte-order mark, so on big-endian
machines the expectation doesn't match the test file (which was
saved on a little-endian machine).
Use endswith to ignore the BOM.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jaraco
added a commit
to python/importlib_resources
that referenced
this pull request
Aug 14, 2024
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|