Skip to content

gh-76785: Fixes for test.support.interpreters #112982

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 26 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
76a7d7b
Make Interpreter() idempotent.
ericsnowcurrently Nov 28, 2023
57a3c19
Interpreters are always isolated.
ericsnowcurrently Nov 28, 2023
747e542
interp.id is always int.
ericsnowcurrently Nov 28, 2023
0ed9fb0
Add InterpreterNotFoundError.
ericsnowcurrently Dec 1, 2023
98f9cf3
Stop using InterpreterID in _interpreters.
ericsnowcurrently Dec 1, 2023
0277878
Fix Interpreter.__repr__().
ericsnowcurrently Nov 28, 2023
59c8227
.run() -> .exec_sync()
ericsnowcurrently Nov 28, 2023
fa132a2
RunFailedError -> ExecFailure
ericsnowcurrently Nov 28, 2023
644efa5
Add Interpreter.run().
ericsnowcurrently Nov 28, 2023
abf2aa8
Make the interpreters module a package.
ericsnowcurrently Dec 1, 2023
8ca303f
Add interpreters.Queue.
ericsnowcurrently Nov 28, 2023
8b97373
Add memoryview XID with _xxsubinterpreters import.
ericsnowcurrently Dec 11, 2023
cc20f1f
Update CODEOWNERS.
ericsnowcurrently Dec 11, 2023
cb0a605
Ignore static builtin exception types.
ericsnowcurrently Dec 11, 2023
62a9bac
Make CODEOWNERS more specific.
ericsnowcurrently Dec 11, 2023
6c71018
Fix submodule names.
ericsnowcurrently Dec 11, 2023
13a44e3
Use interpreters.__getattr__() for submodule aliases.
ericsnowcurrently Dec 7, 2023
c9d15d2
Fix InterpreterIDTests.
ericsnowcurrently Dec 11, 2023
1c76c4a
LONG_LONG_MAX -> LLONG_MAX
ericsnowcurrently Dec 11, 2023
cfae15f
Fix Interpreter.run().
ericsnowcurrently Dec 11, 2023
3f98ce1
Use exec_sync() in test_sys.
ericsnowcurrently Dec 11, 2023
f8b1685
Fix test_capi.
ericsnowcurrently Dec 11, 2023
0b34a83
Fix test_importlib.
ericsnowcurrently Dec 12, 2023
68faf1a
Fix test_import.
ericsnowcurrently Dec 12, 2023
d161f76
Fix test_threading.
ericsnowcurrently Dec 12, 2023
778276f
Fix TestInterpreterRun.
ericsnowcurrently Dec 12, 2023
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
Prev Previous commit
Next Next commit
Fix test_importlib.
  • Loading branch information
ericsnowcurrently committed Dec 12, 2023
commit 0b34a83fa490c4859b9037a4156b4afb29719aee
16 changes: 14 additions & 2 deletions Lib/test/test_importlib/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,26 @@ class IncompatibleExtensionModuleRestrictionsTests(unittest.TestCase):

def run_with_own_gil(self, script):
interpid = _interpreters.create(isolated=True)
excsnap = _interpreters.run_string(interpid, script)
def ensure_destroyed():
try:
_interpreters.destroy(interpid)
except _interpreters.InterpreterNotFoundError:
pass
self.addCleanup(ensure_destroyed)
excsnap = _interpreters.exec(interpid, script)
if excsnap is not None:
if excsnap.type.__name__ == 'ImportError':
raise ImportError(excsnap.msg)

def run_with_shared_gil(self, script):
interpid = _interpreters.create(isolated=False)
excsnap = _interpreters.run_string(interpid, script)
def ensure_destroyed():
try:
_interpreters.destroy(interpid)
except _interpreters.InterpreterNotFoundError:
pass
self.addCleanup(ensure_destroyed)
excsnap = _interpreters.exec(interpid, script)
if excsnap is not None:
if excsnap.type.__name__ == 'ImportError':
raise ImportError(excsnap.msg)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy