-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Given the following code snippet:
import ast
source = b'class A:\n """\n """\n'
compile(ast.parse(source), "a", "exec")
python3.13 -OO test.py
passes, but python3.14 -OO test.py
fails, with:
Traceback (most recent call last):
File "/Users/tybug/Desktop/sandbox2.py", line 7, in <module>
compile(ast.parse(source), "a", "exec")
ValueError: empty body on ClassDef
Python: 3.14.0rc1
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error