gh-116608: Bring back importlib.resources functional API by encukou · Pull Request #116609 · python/cpython

@encukou

@encukou

@encukou

@encukou encukou deleted the importlib-resources-revert branch

April 5, 2024 11:56

encukou added a commit to encukou/cpython that referenced this pull request

Apr 5, 2024
… 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 added a commit to encukou/cpython that referenced this pull request

Apr 5, 2024
… 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 added a commit that referenced this pull request

Apr 5, 2024
…GH-117569)

gh-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.

ngoldbaum added a commit to ngoldbaum/cpython that referenced this pull request

Apr 8, 2024

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request

Apr 17, 2024

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.