Skip to content

Choose a tag to compare

@github-actions github-actions released this 17 Aug 16:35
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

  • Update CHANGELOG for 0.73.0 by @dcg-generated-docs[bot] in #3767
  • Update release benchmark data by @dcg-generated-docs[bot] in #3768
  • Deploy release benchmark data updates by @koxudaxi in #3771
  • fix(parser): render non-finite values structurally by @Aryan-Pardeshi in #3770

New Contributors

Full Changelog: 0.73.0...0.74.0