Merge remote-tracking branch 'upstream/main' into document-max_len-auto-str

This commit is contained in:
Yurii Motov
2026-02-21 00:17:50 +01:00
238 changed files with 1544 additions and 8623 deletions

View File

@@ -68,7 +68,7 @@ Make sure you use a supported label from the <a href="https://github.com/tiangol
* `refactor`: Refactors
* This is normally for changes to the internal code that don't change the behavior. Normally it improves maintainability, or enables future features, etc.
* `upgrade`: Upgrades
* This is for upgrades to direct dependencies from the project, or extra optional dependencies, normally in `pyproject.toml`. So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those internal dependencies, normally in `requirements.txt` files or GitHub Action versions should be marked as `internal`, not `upgrade`.
* This is for upgrades to direct dependencies from the project, or extra optional dependencies, normally in `pyproject.toml`. So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those internal dependencies or GitHub Action versions should be marked as `internal`, not `upgrade`.
* `docs`: Docs
* Changes in docs. This includes updating the docs, fixing typos. But it doesn't include changes to translations.
* You can normally quickly detect it by going to the "Files changed" tab in the PR and checking if the updated file(s) starts with `docs/en/docs`. The original version of the docs is always in English, so in `docs/en/docs`.
@@ -83,9 +83,13 @@ Some tools like Dependabot, will add some labels, like `dependencies`, but have
## Review PRs
If a PR doesn't explain what it does or why, ask for more information.
* If a PR doesn't explain what it does or why, if it seems like it could be useful, ask for more information. Otherwise, feel free to close it.
A PR should have a specific use case that it is solving.
* If a PR seems to be spam, meaningless, only to change statistics (to appear as "contributor") or similar, you can simply mark it as `invalid`, and it will be automatically closed.
* If a PR seems to be AI generated, and seems like reviewing it would take more time from you than the time it took to write the prompt, mark it as `maybe-ai`, and it will be automatically closed.
* A PR should have a specific use case that it is solving.
* If the PR is for a feature, it should have docs.
* Unless it's a feature we want to discourage, like support for a corner case that we don't want users to use.
@@ -103,13 +107,11 @@ A PR should have a specific use case that it is solving.
Dependabot will create PRs to update dependencies for several things, and those PRs all look similar, but some are way more delicate than others.
* If the PR is for a direct dependency, so, Dependabot is modifying `pyproject.toml`, **don't merge it**. 😱 Let me check it first. There's a good chance that some additional tweaks or updates are needed.
* If the PR updates one of the internal dependencies, for example it's modifying `requirements.txt` files, or GitHub Action versions, if the tests are passing, the release notes (shown in a summary in the PR) don't show any obvious potential breaking change, you can merge it. 😎
* If the PR is for a direct dependency, so, Dependabot is modifying `pyproject.toml` in the main dependencies, **don't merge it**. 😱 Let me check it first. There's a good chance that some additional tweaks or updates are needed.
* If the PR updates one of the internal dependencies, for example the group `dev` in `pyproject.toml`, or GitHub Action versions, if the tests are passing, the release notes (shown in a summary in the PR) don't show any obvious potential breaking change, you can merge it. 😎
## Mark GitHub Discussions Answers
When a question in GitHub Discussions has been answered, mark the answer by clicking "Mark as answer".
Many of the current Discussion Questions were migrated from old issues. Many have the label `answered`, that means they were answered when they were issues, but now in GitHub Discussions, it's not known what is the actual response from the messages.
You can filter discussions by <a href="https://github.com/fastapi/sqlmodel/discussions/categories/questions?discussions_q=category:Questions+is:open+is:unanswered" class="external-link" target="_blank">`Questions` that are `Unanswered`</a>.

View File

@@ -2,6 +2,58 @@
## Latest Changes
## 0.0.35
### Breaking Changes
* Drop support for Python 3.9. PR [#1766](https://github.com/fastapi/sqlmodel/pull/1766) by [@tiangolo](https://github.com/tiangolo).
### Internal
* 🔨 Add script to remove Python 3.9 files, migrate to Python 3.10. PR [#1767](https://github.com/fastapi/sqlmodel/pull/1767) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump prek from 0.3.2 to 0.3.3. PR [#1761](https://github.com/fastapi/sqlmodel/pull/1761) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump typer from 0.23.1 to 0.23.2. PR [#1760](https://github.com/fastapi/sqlmodel/pull/1760) by [@dependabot[bot]](https://github.com/apps/dependabot).
## 0.0.34
### Internal
* 👷 Enable tests with lower and upper bound versions. PR [#1735](https://github.com/fastapi/sqlmodel/pull/1735) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump ruff from 0.15.0 to 0.15.1. PR [#1758](https://github.com/fastapi/sqlmodel/pull/1758) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump typer from 0.23.0 to 0.23.1. PR [#1759](https://github.com/fastapi/sqlmodel/pull/1759) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump typer from 0.21.2 to 0.23.0. PR [#1756](https://github.com/fastapi/sqlmodel/pull/1756) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump fastapi from 0.128.7 to 0.128.8. PR [#1755](https://github.com/fastapi/sqlmodel/pull/1755) by [@dependabot[bot]](https://github.com/apps/dependabot).
## 0.0.33
### Docs
* ✏️ Fix typos in inline comment in `expression.py`. PR [#1747](https://github.com/fastapi/sqlmodel/pull/1747) by [@veeceey](https://github.com/veeceey).
* 📝 Fix async example in `session.execute()` docstring & deprecation message. PR [#1643](https://github.com/fastapi/sqlmodel/pull/1643) by [@DanielLeviLucas](https://github.com/DanielLeviLucas).
* 📝 Update `management-tasks.md` to be in line with `management-tasks.md` in FastAPI repo. PR [#1743](https://github.com/fastapi/sqlmodel/pull/1743) by [@YuriiMotov](https://github.com/YuriiMotov).
### Internal
* 🔨 Update build script for `sqlmodel-slim`. PR [#1754](https://github.com/fastapi/sqlmodel/pull/1754) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump fastapi from 0.128.6 to 0.128.7. PR [#1751](https://github.com/fastapi/sqlmodel/pull/1751) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump typer from 0.21.1 to 0.21.2. PR [#1752](https://github.com/fastapi/sqlmodel/pull/1752) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Update build setup for `sqlmodel-slim`, deprecate it, and make it only depend on `sqlmodel`. PR [#1753](https://github.com/fastapi/sqlmodel/pull/1753) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump fastapi from 0.128.3 to 0.128.6. PR [#1750](https://github.com/fastapi/sqlmodel/pull/1750) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump fastapi from 0.128.1 to 0.128.3. PR [#1746](https://github.com/fastapi/sqlmodel/pull/1746) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump prek from 0.3.1 to 0.3.2. PR [#1745](https://github.com/fastapi/sqlmodel/pull/1745) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump fastapi from 0.128.0 to 0.128.1. PR [#1742](https://github.com/fastapi/sqlmodel/pull/1742) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ✅ Update `ValidationError` schema in FastAPI-related tests to be compatible with FastAPI 0.128.1+. PR [#1744](https://github.com/fastapi/sqlmodel/pull/1744) by [@YuriiMotov](https://github.com/YuriiMotov).
* ⬆ Bump ruff from 0.14.14 to 0.15.0. PR [#1740](https://github.com/fastapi/sqlmodel/pull/1740) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Add generate-readme to pre-commit. PR [#1741](https://github.com/fastapi/sqlmodel/pull/1741) by [@tiangolo](https://github.com/tiangolo).
* 👷 Run mypy by pre-commit. PR [#1738](https://github.com/fastapi/sqlmodel/pull/1738) by [@YuriiMotov](https://github.com/YuriiMotov).
* ⬆ Bump prek from 0.3.0 to 0.3.1. PR [#1739](https://github.com/fastapi/sqlmodel/pull/1739) by [@dependabot[bot]](https://github.com/apps/dependabot).
## 0.0.32
### Fixes
* 🐛 Fix support for `Annotated` fields with Pydantic 2.12+. PR [#1607](https://github.com/fastapi/sqlmodel/pull/1607) by [@vimota](https://github.com/vimota).
### Refactors
* ♻️ Import `Literal` from the `typing` module directly. PR [#1699](https://github.com/fastapi/sqlmodel/pull/1699) by [@svlandeg](https://github.com/svlandeg).

View File

@@ -342,16 +342,6 @@ And as we created the **engine** with `echo=True`, we can see the SQL statements
////
//// tab | Python 3.9+
```Python
{!./docs_src/tutorial/automatic_id_none_refresh/tutorial002_py39.py!}
```
{!./docs_src/tutorial/automatic_id_none_refresh/annotations/en/tutorial002.md!}
////
And here's all the output generated by running this program, all together:
<div class="termy">

View File

@@ -562,16 +562,6 @@ Now, let's give the code a final look:
////
//// tab | Python 3.9+
```{.python .annotate}
{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py!}
```
{!./docs_src/tutorial/create_db_and_table/annotations/en/tutorial003.md!}
////
/// tip
Review what each line does by clicking each number bubble in the code. 👆

View File

@@ -227,16 +227,6 @@ Now let's review all that code:
////
//// tab | Python 3.9+
```{ .python .annotate hl_lines="72-90" }
{!./docs_src/tutorial/delete/tutorial002_py39.py!}
```
{!./docs_src/tutorial/delete/annotations/en/tutorial002.md!}
////
/// tip
Check out the number bubbles to see what is done by each line of code.

View File

@@ -39,20 +39,6 @@ This is the code we had to create the database and table, nothing new here:
////
//// tab | Python 3.9+
```{.python .annotate hl_lines="22" }
{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py[ln:1-20]!}
# More code here later 👈
{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py[ln:23-24]!}
```
{!./docs_src/tutorial/create_db_and_table/annotations/en/tutorial003.md!}
////
Now that we can create the database and the table, we will continue from this point and add more code on the same file to create the data.
## Create Data with SQL
@@ -343,16 +329,6 @@ Let's focus on the new code:
////
//// tab | Python 3.9+
```{.python .annotate }
{!./docs_src/tutorial/insert/tutorial003_py39.py!}
```
{!./docs_src/tutorial/insert/annotations/en/tutorial003.md!}
////
/// tip
Review what each line does by clicking each number bubble in the code. 👆

View File

@@ -273,16 +273,6 @@ Let's review the code up to this point:
////
//// tab | Python 3.9+
```{ .python .annotate }
{!./docs_src/tutorial/select/tutorial002_py39.py!}
```
{!./docs_src/tutorial/select/annotations/en/tutorial002.md!}
////
/// tip
Check out the number bubbles to see what is done by each line of code.

View File

@@ -236,16 +236,6 @@ Now let's review all that code:
////
//// tab | Python 3.9+
```{ .python .annotate hl_lines="44-55" }
{!./docs_src/tutorial/update/tutorial002_py39.py!}
```
{!./docs_src/tutorial/update/annotations/en/tutorial002.md!}
////
/// tip
Check out the number bubbles to see what is done by each line of code.
@@ -272,20 +262,6 @@ This also means that you can update several fields (attributes, columns) at once
////
//// tab | Python 3.9+
```{ .python .annotate hl_lines="15-17 19-21 23" }
# Code above omitted 👆
{!./docs_src/tutorial/update/tutorial004_py39.py[ln:44-70]!}
# Code below omitted 👇
```
{!./docs_src/tutorial/update/annotations/en/tutorial004.md!}
////
/// details | 👀 Full file preview
//// tab | Python 3.10+
@@ -296,14 +272,6 @@ This also means that you can update several fields (attributes, columns) at once
////
//// tab | Python 3.9+
```Python
{!./docs_src/tutorial/update/tutorial004_py39.py!}
```
////
///
/// tip