Bug report
Bug description:
The following code crashes on 3.14.0a4 but runs without error on 3.13:
import dataclasses
def my_dataclass(cls):
try:
annotations = cls.__dict__["__annotations__"]
except KeyError:
cls = dataclasses.dataclass()(cls)
else:
new_annotations = dict(annotations)
for name in annotations.keys():
if name == "ignore_this_annotation":
new_annotations.pop(name)
cls.__annotations__ = new_annotations
cls = dataclasses.dataclass()(cls)
cls.__annotations__ = annotations
return cls
@my_dataclass
class X:
x: int = 3
ignore_this_annotation: int
with:
TypeError: non-default argument 'ignore_this_annotation' follows default argument 'x'
Python installed via uv venv --python=3.14.
x-ref patrick-kidger/optimistix#168 patrick-kidger/equinox#1096)
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Bug report
Bug description:
The following code crashes on 3.14.0a4 but runs without error on 3.13:
with:
Python installed via
uv venv --python=3.14.x-ref patrick-kidger/optimistix#168 patrick-kidger/equinox#1096)
CPython versions tested on:
3.14
Operating systems tested on:
macOS