Eric Snow

Results 226 comments of Eric Snow

To be clear, I'm operating under the assumption that the cached `PyConfig` copy *should* be treated as read-only after init. That is what PEP 432 implies, it's what makes sense...

> The resolved conversation https://github.com/python/cpython/pull/96944#discussion_r974806233 alludes to that at least. That comment is more about preserving the original config value vs. updating during init, isn't it? The question of the...

I'm going to take a look, but it might not be immediately.

I want to agree, but something seems off. I'll have to take a look tomorrow.

Having looked over the code again, I agree that `tstate->_static = false;` is all that needs to happen. Basically, we must consider everything that gets set in [`_PyThreadState_INIT `](https://github.com/python/cpython/blob/2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38/Include/internal/pycore_runtime_init.h#L68-L73). `_static`...

So you mean check `interp == &_PyRuntime._main_interpreter` instead of `interp->_static` (and likewise `tstate == &tstate->interp->_initial_thread`)? That would work. IIRC, I was planning on having additional statically allocated interpreter states and...

I've posted to the issue about interpreters interfering with each other (which is not new with this PR): https://github.com/python/cpython/issues/99127#issuecomment-1306095643.

Yeah, it is usually best to restrict management of global resources to the main interpreter. I'd say the syslog API counts as a global resource, so I'd be good with...

FYI, it looks like `logging.handlers.SysLogHandler` doesn't use the syslog module, so that shouldn't factor in.

Currently we allocate each new PyInterpreterState in PyInterpreterState_New(). Furthermore, PyInterpreterState is full of pointers which are almost all allocated on the heap during runtime init. We can statically allocate (and...