|
905 | 905 | </span>
|
906 | 906 | </a>
|
907 | 907 |
|
| 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 | + |
908 | 917 | </li>
|
909 | 918 |
|
910 | 919 | <li class="md-nav__item">
|
|
1127 | 1136 | </span>
|
1128 | 1137 | </a>
|
1129 | 1138 |
|
| 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 | + |
1130 | 1148 | </li>
|
1131 | 1149 |
|
1132 | 1150 | <li class="md-nav__item">
|
@@ -1236,6 +1254,14 @@ <h2 id="how-to-handle-revert-commits">How to handle revert commits?<a class="hea
|
1236 | 1254 | <div class="highlight"><pre><span></span><code>git<span class="w"> </span>revert<span class="w"> </span>--no-commit<span class="w"> </span><SHA>
|
1237 | 1255 | git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"revert: foo bar"</span>
|
1238 | 1256 | </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">¶</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> |
1239 | 1265 | <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">¶</a></h2>
|
1240 | 1266 | <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>
|
1241 | 1267 | <p>More discussion can be found in issue <a href="https://github.com/commitizen-tools/commitizen/issues/318">#318</a>.</p>
|
|
0 commit comments