gh-132781: Cleanup Code Related to NotShareableError (gh-132782)

The following are added to the internal C-API:

* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()

We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().
This commit is contained in:
Eric Snow 2025-04-25 14:43:38 -06:00 committed by GitHub
parent 4c20f46fa0
commit cd9536a087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 322 additions and 177 deletions

View file

@ -693,8 +693,7 @@ class TestInterpreterPrepareMain(TestBase):
def test_not_shareable(self):
interp = interpreters.create()
# XXX TypeError?
with self.assertRaises(ValueError):
with self.assertRaises(interpreters.NotShareableError):
interp.prepare_main(spam={'spam': 'eggs', 'foo': 'bar'})
# Make sure neither was actually bound.