Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests#117569

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 1 commit intopython:mainfromencukou:importlib-tests-be
Apr 5, 2024

Conversation

encukou
Copy link
Member

@encukouencukou commentedApr 5, 2024
edited by bedevere-appbot
Loading

To test theerrors 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.

… testsTo test the `errors` argument, we read a UTF-16 file as UTF-8with "backslashreplace" error handling. However, the utf-16codec adds an endian-specific byte-order mark, so on big-endianmachines the expectation doesn't match the test file (which wassaved on a little-endian machine).Use endswith to ignore the BOM.
@bedevere-appbedevere-appbot added testsTests in the Lib/test dir awaiting core review labelsApr 5, 2024
@encukouencukou changed the titlegh-116609: Ignore UTF-16 BOM in importlib.resources._functional testsgh-116608: Ignore UTF-16 BOM in importlib.resources._functional testsApr 5, 2024
@encukou
Copy link
MemberAuthor

!buildbot s390x

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@encukou for commit26ae210 🤖

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

@encukouencukou merged commit4d4a6f1 intopython:mainApr 5, 2024
@encukouencukou deleted the importlib-tests-be branchApril 5, 2024 15:00
@zooba
Copy link
Member

@encukou Out of interest, was theendswith necessary? I thought usingutf-16-le would strip the BOM automatically, and the issue you were hitting is thatutf-16-be (implied byutf-16 on BE machines) was rejecting it. Explicitly specifying-le should have worked, I'd thought.

diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
… tests (pythonGH-117569)pythongh-116609: Ignore UTF-16 BOM in importlib.resources._functional testsTo test the `errors` argument, we read a UTF-16 file as UTF-8with "backslashreplace" error handling. However, the utf-16codec adds an endian-specific byte-order mark, so on big-endianmachines the expectation doesn't match the test file (which wassaved on a little-endian machine).Use endswith to ignore the BOM.
@jaraco
Copy link
Member

This change needs to be applied to importlib_resources. It looks like a related issue was reported inpython/importlib_resources#312.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jaracojaracoAwaiting requested review from jaracojaraco is a code owner

@warsawwarsawAwaiting requested review from warsawwarsaw is a code owner

@FFY00FFY00Awaiting requested review from FFY00FFY00 is a code owner

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@encukou@bedevere-bot@zooba@jaraco

[8]ページ先頭

©2009-2025 Movatter.jp