Skip to content

Commit 071337c

Browse files
deploy: c1884bd
1 parent 33924bf commit 071337c

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

faq/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,15 @@
905905
</span>
906906
</a>
907907

908+
</li>
909+
910+
<li class="md-nav__item">
911+
<a href="#why-dont-we-use-pydantic" class="md-nav__link">
912+
<span class="md-ellipsis">
913+
Why don't we use Pydantic?
914+
</span>
915+
</a>
916+
908917
</li>
909918

910919
<li class="md-nav__item">
@@ -1127,6 +1136,15 @@
11271136
</span>
11281137
</a>
11291138

1139+
</li>
1140+
1141+
<li class="md-nav__item">
1142+
<a href="#why-dont-we-use-pydantic" class="md-nav__link">
1143+
<span class="md-ellipsis">
1144+
Why don't we use Pydantic?
1145+
</span>
1146+
</a>
1147+
11301148
</li>
11311149

11321150
<li class="md-nav__item">
@@ -1236,6 +1254,14 @@ <h2 id="how-to-handle-revert-commits">How to handle revert commits?<a class="hea
12361254
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>revert<span class="w"> </span>--no-commit<span class="w"> </span>&lt;SHA&gt;
12371255
git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">&quot;revert: foo bar&quot;</span>
12381256
</code></pre></div>
1257+
<h2 id="why-dont-we-use-pydantic">Why don't we use Pydantic?<a class="headerlink" href="#why-dont-we-use-pydantic" title="Permanent link">&para;</a></h2>
1258+
<p>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.</p>
1259+
<p>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 <code>commitizen</code>.</p>
1260+
<p>Moreover we don't rely on the full feature set of Pydantic. Simpler alternatives like Python's built-in <code>TypedDict</code> offer sufficient type safety for our use cases, without the runtime overhead or dependency burden.</p>
1261+
<p>In short, avoiding Pydantic helps us:
1262+
- Keep dependencies lightweight
1263+
- Reduce compatibility issues for users
1264+
- Maintain clarity about what contributors should and shouldn't use</p>
12391265
<h2 id="i-got-exception-winerror-995-the-io-operation-error">I got <code>Exception [WinError 995] The I/O operation ...</code> error<a class="headerlink" href="#i-got-exception-winerror-995-the-io-operation-error" title="Permanent link">&para;</a></h2>
12401266
<p>This error was caused by a Python bug on Windows. It's been fixed by <a href="https://github.com/python/cpython/pull/22017">this PR</a>, and according to Python's changelog, <a href="https://docs.python.org/3.8/whatsnew/changelog.html#python-3-8-6-release-candidate-1">3.8.6rc1</a> and <a href="https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-release-candidate-2">3.9.0rc2</a> should be the accurate versions first contain this fix. In conclusion, upgrade your Python version might solve this issue.</p>
12411267
<p>More discussion can be found in issue <a href="https://github.com/commitizen-tools/commitizen/issues/318">#318</a>.</p>

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)