Repository navigation
3.16.0a1: test_build_details is not ready for --with-build-details-suffix configure option #159420
Copy link
Copy link
Open
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
In Fedora, we take advantage of multiples of build-details.json one per each interpreter, as defined in https://docs.python.org/dev/using/configure.html#cmdoption-with-build-details-suffix, implemented in #150098
test_build_details doesn't account with this scenario, failing a bunch of tests.
The whole traceback:
======================================================================
ERROR: test_base_interpreter (test.test_build_details.CPythonBuildDetailsTests.test_base_interpreter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 152, in test_base_interpreter
value = self.key('base_interpreter')
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_base_prefix (test.test_build_details.CPythonBuildDetailsTests.test_base_prefix)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 68, in test_base_prefix
self.assertIsInstance(self.key('base_prefix'), str)
~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_c_api (test.test_build_details.CPythonBuildDetailsTests.test_c_api)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 166, in test_c_api
value = self.key('c_api')
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_implementation (test.test_build_details.CPythonBuildDetailsTests.test_implementation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 100, in test_implementation
for key, value in self.key('implementation').items():
~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_language_version (test.test_build_details.CPythonBuildDetailsTests.test_language_version)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 84, in test_language_version
value = self.key('language.version')
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_language_version_info (test.test_build_details.CPythonBuildDetailsTests.test_language_version_info)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 90, in test_language_version_info
value = self.key('language.version_info')
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_platform (test.test_build_details.CPythonBuildDetailsTests.test_platform)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 80, in test_platform
self.assertEqual(self.key('platform'), sysconfig.get_platform())
~~~~~~~~^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 51, in key
value = self.data
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
ERROR: test_top_level_container (test.test_build_details.CPythonBuildDetailsTests.test_top_level_container)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 57, in test_top_level_container
self.assertIsInstance(self.data, dict)
^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 42, in data
return json.loads(self.contents)
^^^^^^^^^^^^^
File "/usr/lib64/python3.16/test/test_build_details.py", line 137, in contents
with open(self.location, 'r', encoding='utf-8') as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.16/build-details.json'
======================================================================
FAIL: test_location (test.test_build_details.CPythonBuildDetailsTests.test_location)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.16/test/test_build_details.py", line 142, in test_location
self.assertTrue(os.path.isfile(self.location))
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true
CPython versions tested on:
3.16
Operating systems tested on:
Linux
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
[-]test_build_details is not ready for `--with-build-details-suffix` configure option[/-][+]3.16.0a1: test_build_details is not ready for `--with-build-details-suffix` configure option[/+]Merge branch 'main' into codex/pythongh-159420-build-details