Eli Bendersky added the comment:

On Wed, Aug 7, 2013 at 6:28 AM, Antoine Pitrou <rep...@bugs.python.org>wrote:

>
> Antoine Pitrou added the comment:
>
> > First, I think it omits expat_capi from the state. Is that
> > intentional?
>
> What would it do in the state? There's nothing to release.
>

That's true, but I thought one of the goals of PEP 3121 is to separate
states between sub-interpreters. So that one can't corrupt another. I'm not
sure how much it matters in practice in this case of the pyexpat capsule;
need to look into it more.

> > Second, I'm not sure if this approach is fully aligned with PEP 3121.
> > A global, shared state is still used. Instead of actually having a
> > different module state per subinterpreter, this patch will have
> > shared state.
>
> I don't understand what you are talking about. Perhaps you haven't looked
> what PyState_FindModule() does?
>

I did not look at the implementation yet. But the documentation says:

"""Returns the module object that was created from *def* for the current
interpreter. This method requires that the module object has been attached
to the interpreter state with
PyState_AddModule()<http://docs.python.org/dev/c-api/module.html?highlight=pymoduledef_base#PyState_AddModule>beforehand.
In case the corresponding module object is not found or has not
been attached to the interpreter state yet, it returns NULL."""

I don't see a call to PyState_AddModule. What am I missing?

----------

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

Reply via email to