Message249321
Seems like a fairly obvious bug. From https://docs.python.org/3/c-api/init.html#c.Py_SetPath
> This also causes ... sys.prefix and sys.exec_prefix to be empty.
> It is up to the caller to modify these if required after calling
> Py_Initialize().
Apparently you can't set `sys.[exec_]prefix` before calling Py_Initialize, and you can't call Py_Initialize without setting `sys.[exec_]prefix` (much like #20891, where you can't initialize threads without holding the GIL, and you can't acquire the GIL without having initialized threads.)
I don't know how to go about resolving this though (my changes were limited to getpathp.c - and I really need to go add the same changes to the non-Windows getpath.c too...). The best way seems to be forcing Nick to finish PEP 432, but unfortunately I have no leverage over him :) |
|
Date |
User |
Action |
Args |
2015-08-29 15:51:06 | steve.dower | set | recipients:
+ steve.dower, barry, ncoghlan, pitrou, vstinner, tarek, srid, palm.kevin, dbzhang800 |
2015-08-29 15:51:06 | steve.dower | set | messageid: <1440863466.53.0.801761205009.issue11320@psf.upfronthosting.co.za> |
2015-08-29 15:51:06 | steve.dower | link | issue11320 messages |
2015-08-29 15:51:06 | steve.dower | create | |
|