Skip to content

gh-132775: Add _PyObject_GetXIDataWithFallback() #133482

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
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
Prev Previous commit
Next Next commit
Fix typos.
  • Loading branch information
ericsnowcurrently committed May 20, 2025
commit 8e017f8bf71b1b4c6838d1463dd01381c2063af1
2 changes: 1 addition & 1 deletion Lib/test/support/import_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,5 +438,5 @@ def ensure_module_imported(name, *, clearnone=True):
if sys.modules.get(name) is not None:
mod = sys.modules[name]
else:
mod, _, _ = _force_import(name, False, True, clearnone)
mod, _, _ = _ensure_module(name, False, True, clearnone)
return mod
15 changes: 7 additions & 8 deletions Lib/test/test_crossinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def assert_exc_args_equal(self, exc1, exc2):
# Currently the "extra" attrs are not preserved
# (via __reduce__).
self.assertIs(type(exc1), type(exc2))
#self.assert_exc_equal(grouped1, grouped2)
self.assert_exc_equal(grouped1, grouped2)
else:
self.assertEqual(args1, args2)

Expand Down Expand Up @@ -435,7 +435,6 @@ def assert_exc_equal(self, exc1, exc2):
def assert_equal_or_equalish(self, obj, expected):
cls = type(expected)
if cls.__eq__ is not object.__eq__:
# assert cls not in (types.MethodType, types.BuiltinMethodType, types.MethodWrapperType), cls
self.assertEqual(obj, expected)
elif cls is types.FunctionType:
self.assert_functions_equal(obj, expected)
Expand Down Expand Up @@ -723,13 +722,13 @@ def assert_func_defs_same(self, defs):
def assert_func_defs_other_pickle(self, defs, mod):
# Pickle relative to a different module than the original.
for func in defs.TOP_FUNCTIONS:
assert not hasattr(mod, func.__name__), (cls, getattr(mod, func.__name__))
assert not hasattr(mod, func.__name__), (getattr(mod, func.__name__),)
self.assert_not_shareable(defs.TOP_FUNCTIONS)

def assert_func_defs_other_unpickle(self, defs, mod, *, fail=False):
# Unpickle relative to a different module than the original.
for func in defs.TOP_FUNCTIONS:
assert not hasattr(mod, func.__name__), (cls, getattr(mod, func.__name__))
assert not hasattr(mod, func.__name__), (getattr(mod, func.__name__),)

captured = []
for func in defs.TOP_FUNCTIONS:
Expand All @@ -754,7 +753,7 @@ def assert_func_defs_not_shareable(self, defs):
self.assert_not_shareable(defs.TOP_FUNCTIONS)

def test_user_function_normal(self):
# self.assert_roundtrip_equal(defs.TOP_FUNCTIONS)
self.assert_roundtrip_equal(defs.TOP_FUNCTIONS)
self.assert_func_defs_same(defs)

def test_user_func_in___main__(self):
Expand Down Expand Up @@ -841,7 +840,7 @@ def test_builtin_exception(self):
special = {
BaseExceptionGroup: (msg, [caught]),
ExceptionGroup: (msg, [caught]),
# UnicodeError: (None, msg, None, None, None),
UnicodeError: (None, msg, None, None, None),
UnicodeEncodeError: ('utf-8', '', 1, 3, msg),
UnicodeDecodeError: ('utf-8', b'', 1, 3, msg),
UnicodeTranslateError: ('', 1, 3, msg),
Expand Down Expand Up @@ -1339,8 +1338,8 @@ def test_tuple(self):

def test_tuples_containing_non_shareable_types(self):
non_shareables = [
EXCEPTION,
OBJECT,
EXCEPTION,
OBJECT,
]
for s in non_shareables:
value = tuple([0, 1.0, s])
Expand Down
2 changes: 1 addition & 1 deletion Python/crossinterp.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ _PyObject_GetXIDataWithFallback(PyThreadState *tstate,
Py_FatalError("unsupported xidata fallback option");
#endif
_PyErr_SetString(tstate, PyExc_SystemError,
"unsuppocted xidata fallback option");
"unsupported xidata fallback option");
return -1;
}
}
Expand Down
Loading
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