#6 0x00007ffff7ca9e96 in __GI___assert_fail (assertion=0x555555a5e2da "PyErr_Occurred()", file=0x555555a6edcd "Objects/object.c", line=1253, function=0x555555a6f36e "int _PyObject_SetAttributeErrorContext(PyObject *, PyObject *)") at ./assert/assert.c:101
#7 0x00005555557273ac in _PyObject_SetAttributeErrorContext (v=<module at remote 0x200009a1a50>, name='getaliases') at Objects/object.c:1253
#8 0x0000555555726dde in PyObject_GetAttr (v=<module at remote 0x200009a1a50>, name='getaliases') at Objects/object.c:1306
#9 0x0000555555727de6 in _PyObject_GetMethod (obj=<module at remote 0x200009a1a50>, name='getaliases', method=0x7ffffffdb1b8) at Objects/object.c:1581
#10 0x000055555588456d in _PyEval_EvalFrameDefault (tstate=0x555555d16fb0 <_PyRuntime+360560>, frame=0x7ffff7f9cf20, throwflag=0) at Python/generated_cases.c.h:7682
Bug report
Bug description:
This can lead to an assertion failure:
_Py_wgetcwddoes not set an exception on failure:cpython/Objects/moduleobject.c
Lines 923 to 924 in a025f27
Likely related to #95754
cc @hauntsaninja
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs