| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Thank you for correcting this!
Sorry, something went wrong.
|
I think I've found a good spot to add a sanity check that will make the test cases fail if a PR gets this accounting wrong - building that now (and I'll test it out by partially reverting the previous change). |
Sorry, something went wrong.
|
Neat: ======================================================================
ERROR: test_named_expression_variable_reuse_in_comprehensions (test.test_named_expressions.NamedExpressionScopeTest) (case='Nested nonlocal')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ncoghlan/devel/cpython/Lib/test/test_named_expressions.py", line 469, in test_named_expression_variable_reuse_in_comprehensions
exec(code, ns)
SystemError: symtable analysis recursion depth mismatch (before=96, after=95)
(This is with VISIT_QUIT(st, 1) at the end of symtable_handle_namedexpr) |
Sorry, something went wrong.
|
Thanks @ncoghlan for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Sorry, something went wrong.
|
GH-15594 is a backport of this pull request to the 3.8 branch. |
Sorry, something went wrong.
…honGH-15593) With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean. (cherry picked from commit 0614523) Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
…15593) With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean. (cherry picked from commit 0614523) Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
…honGH-15593) With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean.
…honGH-15593) With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean.
…honGH-15593) With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean.
| Back | FazBrowse Home | New Git URL |
With symtable_visit_expr now correctly adjusting the recursion depth for named
expressions, symtable_handle_namedexpr should be leaving it alone.
https://bugs.python.org/issue37947