Skip to content

Commit c253330

Browse files
committed
docs(faq): explain why Pydantic is not used
Closes #1488
1 parent f4b7d4e commit c253330

File tree

4 files changed

+62
-26
lines changed

4 files changed

+62
-26
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,6 @@ venv.bak/
113113

114114
# ruff
115115
.ruff_cache
116+
117+
# poetry
118+
.poetry/

docs/faq.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,26 @@ git revert --no-commit <SHA>
8282
git commit -m "revert: foo bar"
8383
```
8484

85-
## I got `Exception [WinError 995] The I/O operation ...` error
86-
87-
This error was caused by a Python bug on Windows. It's been fixed by [this PR](https://github.com/python/cpython/pull/22017), and according to Python's changelog, [3.8.6rc1](https://docs.python.org/3.8/whatsnew/changelog.html#python-3-8-6-release-candidate-1) and [3.9.0rc2](https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-release-candidate-2) should be the accurate versions first contain this fix. In conclusion, upgrade your Python version might solve this issue.
88-
89-
More discussion can be found in issue [#318](https://github.com/commitizen-tools/commitizen/issues/318).
90-
9185
## Why don't we use Pydantic?
9286

9387
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.
9488

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`.
89+
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`.
9690

9791
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.
9892

9993
In short, avoiding Pydantic helps us:
100-
10194
- Keep dependencies lightweight
10295
- Reduce compatibility issues for users
10396
- Maintain clarity about what contributors should and shouldn't use
10497

98+
99+
## I got `Exception [WinError 995] The I/O operation ...` error
100+
101+
This error was caused by a Python bug on Windows. It's been fixed by [this PR](https://github.com/python/cpython/pull/22017), and according to Python's changelog, [3.8.6rc1](https://docs.python.org/3.8/whatsnew/changelog.html#python-3-8-6-release-candidate-1) and [3.9.0rc2](https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-release-candidate-2) should be the accurate versions first contain this fix. In conclusion, upgrade your Python version might solve this issue.
102+
103+
More discussion can be found in issue [#318](https://github.com/commitizen-tools/commitizen/issues/318).
104+
105105
## Why does Commitizen not support CalVer?
106106

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

poetry.lock

Lines changed: 50 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }]
107107
[tool.poetry.group.dev.dependencies]
108108
ipython = "^8.0"
109109
tox = ">4"
110+
poethepoet = "^0.34.0"
110111

111112
[tool.poetry.group.test.dependencies]
112113
pytest = ">=7.2,<9.0"

0 commit comments

Comments
 (0)