Skip to content

Commit 7af5bb3

Browse files
committed
Add FAQ explaining why Pydantic is not used
1 parent 47beadc commit 7af5bb3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/faq.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ This error was caused by a Python bug on Windows. It's been fixed by [this PR](h
8888

8989
More discussion can be found in issue [#318](https://github.com/commitizen-tools/commitizen/issues/318).
9090

91+
## Why don't we use Pydantic?
92+
93+
While **Pydantic** is a powerful and popular library for data validation, we intentionally avoid using it in this project to keep our dependency tree minimal and maintainable.
94+
95+
Including Pydantic would increase the chances of version conflicts for users - especially with major changes introduced in Pydantic v3. Because we pin dependencies tightly, adding Pydantic could unintentionally restrict what other tools or libraries users can install alongside `commitizen`.
96+
97+
Moreover we don't rely on the full feature set of Pydantic. Simpler alternatives like Python's built-in `TypedDict` offer sufficient type safety for our use cases, without the runtime overhead or dependency burden.
98+
99+
In short, avoiding **Pydantic** helps us:
100+
101+
- Keep dependencies lightweight
102+
- Reduce compatibility issues for users
103+
- Maintain clarity about what contributors should and shouldn't use
104+
91105
## Why does Commitizen not support CalVer?
92106

93107
`commitizen` could support CalVer alongside SemVer, but in practice implementing CalVer

0 commit comments

Comments
 (0)