Message278456
(added Graham Dumpleton to the nosy list to ask if this change may impact mod_wsgi for 3.7)
+1 on the general idea, but given that the current field is a public part of the interpreter state, the replacement access API should really be public as well - we can't be sure folks will always be going through the "PyImport_GetModuleDict()" API.
If you replace the addition of the `_PyImport_GetModuleDict` API with a public `PyInterpreterState_GetModuleDict` API, I think that will cover it - the new calls would just be "PyInterpreterState_GetModuleCache(tstate->interp)" rather than `_PyImport_GetModuleDict(tstate)`
Folks accessing this field directly can then define their own shim function if PyInterpreterState_GetModuleCache isn't defined.
(The rationale for the GetModuleDict -> GetModuleCache change is that "ModuleDict" is ambiguous - every module has a dict. For PyImport_* we're stuck with it, but the "PyImport" prefix at least gives a hint that the reference might be to the sys.modules cache. That affordance doesn't exist for the "PyInterpeterState" prefix. |
|
Date |
User |
Action |
Args |
2016-10-11 04:06:06 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, grahamd, eric.snow |
2016-10-11 04:06:06 | ncoghlan | set | messageid: <1476158766.7.0.025800634681.issue28411@psf.upfronthosting.co.za> |
2016-10-11 04:06:06 | ncoghlan | link | issue28411 messages |
2016-10-11 04:06:06 | ncoghlan | create | |
|