Content-Length: 334892 | pFad | http://github.com/python/cpython/pull/115566/commits/aa4fad099f69eb07c7730f08d11dd449818a509a

FA gh-76785: Update test.support.interpreters to Align With PEP 734 by ericsnowcurrently · Pull Request #115566 · python/cpython · GitHub
Skip to content

gh-76785: Update test.support.interpreters to Align With PEP 734 #115566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Expose interpreters.NotShareableError.
  • Loading branch information
ericsnowcurrently committed Feb 27, 2024
commit aa4fad099f69eb07c7730f08d11dd449818a509a
3 changes: 2 additions & 1 deletion Lib/test/support/interpreters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# aliases:
from _xxsubinterpreters import (
InterpreterError, InterpreterNotFoundError,
InterpreterError, InterpreterNotFoundError, NotShareableError,
is_shareable,
)

Expand All @@ -15,6 +15,7 @@
'get_current', 'get_main', 'create', 'list_all', 'is_shareable',
'Interpreter',
'InterpreterError', 'InterpreterNotFoundError', 'ExecFailure',
'NotShareableError',
'create_queue', 'Queue', 'QueueEmpty', 'QueueFull',
]

Expand Down
6 changes: 6 additions & 0 deletions Modules/_xxsubinterpretersmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ The 'interpreters' module provides a more convenient interface.");
static int
module_exec(PyObject *mod)
{
PyInterpreterState *interp = PyInterpreterState_Get();
module_state *state = get_module_state(mod);

// exceptions
Expand All @@ -1122,6 +1123,11 @@ module_exec(PyObject *mod)
if (PyModule_AddType(mod, (PyTypeObject *)PyExc_InterpreterNotFoundError) < 0) {
goto error;
}
PyObject *PyExc_NotShareableError = \
_PyInterpreterState_GetXIState(interp)->PyExc_NotShareableError;
if (PyModule_AddType(mod, (PyTypeObject *)PyExc_NotShareableError) < 0) {
goto error;
}

if (register_memoryview_xid(mod, &state->XIBufferViewType) < 0) {
goto error;
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/pull/115566/commits/aa4fad099f69eb07c7730f08d11dd449818a509a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy