Eric Snow <ericsnowcurren...@gmail.com> added the comment:
> one of the things we want to fix is to eliminate non-PyObject > pointer types from public APIs entirely. A notable exception is Py_buffer. [1] As well, cross-interpreter data must not be PyObject, though that isn't much of an issue (yet). :) At some point it may make sense to make _PyCrossInterpreterData [2] part of the public C-API. However, we can cross *that* bridge later. :) Using PyObject for contextvars makes sense (for the reasons you described) as long as they won't be shared between interpreters. I'm not super familiar with the contextvars C-API, but it looks like cross-interpreter issues are *not* a factor. If that's the case then there's nothing further to discuss. :) [1] https://docs.python.org/3/c-api/buffer.html#buffer-structure [2] https://github.com/python/cpython/blob/master/Include/internal/pystate.h#L137 ---------- nosy: +eric.snow _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34762> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com