Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935804 - dev-python/importlib-resources-6.4.0 fails tests on big-endian: test_open_text, test_read_text
Summary: dev-python/importlib-resources-6.4.0 fails tests on big-endian: test_open_tex...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-07-10 01:18 UTC by matoro
Modified: 2024-07-10 05:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (sparc) (file_935804.txt,77.63 KB, text/plain)
2024-07-10 01:18 UTC, matoro
Details
build.log and emerge --info (ppc64) (file_935804.txt,77.62 KB, text/plain)
2024-07-10 01:19 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-07-10 01:18:41 UTC
Reproduces on sparc, ppc64 big-endian.  Does not repo on ppc64 little-endian, so marking as pure endianness problem.

AIL: test_open_text (importlib_resources.tests.test_functional.FunctionalAPITest_ModuleAnchor.test_open_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/importlib-resources-6.4.0/work/importlib_resources-6.4.0/importlib_resources/tests/test_functional.py", line 131, in test_open_text
    self.assertEqual(
AssertionError: '\\xff\\xfeH\x00e\x00l\x00l\x00o\x00,\x00 \x00[67 chars]\x00' != '\\xfe\\xff\x00H\x00e\x00l\x00l\x00o\x00,\x00 [67 chars]00\n'
- \xff\xfeH^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
?     ^^^^
+ \xfe\xff^@H^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
? ++++    ^
- ^@
 
======================================================================
FAIL: test_read_text (importlib_resources.tests.test_functional.FunctionalAPITest_ModuleAnchor.test_read_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/importlib-resources-6.4.0/work/importlib_resources-6.4.0/importlib_resources/tests/test_functional.py", line 79, in test_read_text
    self.assertEqual(
AssertionError: '\\xff\\xfeH\x00e\x00l\x00l\x00o\x00,\x00 \x00[67 chars]\x00' != '\\xfe\\xff\x00H\x00e\x00l\x00l\x00o\x00,\x00 [67 chars]00\n'
- \xff\xfeH^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
?     ^^^^
+ \xfe\xff^@H^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
? ++++    ^
- ^@
 
======================================================================
FAIL: test_open_text (importlib_resources.tests.test_functional.FunctionalAPITest_StringAnchor.test_open_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/importlib-resources-6.4.0/work/importlib_resources-6.4.0/importlib_resources/tests/test_functional.py", line 131, in test_open_text
    self.assertEqual(
AssertionError: '\\xff\\xfeH\x00e\x00l\x00l\x00o\x00,\x00 \x00[67 chars]\x00' != '\\xfe\\xff\x00H\x00e\x00l\x00l\x00o\x00,\x00 [67 chars]00\n'
- \xff\xfeH^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
?     ^^^^
+ \xfe\xff^@H^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
? ++++    ^
- ^@
 
======================================================================
FAIL: test_read_text (importlib_resources.tests.test_functional.FunctionalAPITest_StringAnchor.test_read_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/importlib-resources-6.4.0/work/importlib_resources-6.4.0/importlib_resources/tests/test_functional.py", line 79, in test_read_text
    self.assertEqual(
AssertionError: '\\xff\\xfeH\x00e\x00l\x00l\x00o\x00,\x00 \x00[67 chars]\x00' != '\\xfe\\xff\x00H\x00e\x00l\x00l\x00o\x00,\x00 [67 chars]00\n'
- \xff\xfeH^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
?     ^^^^
+ \xfe\xff^@H^@e^@l^@l^@o^@,^@ ^@U^@T^@F^@-^@1^@6^@ ^@w^@o^@r^@l^@d^@!^@
? ++++    ^
- ^@
 
----------------------------------------------------------------------
Ran 200 tests in 1.257s
 
FAILED (failures=4, skipped=1)
Comment 1 matoro archtester 2024-07-10 01:18:58 UTC
Created attachment 897383 [details]
build.log and emerge --info (sparc)
Comment 2 matoro archtester 2024-07-10 01:19:11 UTC
Created attachment 897384 [details]
build.log and emerge --info (ppc64)
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-10 04:15:20 UTC
That's BOM.  I'm going to check if tests inside CPython are also affected.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-10 05:25:43 UTC
I see the problem, and the fix should be easy.
Comment 5 Larry the Git Cow gentoo-dev 2024-07-10 05:39:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8239792739f7a1f227c950cdc92f8fefefc9e98f

commit 8239792739f7a1f227c950cdc92f8fefefc9e98f
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-07-10 05:39:03 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-07-10 05:39:47 +0000

    dev-python/importlib-resources: Fix tests on big endian
    
    Closes: https://bugs.gentoo.org/935804
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../files/importlib-resources-6.4.0-be.patch       | 40 ++++++++++++++++++++++
 .../importlib-resources-6.4.0.ebuild               |  5 +++
 2 files changed, 45 insertions(+)