You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sending non-None values makes generator raise StopIteration on next access #90167
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2022-01-05.16:02:13.606>created_at=<Date2021-12-07.21:53:29.521>labels= ['type-bug', 'release-blocker', '3.10', '3.11']
title='sending non-None values makes generator raise StopIteration on next access'updated_at=<Date2022-01-05.16:02:13.606>user='https://github.com/Zabolekar'
python.js:235 Uncaught RuntimeError: null function or function signature mismatch
at _PyEval_EvalFrameDefault (ceval.c:4247)
at _PyEval_EvalFrame (pycore_ceval.h:48)
at gen_send_ex2 (genobject.c:219)
at gen_iternext (genobject.c:583)
at builtin_any (bltinmodule.c:384)
at cfunction_vectorcall_O (methodobject.c:516)
at _PyObject_VectorcallTstate.11 (pycore_call.h:89)
at PyObject_Vectorcall (call.c:298)
at _PyEval_EvalFrameDefault (ceval.c:4625)
at _PyEval_EvalFrame.1 (pycore_ceval.h:48)
Activity
Zabolekar commentedon Dec 7, 2021
Tested with Python 3.10.1 on Linux and Python 3.10.0 on Windows.
The following code prints None in 3.9 and raises StopIteration without any additional information in 3.10:
markshannon commentedon Dec 8, 2021
New changeset 69806b9 by Mark Shannon in branch 'main':
bpo-46009: Do not exhaust generator when send() method raises (GH-29986)
69806b9
pablogsal commentedon Dec 8, 2021
New changeset 99c7232 by Mark Shannon in branch '3.10':
[3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986). (GH-29988)
99c7232
brandtbucher commentedon Jan 4, 2022
New changeset 31e43cb by Brandt Bucher in branch 'main':
bpo-46009: Remove GEN_START (GH-30367)
31e43cb
tiran commentedon Jan 5, 2022
#74552 broke Emscripten WASM builds. I'm getting a "null function or function signature mismatch" error from the WASM engine:
RuntimeError: null function or function signature mismatch
at _PyEval_EvalFrameDefault (http://localhost:8000/python.wasm:wasm-function[2383]:0x103a6f)
at gen_send_ex2 (http://localhost:8000/python.wasm:wasm-function[886]:0x4f35d)
at gen_iternext (http://localhost:8000/python.wasm:wasm-function[893]:0x4fb1a)
at builtin_any (http://localhost:8000/python.wasm:wasm-function[3927]:0x198a87)
at cfunction_vectorcall_O (http://localhost:8000/python.wasm:wasm-function[403]:0x201ae)
at PyObject_Vectorcall (http://localhost:8000/python.wasm:wasm-function[2426]:0x109dbe)
at _PyEval_EvalFrameDefault (http://localhost:8000/python.wasm:wasm-function[2383]:0x1062ba)
at _PyEval_Vector (http://localhost:8000/python.wasm:wasm-function[2380]:0xfc366)
at PyEval_EvalCode (http://localhost:8000/python.wasm:wasm-function[2379]:0xfc014)
at _PyConfig_InitPathConfig (http://localhost:8000/python.wasm:wasm-function[6871]:0x2924b0)
I'm trying to get more debug information now.
tiran commentedon Jan 5, 2022
I got more debug symbols:
python.js:235 Uncaught RuntimeError: null function or function signature mismatch
at _PyEval_EvalFrameDefault (ceval.c:4247)
at _PyEval_EvalFrame (pycore_ceval.h:48)
at gen_send_ex2 (genobject.c:219)
at gen_iternext (genobject.c:583)
at builtin_any (bltinmodule.c:384)
at cfunction_vectorcall_O (methodobject.c:516)
at _PyObject_VectorcallTstate.11 (pycore_call.h:89)
at PyObject_Vectorcall (call.c:298)
at _PyEval_EvalFrameDefault (ceval.c:4625)
at _PyEval_EvalFrame.1 (pycore_ceval.h:48)
The culprit is
in the TARGET(FOR_ITER) target. An additional NULL check resolves the problem.
tiran commentedon Jan 5, 2022
False alarm ... the frozen files for getpath.py were out of date. I can no longer reproduce the issue after a hard git clean and rebuild.