Skip to content

Choose a tag to compare

@github-actions github-actions released this 17 Aug 16:35
· 414 commits to main since this release
5d313d7

Breaking Changes

Code Generation Changes

  • Non-finite float values now render as structural float(...) expressions - Generated code for non-finite floats (inf, -inf, nan) from Protocol Buffers, XML Schema, and AsyncAPI-embedded schemas — as field defaults, constraint bounds, list items, and enum values — now renders inline as float('inf'), float('-inf'), and float('nan') instead of emitting bare inf/nan literals with an injected from math import inf, nan header. Users relying on the previous output (e.g. snapshot/golden tests, or importing inf/nan from the generated module) will see different generated code (#3770)
# Before
from math import inf

class Model(BaseModel):
    value: float | None = inf

# After
class Model(BaseModel):
    value: float | None = float('inf')

What's Changed

New Contributors

Full Changelog: 0.73.0...0.74.0