GH-126789: fix some sysconfig data on late site initializations#126812
GH-126789: fix some sysconfig data on late site initializations#126812FFY00 merged 7 commits intopython:mainfrom
Conversation
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@riseup.net>
|
@hugovk could you maybe have a look at this PR when you have time, as I am currently the only active maintainer? |
Signed-off-by: Filipe Laíns <lains@riseup.net>
|
There's an address sanitizer failure, but seems unrelated. Might be worth investigating still. https://github.com/python/cpython/actions/runs/11827914917/job/32957010967?pr=126812 |
|
Thanks @FFY00 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
|
@freakboy3742 sorry about that! I probably should have triggered the buildbot tests before merging. I hadn't run into issues caused by the unavailability of subprocesses, so I forgot about that. This was an oversight on my part 🫤 |
|
We could write the tests to not use subprocesses, but they depend on global state, which makes the test implementation tricky, so I just opted for using virtual environments, which unfortunately required the use of subprocesses. I don't think there is quite enough platform dependence in the tested code to warrant rewriting to be compatible with platforms that don't support subprocesses, but I am happy to hear other opinions on this. |
|
@FFY00 I'm not sure it's worth a major rewrite. Virtual environments aren't really useful in the iOS/Android/Emscripten context, because those platforms are already sandboxed and isolated by the app/webpage bundle that they're delivered in. Its similar to the question of whether you need venv inside a Docker container - except that in this case, there's no ability to call subprocess, which makes using a venv near impractical, rather than just an arguable design choice. |
sysconfigdata inconsistencies caused by the disabling thesiteinitialization on virtual environments #126789