diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 3738914cf17de8..cc11eade2e3426 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -643,7 +643,8 @@ def test_sysconfigdata_json(self): system_config_vars = get_config_vars() - ignore_keys = set() + # Keys dependent on uncontrollable external context + ignore_keys = {'userbase'} # Keys dependent on Python being run outside the build directrory if sysconfig.is_python_build(): ignore_keys |= {'srcdir'} diff --git a/Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst b/Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst new file mode 100644 index 00000000000000..4f7be59d5b63b4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-12-18-15-51-09.gh-issue-128055.0c_Noq.rst @@ -0,0 +1,2 @@ +Fix ``test.test_sysconfig.test_sysconfigdata_json`` when running outside +the build directory (eg. after installing).