Releases: canonical/pydantic-kitbash
1.0.1
21 January 2026
Learn about the changes introduced in pydantic-kitbash 1.0.1.
Project reorganization
Since the 1.0.0 release, Kitbash underwent a major refactor. In previous versions, the extension's source code was contained in a single directives.py file. This made it difficult to understand and maintain the code. The data classes were also decoupled from their controlling functions.
To remedy this, the monolithic file was split into base.py, utils.py, field_directive.py, and model_directive.py. A new inheritance scheme was implemented to cut down on code duplication. These changes don't affect the behavior or usage of pydantic-kitbash.
Fixed bugs and issues
- #123 Generic types cause failures on Python 3.13+
Full changelog
- build(deps): update release-drafter/release-drafter action to v6.2.0 (main) by @renovate[bot] in #115
- build(deps): update github actions (main) (major) by @renovate[bot] in #116
- chore: break up the
directives.pymonolith by @jahn-junior in #117 - build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.14 (main) by @renovate[bot] in #119
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.15.0 (main) by @renovate[bot] in #120
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.15.1 (main) by @renovate[bot] in #121
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.15.2 (main) by @renovate[bot] in #122
- fix(base): don't fail on generics on Python 3.13+ by @lengau in #118
1.0.0
21 January 2026
Learn about the new features, changes, and fixes introduced in pydantic-kitbash 1.0.0.
Breaking change
The default label format has changed. Incorporating pydantic-kitbash 1.0.0 will break any existing references to Kitbash entries.
In previous versions of Kitbash, generated labels defaulted to <page-filename>-<field-alias>. This resulted in label collisions when fields sharing an alias were documented in the same file, regardless of their parent model.The following two directives, for example, would cause a label collision:
.. kitbash-field:: MyModel my_field
.. kitbash-field:: OtherModel my_fieldTo prevent this from occurring, the default label format was changed to <model-name>.<field-name>. This prevents collisions and aligns the labels with what you see in the document source.
The change from the field's alias to the field's name is significant, as it was often the case that you'd have to view the rendered document or the source model to figure out a field's alias. Now, you need only look at the directive arguments to figure out how it's labelled.
Fixed bugs and issues
- #106 Automatic labels collide too often
Full changelog
- build(deps): update github actions (main) (major) by @renovate[bot] in #105
- build: bump urllib3 by @bepri in #108
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.11 (main) by @renovate[bot] in #107
- feat!: change default label format by @jahn-junior in #111
- chore: reconcile with sphinx-ext-template by @jahn-junior in #110
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.13 (main) by @renovate[bot] in #112
- build(deps): lock file maintenance (main) by @renovate[bot] in #109
0.1.1
12 December 2025
Learn about the new features, changes, and fixes introduced in pydantic-kitbash 0.1.1.
Fixed bugs and issues
- #102 Fields are now sourced from the first available model in the inheritance hierarchy.
Full changelog
- fix: prioritize subclass field definitions by @jahn-junior in #103
0.1.0
11 December 2025
Learn about the new features, changes, and fixes introduced in pydantic-kitbash 0.1.0.
Minor features
Description overrides
Descriptions can now be overridden entirely with directive content by including the override-description option.
.. kitbash-field:: MyModel my_field
:override-description:
This text will replace the field's description.This is useful when documenting fields whose descriptions can't be easily edited in the source, such as those from libraries.
Inherited fields
In previous iterations of Kitbash, fields could only be documented from the model they're declared in. This resulted in having to reassign py:currentmodule to document inherited fields. Inherited fields can now be documented from the subclass itself.
# models.py
class ParentModel(pydantic.BaseModel):
my_field: str
"""This field is inherited by 'MyModel'."""
class MyModel(ParentModel):
# ..... kitbash-field:: models.MyModel my_fieldFixed bugs and issues
- #49 Passing a nonexistent module or class now throws an
ExtensionError. - #68 Type prefixes are now stripped only if they're valid Python names.
- #77 Appending content to descriptions with multiple paragraphs no longer creates blockquotes.
Full changelog
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.13.0 by @renovate[bot] in #71
- build(deps): update github actions (major) by @renovate[bot] in #69
- build(deps): update dependency mypy to ~=1.18.2 by @renovate[bot] in #72
- build(deps): update dependency pytest-cov to v7 by @renovate[bot] in #73
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.13.2 by @renovate[bot] in #74
- build(deps): lock file maintenance by @renovate[bot] in #78
- chore: fix lint error by @bepri in #81
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.13.3 by @renovate[bot] in #80
- build(deps): update dependency sphinxext-rediraffe to v0.3.0 by @renovate[bot] in #79
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.0 by @renovate[bot] in #83
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.2 (main) by @renovate[bot] in #86
- fix: update docs config by @jahn-junior in #89
- build(deps): update dependency python to 3.14 (main) by @renovate[bot] in #87
- docs: add options to readme by @medubelko in #92
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.7 (main) by @renovate[bot] in #94
- build(deps): update dependency mypy to ~=1.19.0 (main) by @renovate[bot] in #93
- build(deps): update dependency pytest to v9 (main) by @renovate[bot] in #95
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.14.8 (main) by @renovate[bot] in #96
- build: bump urllib3 by @bepri in #97
- feat: support inherited fields by @jahn-junior in #98
- fix: refine module prefix regex by @jahn-junior in #100
- feat: add
override-descriptionoption by @jahn-junior in #99 - fix: dedent docstrings before appending content by @jahn-junior in #101
New Contributors
- @medubelko made their first contribution in #92
0.0.8
What's Changed
- build(deps): update actions/download-artifact action to v5 by @renovate[bot] in #57
- build(deps): update dependency mypy to ~=1.17.1 by @renovate[bot] in #58
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.8 by @renovate[bot] in #59
- build(deps): update actions/checkout action to v5 by @renovate[bot] in #60
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.9 by @renovate[bot] in #62
- build(deps): update pre-commit hook pre-commit/pre-commit-hooks to v6 by @renovate[bot] in #61
- fix: check for null description before appending content by @jahn-junior in #64
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.10 by @renovate[bot] in #63
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.11 by @renovate[bot] in #67
- test: improve integration test by @jahn-junior in #65
Full Changelog: 0.0.7...0.0.8
0.0.7
What's Changed
- test: preserve integration test output by @jahn-junior in #51
- feat: add cross-reference support by @jahn-junior in #52
- feat: use
py:modulewhen importing models by @jahn-junior in #53 - build(deps): lock file maintenance by @renovate[bot] in #44
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.7 by @renovate[bot] in #46
- feat: append directive content to description by @jahn-junior in #54
- fix: support block-formatted YAML strings by @jahn-junior in #55
Full Changelog: 0.0.6...0.0.7
0.0.6
What's Changed
- build(deps): update dependency mypy to ~=1.16.0 by @renovate in #38
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.13 by @renovate in #43
- feat: add labels to entries by @jahn-junior in #48
Full Changelog: 0.0.5...0.0.6
0.0.5
What's Changed
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.10 by @renovate in #30
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.11 by @renovate in #31
- fix: correct typo in table header by @jahn-junior in #32
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.12 by @renovate in #37
- fix: monospace Literal[] fields correctly by @jahn-junior in #35
- build(deps): lock file maintenance by @renovate in #39
- fix: indent YAML list items by @jahn-junior in #33
Full Changelog: 0.0.4...0.0.5
0.0.4
What's Changed
- build(deps): lock file maintenance by @renovate in #10
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.5 by @renovate in #4
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.6 by @renovate in #15
- build(deps): lock file maintenance by @renovate in #16
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.7 by @renovate in #22
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.8 by @renovate in #24
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.9 by @renovate in #25
- build(deps): lock file maintenance by @renovate in #23
- build(deps): update dependency sphinx-toolbox to v4 by @renovate in #26
- feat: add :skip-description: option by @jahn-junior in #28
- feat: improve field type output by @jahn-junior in #27
- fix: check args attribute before accessing by @jahn-junior in #29
New Contributors
Full Changelog: 0.0.3...0.0.4
0.0.3
What's Changed
- build(deps): lock file maintenance by @renovate in #10
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.5 by @renovate in #4
- build(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.6 by @renovate in #15
- fix: prepend field name before parsing with PyYAML by @jahn-junior in #17
Full Changelog: 0.0.2...0.0.3