-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbugs.json
More file actions
42 lines (42 loc) · 2.33 KB
/
Copy pathbugs.json
File metadata and controls
42 lines (42 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"_meta": {
"source": "MicroPython tests/basics differential vs CPython 3.13",
"verified": "each repro re-run through VM + python3",
"count": 4,
"fixed": "100 bugs fixed in vm.json: try/finally unwinding, yield-from expressions, range overflow/truncation/contains, in-place set ops, del of closures, lt sorting, nested next() corruption, nested generator/comprehension ForIter relocation, nested-call spread-arg count corruption, spread-arg after keyword, kwarg name colliding with *args/**kwargs param, kwarg duplicated into **kwargs."
},
"bugs": [
{
"id": "assign_expr",
"category": "control-flow",
"summary": "any() does not short-circuit, so a walrus var assigned inside the generator keeps the last-iteration value instead of stopping at the matching element.",
"repro": "def foo():\n any((hit := i) == 8 for i in range(20))\n return hit\nprint(foo())",
"expected": "8",
"actual": "19"
},
{
"id": "gen_yield_from_executing",
"category": "scoping",
"summary": "A generator that yields from itself via a module-global name raises NameError on that validly-bound name instead of the expected ValueError; the global binding is lost on generator re-entry.",
"repro": "def f():\n yield 1\n yield from g\ng = f()\nprint(next(g))\ntry:\n next(g)\nexcept ValueError:\n print('ValueError')",
"expected": "1\nValueError",
"actual": "1"
},
{
"id": "scope_implicit",
"category": "scoping",
"summary": "Implicit nonlocal closure over a variable defined in the enclosing scope after the nested function raises NameError instead of capturing it.",
"repro": "def f():\n def g():\n return x\n x = 3\n return g\nprint(f()())",
"expected": "3",
"actual": "__VMERR__ NameError: name 'x' is not defined"
},
{
"id": "global_rebind_cross_function",
"category": "scoping",
"summary": "A global rebind inside one function is invisible to reads from other functions; in-place mutation propagates. Found building dom batch(); also pinned red in vm.json. Note: fix host/dom/src/entry.py line 25 around after this.",
"repro": "x = [1]\ndef rebind():\n global x\n x = []\ndef read():\n return len(x)\nrebind()\nprint(read())",
"expected": "0",
"actual": "1"
}
]
}