Hatch install bug on Windows when filtering environment variables
When you filter the environment variables, then hatch fails to install into environments on Windows, please see my MRE and in particular the last Actions run. Please note that on Python <=3.10 the error is:
Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
And on Python >3.10:
OSError: [WinError 10106] The requested service provider could not be loaded or initialized
I did some digging and found this issue https://github.com/python/cpython/issues/120836. My best guess is that when filtering environment variables, hatch does not maintain variables that are critical to subprocess' functioning on Windows as mentioned in the linked issue.
Thanks, feel free to open a PR if you have time!
I'm afraid I don't have the mindspace to learn hatch internals at the moment.
This will be fixed in the next release.