Eric Snow <ericsnowcurren...@gmail.com> added the comment:

@Armin, thanks for fixing things on your end so quickly. :)

Adding PyInterpreterState.dict and a public getter function (a la 
PyThreadState) is probably fine.  I'm just not sure how that relates to the 
problem with cffi's use of the "builtins" field.  If it would be useful in 
general then feel free to open a separate issue.  I doubt there'd be much 
opposition if you presented a decent use case, since the cost would be low.

In the case of PyInterpreterState.builtins specifically, if you need it we 
could add a simple PyInterpreterState_GetBuiltins().  However, couldn't you 
already use existing public API, e.g. `PyEval_GetBuiltins()` or 
`PyImport_GetModule("builtins")`?  Regardless, we certainly don't want to put 
anyone in a position that they must define Py_BUILD_CORE just for access to 
PyInterpreterState fields.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35886>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to