diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3e13f68cc..c7197e65f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,9 +30,6 @@ jobs: uv-resolution: - highest include: - - os: windows-latest - python-version: "3.9" - uv-resolution: highest - os: ubuntu-latest python-version: "3.10" uv-resolution: lowest-direct diff --git a/docs/tutorial/automatic-id-none-refresh.md b/docs/tutorial/automatic-id-none-refresh.md index 93842c6906..c55951f4e4 100644 --- a/docs/tutorial/automatic-id-none-refresh.md +++ b/docs/tutorial/automatic-id-none-refresh.md @@ -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:
diff --git a/docs/tutorial/create-db-and-table.md b/docs/tutorial/create-db-and-table.md index 42ec604932..0faa3e5bfd 100644 --- a/docs/tutorial/create-db-and-table.md +++ b/docs/tutorial/create-db-and-table.md @@ -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. 👆 diff --git a/docs/tutorial/delete.md b/docs/tutorial/delete.md index 9f494ec44c..f6807fddab 100644 --- a/docs/tutorial/delete.md +++ b/docs/tutorial/delete.md @@ -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. diff --git a/docs/tutorial/insert.md b/docs/tutorial/insert.md index 502a15cb87..e2d9a4637f 100644 --- a/docs/tutorial/insert.md +++ b/docs/tutorial/insert.md @@ -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. 👆 diff --git a/docs/tutorial/select.md b/docs/tutorial/select.md index 3e20372463..f31722d445 100644 --- a/docs/tutorial/select.md +++ b/docs/tutorial/select.md @@ -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. diff --git a/docs/tutorial/update.md b/docs/tutorial/update.md index 7c7cb5c45d..4066379218 100644 --- a/docs/tutorial/update.md +++ b/docs/tutorial/update.md @@ -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 diff --git a/docs_src/advanced/decimal/tutorial001_py39.py b/docs_src/advanced/decimal/tutorial001_py39.py deleted file mode 100644 index a0a9804ade..0000000000 --- a/docs_src/advanced/decimal/tutorial001_py39.py +++ /dev/null @@ -1,61 +0,0 @@ -from decimal import Decimal -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - money: Decimal = Field(default=0, max_digits=5, decimal_places=3) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson", money=1.1) - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador", money=0.001) - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48, money=2.2) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Deadpond") - results = session.exec(statement) - hero_1 = results.one() - print("Hero 1:", hero_1) - - statement = select(Hero).where(Hero.name == "Rusty-Man") - results = session.exec(statement) - hero_2 = results.one() - print("Hero 2:", hero_2) - - total_money = hero_1.money + hero_2.money - print(f"Total money: {total_money}") - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/advanced/uuid/tutorial001_py39.py b/docs_src/advanced/uuid/tutorial001_py39.py deleted file mode 100644 index cfd3146b41..0000000000 --- a/docs_src/advanced/uuid/tutorial001_py39.py +++ /dev/null @@ -1,65 +0,0 @@ -import uuid -from typing import Union - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: uuid.UUID = Field(default_factory=uuid.uuid4, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Union[int, None] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_hero(): - with Session(engine) as session: - hero = Hero(name="Deadpond", secret_name="Dive Wilson") - print("The hero before saving in the DB") - print(hero) - print("The hero ID was already set") - print(hero.id) - session.add(hero) - session.commit() - session.refresh(hero) - print("After saving in the DB") - print(hero) - - -def select_hero(): - with Session(engine) as session: - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_2) - session.commit() - session.refresh(hero_2) - hero_id = hero_2.id - print("Created hero:") - print(hero_2) - print("Created hero ID:") - print(hero_id) - - statement = select(Hero).where(Hero.id == hero_id) - selected_hero = session.exec(statement).one() - print("Selected hero:") - print(selected_hero) - print("Selected hero ID:") - print(selected_hero.id) - - -def main() -> None: - create_db_and_tables() - create_hero() - select_hero() - - -if __name__ == "__main__": - main() diff --git a/docs_src/advanced/uuid/tutorial002_py39.py b/docs_src/advanced/uuid/tutorial002_py39.py deleted file mode 100644 index 831725581b..0000000000 --- a/docs_src/advanced/uuid/tutorial002_py39.py +++ /dev/null @@ -1,64 +0,0 @@ -import uuid -from typing import Union - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: uuid.UUID = Field(default_factory=uuid.uuid4, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Union[int, None] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_hero(): - with Session(engine) as session: - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - print("The hero before saving in the DB") - print(hero_1) - print("The hero ID was already set") - print(hero_1.id) - session.add(hero_1) - session.commit() - session.refresh(hero_1) - print("After saving in the DB") - print(hero_1) - - -def select_hero(): - with Session(engine) as session: - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_2) - session.commit() - session.refresh(hero_2) - hero_id = hero_2.id - print("Created hero:") - print(hero_2) - print("Created hero ID:") - print(hero_id) - - selected_hero = session.get(Hero, hero_id) - print("Selected hero:") - print(selected_hero) - print("Selected hero ID:") - print(selected_hero.id) - - -def main() -> None: - create_db_and_tables() - create_hero() - select_hero() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/automatic_id_none_refresh/tutorial001_py39.py b/docs_src/tutorial/automatic_id_none_refresh/tutorial001_py39.py deleted file mode 100644 index e15742ffb8..0000000000 --- a/docs_src/tutorial/automatic_id_none_refresh/tutorial001_py39.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - print("Before interacting with the database") - print("Hero 1:", hero_1) - print("Hero 2:", hero_2) - print("Hero 3:", hero_3) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - print("After adding to the session") - print("Hero 1:", hero_1) - print("Hero 2:", hero_2) - print("Hero 3:", hero_3) - - session.commit() - - print("After committing the session") - print("Hero 1:", hero_1) - print("Hero 2:", hero_2) - print("Hero 3:", hero_3) - - print("After committing the session, show IDs") - print("Hero 1 ID:", hero_1.id) - print("Hero 2 ID:", hero_2.id) - print("Hero 3 ID:", hero_3.id) - - print("After committing the session, show names") - print("Hero 1 name:", hero_1.name) - print("Hero 2 name:", hero_2.name) - print("Hero 3 name:", hero_3.name) - - session.refresh(hero_1) - session.refresh(hero_2) - session.refresh(hero_3) - - print("After refreshing the heroes") - print("Hero 1:", hero_1) - print("Hero 2:", hero_2) - print("Hero 3:", hero_3) - - print("After the session closes") - print("Hero 1:", hero_1) - print("Hero 2:", hero_2) - print("Hero 3:", hero_3) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/automatic_id_none_refresh/tutorial002_py39.py b/docs_src/tutorial/automatic_id_none_refresh/tutorial002_py39.py deleted file mode 100644 index c597506a62..0000000000 --- a/docs_src/tutorial/automatic_id_none_refresh/tutorial002_py39.py +++ /dev/null @@ -1,82 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") # (1)! - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") # (2)! - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) # (3)! - - print("Before interacting with the database") # (4)! - print("Hero 1:", hero_1) # (5)! - print("Hero 2:", hero_2) # (6)! - print("Hero 3:", hero_3) # (7)! - - with Session(engine) as session: # (8)! - session.add(hero_1) # (9)! - session.add(hero_2) # (10)! - session.add(hero_3) # (11)! - - print("After adding to the session") # (12)! - print("Hero 1:", hero_1) # (13)! - print("Hero 2:", hero_2) # (14)! - print("Hero 3:", hero_3) # (15)! - - session.commit() # (16)! - - print("After committing the session") # (17)! - print("Hero 1:", hero_1) # (18)! - print("Hero 2:", hero_2) # (19)! - print("Hero 3:", hero_3) # (20)! - - print("After committing the session, show IDs") # (21)! - print("Hero 1 ID:", hero_1.id) # (22)! - print("Hero 2 ID:", hero_2.id) # (23)! - print("Hero 3 ID:", hero_3.id) # (24)! - - print("After committing the session, show names") # (25)! - print("Hero 1 name:", hero_1.name) # (26)! - print("Hero 2 name:", hero_2.name) # (27)! - print("Hero 3 name:", hero_3.name) # (28)! - - session.refresh(hero_1) # (29)! - session.refresh(hero_2) # (30)! - session.refresh(hero_3) # (31)! - - print("After refreshing the heroes") # (32)! - print("Hero 1:", hero_1) # (33)! - print("Hero 2:", hero_2) # (34)! - print("Hero 3:", hero_3) # (35)! - # (36)! - - print("After the session closes") # (37)! - print("Hero 1:", hero_1) # (38)! - print("Hero 2:", hero_2) # (39)! - print("Hero 3:", hero_3) # (40)! - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/code_structure/tutorial001_py39/__init__.py b/docs_src/tutorial/code_structure/tutorial001_py39/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs_src/tutorial/code_structure/tutorial001_py39/app.py b/docs_src/tutorial/code_structure/tutorial001_py39/app.py deleted file mode 100644 index 3d1bfc69a0..0000000000 --- a/docs_src/tutorial/code_structure/tutorial001_py39/app.py +++ /dev/null @@ -1,29 +0,0 @@ -from sqlmodel import Session - -from .database import create_db_and_tables, engine -from .models import Hero, Team - - -def create_heroes(): - with Session(engine) as session: - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - session.add(hero_deadpond) - session.commit() - - session.refresh(hero_deadpond) - - print("Created hero:", hero_deadpond) - print("Hero's team:", hero_deadpond.team) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/code_structure/tutorial001_py39/database.py b/docs_src/tutorial/code_structure/tutorial001_py39/database.py deleted file mode 100644 index d6de16c11f..0000000000 --- a/docs_src/tutorial/code_structure/tutorial001_py39/database.py +++ /dev/null @@ -1,10 +0,0 @@ -from sqlmodel import SQLModel, create_engine - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) diff --git a/docs_src/tutorial/code_structure/tutorial001_py39/models.py b/docs_src/tutorial/code_structure/tutorial001_py39/models.py deleted file mode 100644 index ff6b6c2d66..0000000000 --- a/docs_src/tutorial/code_structure/tutorial001_py39/models.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, SQLModel - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") diff --git a/docs_src/tutorial/code_structure/tutorial002_py39/__init__.py b/docs_src/tutorial/code_structure/tutorial002_py39/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs_src/tutorial/code_structure/tutorial002_py39/app.py b/docs_src/tutorial/code_structure/tutorial002_py39/app.py deleted file mode 100644 index 2ecaec0c3c..0000000000 --- a/docs_src/tutorial/code_structure/tutorial002_py39/app.py +++ /dev/null @@ -1,30 +0,0 @@ -from sqlmodel import Session - -from .database import create_db_and_tables, engine -from .hero_model import Hero -from .team_model import Team - - -def create_heroes(): - with Session(engine) as session: - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - session.add(hero_deadpond) - session.commit() - - session.refresh(hero_deadpond) - - print("Created hero:", hero_deadpond) - print("Hero's team:", hero_deadpond.team) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/code_structure/tutorial002_py39/database.py b/docs_src/tutorial/code_structure/tutorial002_py39/database.py deleted file mode 100644 index d6de16c11f..0000000000 --- a/docs_src/tutorial/code_structure/tutorial002_py39/database.py +++ /dev/null @@ -1,10 +0,0 @@ -from sqlmodel import SQLModel, create_engine - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) diff --git a/docs_src/tutorial/code_structure/tutorial002_py39/hero_model.py b/docs_src/tutorial/code_structure/tutorial002_py39/hero_model.py deleted file mode 100644 index 06dd9c6dfd..0000000000 --- a/docs_src/tutorial/code_structure/tutorial002_py39/hero_model.py +++ /dev/null @@ -1,16 +0,0 @@ -from typing import TYPE_CHECKING, Optional - -from sqlmodel import Field, Relationship, SQLModel - -if TYPE_CHECKING: - from .team_model import Team - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional["Team"] = Relationship(back_populates="heroes") diff --git a/docs_src/tutorial/code_structure/tutorial002_py39/team_model.py b/docs_src/tutorial/code_structure/tutorial002_py39/team_model.py deleted file mode 100644 index b51c070cf1..0000000000 --- a/docs_src/tutorial/code_structure/tutorial002_py39/team_model.py +++ /dev/null @@ -1,14 +0,0 @@ -from typing import TYPE_CHECKING, Optional - -from sqlmodel import Field, Relationship, SQLModel - -if TYPE_CHECKING: - from .hero_model import Hero - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") diff --git a/docs_src/tutorial/connect/create_tables/tutorial001_py39.py b/docs_src/tutorial/connect/create_tables/tutorial001_py39.py deleted file mode 100644 index ef24ec77d0..0000000000 --- a/docs_src/tutorial/connect/create_tables/tutorial001_py39.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def main(): - create_db_and_tables() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/delete/tutorial001_py39.py b/docs_src/tutorial/connect/delete/tutorial001_py39.py deleted file mode 100644 index aa7d0db287..0000000000 --- a/docs_src/tutorial/connect/delete/tutorial001_py39.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team_id = team_preventers.id - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_spider_boy.team_id = None - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("No longer Preventer:", hero_spider_boy) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/insert/tutorial001_py39.py b/docs_src/tutorial/connect/insert/tutorial001_py39.py deleted file mode 100644 index d2e3b2f0e3..0000000000 --- a/docs_src/tutorial/connect/insert/tutorial001_py39.py +++ /dev/null @@ -1,69 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/select/tutorial001_py39.py b/docs_src/tutorial/connect/select/tutorial001_py39.py deleted file mode 100644 index d98e635779..0000000000 --- a/docs_src/tutorial/connect/select/tutorial001_py39.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero, Team).where(Hero.team_id == Team.id) - results = session.exec(statement) - for hero, team in results: - print("Hero:", hero, "Team:", team) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/select/tutorial002_py39.py b/docs_src/tutorial/connect/select/tutorial002_py39.py deleted file mode 100644 index 270f95003d..0000000000 --- a/docs_src/tutorial/connect/select/tutorial002_py39.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero, Team).join(Team) - results = session.exec(statement) - for hero, team in results: - print("Hero:", hero, "Team:", team) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/select/tutorial003_py39.py b/docs_src/tutorial/connect/select/tutorial003_py39.py deleted file mode 100644 index ee427e309c..0000000000 --- a/docs_src/tutorial/connect/select/tutorial003_py39.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero, Team).join(Team, isouter=True) - results = session.exec(statement) - for hero, team in results: - print("Hero:", hero, "Team:", team) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/select/tutorial004_py39.py b/docs_src/tutorial/connect/select/tutorial004_py39.py deleted file mode 100644 index 29a7c205bd..0000000000 --- a/docs_src/tutorial/connect/select/tutorial004_py39.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).join(Team).where(Team.name == "Preventers") - results = session.exec(statement) - for hero in results: - print("Preventer Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/select/tutorial005_py39.py b/docs_src/tutorial/connect/select/tutorial005_py39.py deleted file mode 100644 index 96a12ab537..0000000000 --- a/docs_src/tutorial/connect/select/tutorial005_py39.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero, Team).join(Team).where(Team.name == "Preventers") - results = session.exec(statement) - for hero, team in results: - print("Preventer Hero:", hero, "Team:", team) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/connect/update/tutorial001_py39.py b/docs_src/tutorial/connect/update/tutorial001_py39.py deleted file mode 100644 index b32599fc0c..0000000000 --- a/docs_src/tutorial/connect/update/tutorial001_py39.py +++ /dev/null @@ -1,75 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - session.add(team_preventers) - session.add(team_z_force) - session.commit() - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team_id=team_z_force.id - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - team_id=team_preventers.id, - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team_id = team_preventers.id - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/create_db_and_table/tutorial001_py39.py b/docs_src/tutorial/create_db_and_table/tutorial001_py39.py deleted file mode 100644 index cab7d9e700..0000000000 --- a/docs_src/tutorial/create_db_and_table/tutorial001_py39.py +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - -SQLModel.metadata.create_all(engine) diff --git a/docs_src/tutorial/create_db_and_table/tutorial002_py39.py b/docs_src/tutorial/create_db_and_table/tutorial002_py39.py deleted file mode 100644 index 3297aef598..0000000000 --- a/docs_src/tutorial/create_db_and_table/tutorial002_py39.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -if __name__ == "__main__": - create_db_and_tables() diff --git a/docs_src/tutorial/create_db_and_table/tutorial003_py39.py b/docs_src/tutorial/create_db_and_table/tutorial003_py39.py deleted file mode 100644 index 9406300400..0000000000 --- a/docs_src/tutorial/create_db_and_table/tutorial003_py39.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Optional # (1)! - -from sqlmodel import Field, SQLModel, create_engine # (2)! - - -class Hero(SQLModel, table=True): # (3)! - id: Optional[int] = Field(default=None, primary_key=True) # (4)! - name: str # (5)! - secret_name: str # (6)! - age: Optional[int] = None # (7)! - - -sqlite_file_name = "database.db" # (8)! -sqlite_url = f"sqlite:///{sqlite_file_name}" # (9)! - -engine = create_engine(sqlite_url, echo=True) # (10)! - - -def create_db_and_tables(): # (11)! - SQLModel.metadata.create_all(engine) # (12)! - - -if __name__ == "__main__": # (13)! - create_db_and_tables() # (14)! diff --git a/docs_src/tutorial/delete/tutorial001_py39.py b/docs_src/tutorial/delete/tutorial001_py39.py deleted file mode 100644 index 7c911df50e..0000000000 --- a/docs_src/tutorial/delete/tutorial001_py39.py +++ /dev/null @@ -1,100 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - results = session.exec(statement) - hero_1 = results.one() - print("Hero 1:", hero_1) - - statement = select(Hero).where(Hero.name == "Captain North America") - results = session.exec(statement) - hero_2 = results.one() - print("Hero 2:", hero_2) - - hero_1.age = 16 - hero_1.name = "Spider-Youngster" - session.add(hero_1) - - hero_2.name = "Captain North America Except Canada" - hero_2.age = 110 - session.add(hero_2) - - session.commit() - session.refresh(hero_1) - session.refresh(hero_2) - - print("Updated hero 1:", hero_1) - print("Updated hero 2:", hero_2) - - -def delete_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Youngster") - results = session.exec(statement) - hero = results.one() - print("Hero: ", hero) - - session.delete(hero) - session.commit() - - print("Deleted hero:", hero) - - statement = select(Hero).where(Hero.name == "Spider-Youngster") - results = session.exec(statement) - hero = results.first() - - if hero is None: - print("There's no hero named Spider-Youngster") - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - delete_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/delete/tutorial002_py39.py b/docs_src/tutorial/delete/tutorial002_py39.py deleted file mode 100644 index 4d8c368d3c..0000000000 --- a/docs_src/tutorial/delete/tutorial002_py39.py +++ /dev/null @@ -1,101 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - results = session.exec(statement) - hero_1 = results.one() - print("Hero 1:", hero_1) - - statement = select(Hero).where(Hero.name == "Captain North America") - results = session.exec(statement) - hero_2 = results.one() - print("Hero 2:", hero_2) - - hero_1.age = 16 - hero_1.name = "Spider-Youngster" - session.add(hero_1) - - hero_2.name = "Captain North America Except Canada" - hero_2.age = 110 - session.add(hero_2) - - session.commit() - session.refresh(hero_1) - session.refresh(hero_2) - - print("Updated hero 1:", hero_1) - print("Updated hero 2:", hero_2) - - -def delete_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Youngster") # (1)! - results = session.exec(statement) # (2)! - hero = results.one() # (3)! - print("Hero: ", hero) # (4)! - - session.delete(hero) # (5)! - session.commit() # (6)! - - print("Deleted hero:", hero) # (7)! - - statement = select(Hero).where(Hero.name == "Spider-Youngster") # (8)! - results = session.exec(statement) # (9)! - hero = results.first() # (10)! - - if hero is None: # (11)! - print("There's no hero named Spider-Youngster") # (12)! - # (13)! - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - delete_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/__init__.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_001.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_001.md deleted file mode 100644 index 936b84b92d..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_001.md +++ /dev/null @@ -1,17 +0,0 @@ -1. Import the `app` from the the `main` module. - -2. We create a `TestClient` for the FastAPI `app` and put it in the variable `client`. - -3. Then we use use this `client` to **talk to the API** and send a `POST` HTTP operation, creating a new hero. - -4. Then we get the **JSON data** from the response and put it in the variable `data`. - -5. Next we start testing the results with `assert` statements, we check that the status code of the response is `200`. - -6. We check that the `name` of the hero created is `"Deadpond"`. - -7. We check that the `secret_name` of the hero created is `"Dive Wilson"`. - -8. We check that the `age` of the hero created is `None`, because we didn't send an age. - -9. We check that the hero created has an `id` created by the database, so it's not `None`. diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_002.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_002.md deleted file mode 100644 index 0f8555a8dd..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_002.md +++ /dev/null @@ -1,25 +0,0 @@ -1. Import the `get_session` dependency from the the `main` module. - -2. Define the new function that will be the new **dependency override**. - -3. This function will return a different **session** than the one that would be returned by the original `get_session` function. - - We haven't seen how this new **session** object is created yet, but the point is that this is a different session than the original one from the app. - - This session is attached to a different **engine**, and that different **engine** uses a different URL, for a database just for testing. - - We haven't defined that new **URL** nor the new **engine** yet, but here we already see the that this object `session` will override the one returned by the original dependency `get_session()`. - -4. Then, the FastAPI `app` object has an attribute `app.dependency_overrides`. - - This attribute is a dictionary, and we can put dependency overrides in it by passing, as the **key**, the **original dependency function**, and as the **value**, the **new overriding dependency function**. - - So, here we are telling the FastAPI app to use `get_session_override` instead of `get_session` in all the places in the code that depend on `get_session`, that is, all the parameters with something like: - - ```Python - session: Session = Depends(get_session) - ``` - -5. After we are done with the dependency override, we can restore the application back to normal, by removing all the values in this dictionary `app.dependency_overrides`. - - This way whenever a *path operation function* needs the dependency FastAPI will use the original one instead of the override. diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_003.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_003.md deleted file mode 100644 index 2b48ebdacf..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_003.md +++ /dev/null @@ -1,37 +0,0 @@ -1. Here's a subtle thing to notice. - - Remember that [Order Matters](../create-db-and-table.md#sqlmodel-metadata-order-matters){.internal-link target=_blank} and we need to make sure all the **SQLModel** models are already defined and **imported** before calling `.create_all()`. - - IN this line, by importing something, *anything*, from `.main`, the code in `.main` will be executed, including the definition of the **table models**, and that will automatically register them in `SQLModel.metadata`. - -2. Here we create a new **engine**, completely different from the one in `main.py`. - - This is the engine we will use for the tests. - - We use the new URL of the database for tests: - - ``` - sqlite:///testing.db - ``` - - And again, we use the connection argument `check_same_thread=False`. - -3. Then we call: - - ```Python - SQLModel.metadata.create_all(engine) - ``` - - ...to make sure we create all the tables in the new testing database. - - The **table models** are registered in `SQLModel.metadata` just because we imported *something* from `.main`, and the code in `.main` was executed, creating the classes for the **table models** and automatically registering them in `SQLModel.metadata`. - - So, by the point we call this method, the **table models** are already registered there. 💯 - -4. Here's where we create the custom **session** object for this test in a `with` block. - - It uses the new custom **engine** we created, so anything that uses this session will be using the testing database. - -5. Now, back to the dependency override, it is just returning the same **session** object from outside, that's it, that's the whole trick. - -6. By this point, the testing **session** `with` block finishes, and the session is closed, the file is closed, etc. diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_004.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_004.md deleted file mode 100644 index de754c5e76..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_004.md +++ /dev/null @@ -1,29 +0,0 @@ -1. Import `StaticPool` from `sqlmodel`, we will use it in a bit. - -2. For the **SQLite URL**, don't write any file name, leave it empty. - - So, instead of: - - ``` - sqlite:///testing.db - ``` - - ...just write: - - ``` - sqlite:// - ``` - - This is enough to tell **SQLModel** (actually SQLAlchemy) that we want to use an **in-memory SQLite database**. - -3. Remember that we told the **low-level** library in charge of communicating with SQLite that we want to be able to **access the database from different threads** with `check_same_thread=False`? - - Now that we use an **in-memory database**, we need to also tell SQLAlchemy that we want to be able to use the **same in-memory database** object from different threads. - - We tell it that with the `poolclass=StaticPool` parameter. - - /// info - - You can read more details in the SQLAlchemy documentation about Using a Memory Database in Multiple Threads - - /// diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_005.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_005.md deleted file mode 100644 index 126e1f1790..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_005.md +++ /dev/null @@ -1,41 +0,0 @@ -1. Import `pytest`. - -2. Use the `@pytest.fixture()` decorator on top of the function to tell pytest that this is a **fixture** function (equivalent to a FastAPI dependency). - - We also give it a name of `"session"`, this will be important in the testing function. - -3. Create the fixture function. This is equivalent to a FastAPI dependency function. - - In this fixture we create the custom **engine**, with the in-memory database, we create the tables, and we create the **session**. - - Then we `yield` the `session` object. - -4. The thing that we `return` or `yield` is what will be available to the test function, in this case, the `session` object. - - Here we use `yield` so that **pytest** comes back to execute "the rest of the code" in this function once the testing function is done. - - We don't have any more visible "rest of the code" after the `yield`, but we have the end of the `with` block that will close the **session**. - - By using `yield`, pytest will: - - * run the first part - * create the **session** object - * give it to the test function - * run the test function - * once the test function is done, it will continue here, right after the `yield`, and will correctly close the **session** object in the end of the `with` block. - -5. Now, in the test function, to tell **pytest** that this test wants to get the fixture, instead of declaring something like in FastAPI with: - - ```Python - session: Session = Depends(session_fixture) - ``` - - ...the way we tell pytest what is the fixture that we want is by using the **exact same name** of the fixture. - - In this case, we named it `session`, so the parameter has to be exactly named `session` for it to work. - - We also add the type annotation `session: Session` so that we can get autocompletion and inline error checks in our editor. - -6. Now in the dependency override function, we just return the same `session` object that came from outside it. - - The `session` object comes from the parameter passed to the test function, and we just re-use it and return it here in the dependency override. diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_006.md b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_006.md deleted file mode 100644 index d44a3b67da..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/annotations/en/test_main_006.md +++ /dev/null @@ -1,23 +0,0 @@ -1. Create the new fixture named `"client"`. - -2. This **client fixture**, in turn, also requires the **session fixture**. - -3. Now we create the **dependency override** inside the client fixture. - -4. Set the **dependency override** in the `app.dependency_overrides` dictionary. - -5. Create the `TestClient` with the **FastAPI** `app`. - -6. `yield` the `TestClient` instance. - - By using `yield`, after the test function is done, pytest will come back to execute the rest of the code after `yield`. - -7. This is the cleanup code, after `yield`, and after the test function is done. - - Here we clear the dependency overrides (here it's only one) in the FastAPI `app`. - -8. Now the test function requires the **client fixture**. - - And inside the test function, the code is quite **simple**, we just use the `TestClient` to make requests to the API, check the data, and that's it. - - The fixtures take care of all the **setup** and **cleanup** code. diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/main.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/main.py deleted file mode 100644 index e7371d84e3..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/main.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Optional - -from fastapi import Depends, FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def get_session(): - with Session(engine) as session: - yield session - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(*, session: Session = Depends(get_session), hero: HeroCreate): - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero( - *, session: Session = Depends(get_session), hero_id: int, hero: HeroUpdate -): - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.delete("/heroes/{hero_id}") -def delete_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - session.delete(hero) - session.commit() - return {"ok": True} diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_extra_coverage.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_extra_coverage.py deleted file mode 100644 index 1d8153ab9f..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_extra_coverage.py +++ /dev/null @@ -1,38 +0,0 @@ -from fastapi.testclient import TestClient -from sqlalchemy import Inspector, inspect -from sqlmodel import Session, create_engine - -from . import main as app_mod -from .test_main import client_fixture, session_fixture - -assert client_fixture, "This keeps the client fixture used below" -assert session_fixture, "This keeps the session fixture used by client_fixture" - - -def test_startup(): - app_mod.engine = create_engine("sqlite://") - app_mod.on_startup() - insp: Inspector = inspect(app_mod.engine) - assert insp.has_table(str(app_mod.Hero.__tablename__)) - - -def test_get_session(): - app_mod.engine = create_engine("sqlite://") - for session in app_mod.get_session(): - assert isinstance(session, Session) - assert session.bind == app_mod.engine - - -def test_read_hero_not_found(client: TestClient): - response = client.get("/heroes/9000") - assert response.status_code == 404 - - -def test_update_hero_not_found(client: TestClient): - response = client.patch("/heroes/9000", json={"name": "Very-Rusty-Man"}) - assert response.status_code == 404 - - -def test_delete_hero_not_found(client: TestClient): - response = client.delete("/heroes/9000") - assert response.status_code == 404 diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main.py deleted file mode 100644 index 435787c79b..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main.py +++ /dev/null @@ -1,125 +0,0 @@ -import pytest -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine -from sqlmodel.pool import StaticPool - -from .main import Hero, app, get_session - - -@pytest.fixture(name="session") -def session_fixture(): - engine = create_engine( - "sqlite://", connect_args={"check_same_thread": False}, poolclass=StaticPool - ) - SQLModel.metadata.create_all(engine) - with Session(engine) as session: - yield session - - -@pytest.fixture(name="client") -def client_fixture(session: Session): - def get_session_override(): - return session - - app.dependency_overrides[get_session] = get_session_override - client = TestClient(app) - yield client - app.dependency_overrides.clear() - - -def test_create_hero(client: TestClient): - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None - - -def test_create_hero_incomplete(client: TestClient): - # No secret_name - response = client.post("/heroes/", json={"name": "Deadpond"}) - assert response.status_code == 422 - - -def test_create_hero_invalid(client: TestClient): - # secret_name has an invalid type - response = client.post( - "/heroes/", - json={ - "name": "Deadpond", - "secret_name": {"message": "Do you wanna know my secret identity?"}, - }, - ) - assert response.status_code == 422 - - -def test_read_heroes(session: Session, client: TestClient): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - session.add(hero_1) - session.add(hero_2) - session.commit() - - response = client.get("/heroes/") - data = response.json() - - assert response.status_code == 200 - - assert len(data) == 2 - assert data[0]["name"] == hero_1.name - assert data[0]["secret_name"] == hero_1.secret_name - assert data[0]["age"] == hero_1.age - assert data[0]["id"] == hero_1.id - assert data[1]["name"] == hero_2.name - assert data[1]["secret_name"] == hero_2.secret_name - assert data[1]["age"] == hero_2.age - assert data[1]["id"] == hero_2.id - - -def test_read_hero(session: Session, client: TestClient): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - session.add(hero_1) - session.commit() - - response = client.get(f"/heroes/{hero_1.id}") - data = response.json() - - assert response.status_code == 200 - assert data["name"] == hero_1.name - assert data["secret_name"] == hero_1.secret_name - assert data["age"] == hero_1.age - assert data["id"] == hero_1.id - - -def test_update_hero(session: Session, client: TestClient): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - session.add(hero_1) - session.commit() - - response = client.patch(f"/heroes/{hero_1.id}", json={"name": "Deadpuddle"}) - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpuddle" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] == hero_1.id - - -def test_delete_hero(session: Session, client: TestClient): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - session.add(hero_1) - session.commit() - - response = client.delete(f"/heroes/{hero_1.id}") - - hero_in_db = session.get(Hero, hero_1.id) - - assert response.status_code == 200 - - assert hero_in_db is None diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_001.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_001.py deleted file mode 100644 index 3ae40773f9..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_001.py +++ /dev/null @@ -1,32 +0,0 @@ -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine - -from .main import app, get_session # (1)! - - -def test_create_hero(): - engine = create_engine( - "sqlite:///testing.db", connect_args={"check_same_thread": False} - ) - SQLModel.metadata.create_all(engine) - - with Session(engine) as session: - - def get_session_override(): - return session - - app.dependency_overrides[get_session] = get_session_override - - client = TestClient(app) # (2)! - - response = client.post( # (3)! - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - app.dependency_overrides.clear() - data = response.json() # (4)! - - assert response.status_code == 200 # (5)! - assert data["name"] == "Deadpond" # (6)! - assert data["secret_name"] == "Dive Wilson" # (7)! - assert data["age"] is None # (8)! - assert data["id"] is not None # (9)! diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_002.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_002.py deleted file mode 100644 index 727580b68f..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_002.py +++ /dev/null @@ -1,32 +0,0 @@ -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine - -from .main import app, get_session # (1)! - - -def test_create_hero(): - engine = create_engine( - "sqlite:///testing.db", connect_args={"check_same_thread": False} - ) - SQLModel.metadata.create_all(engine) - - with Session(engine) as session: - - def get_session_override(): # (2)! - return session # (3)! - - app.dependency_overrides[get_session] = get_session_override # (4)! - - client = TestClient(app) - - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - app.dependency_overrides.clear() # (5)! - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_003.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_003.py deleted file mode 100644 index 465c525108..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_003.py +++ /dev/null @@ -1,33 +0,0 @@ -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine - -from .main import app, get_session # (1)! - - -def test_create_hero(): - engine = create_engine( # (2)! - "sqlite:///testing.db", connect_args={"check_same_thread": False} - ) - SQLModel.metadata.create_all(engine) # (3)! - - with Session(engine) as session: # (4)! - - def get_session_override(): - return session # (5)! - - app.dependency_overrides[get_session] = get_session_override # (4)! - - client = TestClient(app) - - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - app.dependency_overrides.clear() - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None - # (6)! diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_004.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_004.py deleted file mode 100644 index b770a9aa59..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_004.py +++ /dev/null @@ -1,35 +0,0 @@ -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine -from sqlmodel.pool import StaticPool # (1)! - -from .main import app, get_session - - -def test_create_hero(): - engine = create_engine( - "sqlite://", # (2)! - connect_args={"check_same_thread": False}, - poolclass=StaticPool, # (3)! - ) - SQLModel.metadata.create_all(engine) - - with Session(engine) as session: - - def get_session_override(): - return session - - app.dependency_overrides[get_session] = get_session_override - - client = TestClient(app) - - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - app.dependency_overrides.clear() - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_005.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_005.py deleted file mode 100644 index f653eef7ec..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_005.py +++ /dev/null @@ -1,37 +0,0 @@ -import pytest # (1)! -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine -from sqlmodel.pool import StaticPool - -from .main import app, get_session - - -@pytest.fixture(name="session") # (2)! -def session_fixture(): # (3)! - engine = create_engine( - "sqlite://", connect_args={"check_same_thread": False}, poolclass=StaticPool - ) - SQLModel.metadata.create_all(engine) - with Session(engine) as session: - yield session # (4)! - - -def test_create_hero(session: Session): # (5)! - def get_session_override(): - return session # (6)! - - app.dependency_overrides[get_session] = get_session_override - - client = TestClient(app) - - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - app.dependency_overrides.clear() - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None diff --git a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_006.py b/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_006.py deleted file mode 100644 index 8dbfd45caf..0000000000 --- a/docs_src/tutorial/fastapi/app_testing/tutorial001_py39/test_main_006.py +++ /dev/null @@ -1,41 +0,0 @@ -import pytest -from fastapi.testclient import TestClient -from sqlmodel import Session, SQLModel, create_engine -from sqlmodel.pool import StaticPool - -from .main import app, get_session - - -@pytest.fixture(name="session") -def session_fixture(): - engine = create_engine( - "sqlite://", connect_args={"check_same_thread": False}, poolclass=StaticPool - ) - SQLModel.metadata.create_all(engine) - with Session(engine) as session: - yield session - - -@pytest.fixture(name="client") # (1)! -def client_fixture(session: Session): # (2)! - def get_session_override(): # (3)! - return session - - app.dependency_overrides[get_session] = get_session_override # (4)! - - client = TestClient(app) # (5)! - yield client # (6)! - app.dependency_overrides.clear() # (7)! - - -def test_create_hero(client: TestClient): # (8)! - response = client.post( - "/heroes/", json={"name": "Deadpond", "secret_name": "Dive Wilson"} - ) - data = response.json() - - assert response.status_code == 200 - assert data["name"] == "Deadpond" - assert data["secret_name"] == "Dive Wilson" - assert data["age"] is None - assert data["id"] is not None diff --git a/docs_src/tutorial/fastapi/delete/tutorial001_py39.py b/docs_src/tutorial/fastapi/delete/tutorial001_py39.py deleted file mode 100644 index 5d5f099abb..0000000000 --- a/docs_src/tutorial/fastapi/delete/tutorial001_py39.py +++ /dev/null @@ -1,98 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(offset: int = 0, limit: int = Query(default=100, le=100)): - with Session(engine) as session: - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero(hero_id: int, hero: HeroUpdate): - with Session(engine) as session: - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.delete("/heroes/{hero_id}") -def delete_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - session.delete(hero) - session.commit() - return {"ok": True} diff --git a/docs_src/tutorial/fastapi/limit_and_offset/tutorial001_py39.py b/docs_src/tutorial/fastapi/limit_and_offset/tutorial001_py39.py deleted file mode 100644 index 3d223f3290..0000000000 --- a/docs_src/tutorial/fastapi/limit_and_offset/tutorial001_py39.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(offset: int = 0, limit: int = Query(default=100, le=100)): - with Session(engine) as session: - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero diff --git a/docs_src/tutorial/fastapi/multiple_models/tutorial001_py39.py b/docs_src/tutorial/fastapi/multiple_models/tutorial001_py39.py deleted file mode 100644 index c6be23d441..0000000000 --- a/docs_src/tutorial/fastapi/multiple_models/tutorial001_py39.py +++ /dev/null @@ -1,60 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class HeroCreate(SQLModel): - name: str - secret_name: str - age: Optional[int] = None - - -class HeroPublic(SQLModel): - id: int - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - return heroes diff --git a/docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py b/docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py deleted file mode 100644 index 77093bcc7c..0000000000 --- a/docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - return heroes diff --git a/docs_src/tutorial/fastapi/read_one/tutorial001_py39.py b/docs_src/tutorial/fastapi/read_one/tutorial001_py39.py deleted file mode 100644 index 9ac0a65088..0000000000 --- a/docs_src/tutorial/fastapi/read_one/tutorial001_py39.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI, HTTPException -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero diff --git a/docs_src/tutorial/fastapi/relationships/tutorial001_py39.py b/docs_src/tutorial/fastapi/relationships/tutorial001_py39.py deleted file mode 100644 index 1cfa298b8b..0000000000 --- a/docs_src/tutorial/fastapi/relationships/tutorial001_py39.py +++ /dev/null @@ -1,199 +0,0 @@ -from typing import Optional - -from fastapi import Depends, FastAPI, HTTPException, Query -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class TeamBase(SQLModel): - name: str = Field(index=True) - headquarters: str - - -class Team(TeamBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class TeamCreate(TeamBase): - pass - - -class TeamPublic(TeamBase): - id: int - - -class TeamUpdate(SQLModel): - id: Optional[int] = None - name: Optional[str] = None - headquarters: Optional[str] = None - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - team: Optional[Team] = Relationship(back_populates="heroes") - - -class HeroPublic(HeroBase): - id: int - - -class HeroCreate(HeroBase): - pass - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - team_id: Optional[int] = None - - -class HeroPublicWithTeam(HeroPublic): - team: Optional[TeamPublic] = None - - -class TeamPublicWithHeroes(TeamPublic): - heroes: list[HeroPublic] = [] - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def get_session(): - with Session(engine) as session: - yield session - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(*, session: Session = Depends(get_session), hero: HeroCreate): - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublicWithTeam) -def read_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero( - *, session: Session = Depends(get_session), hero_id: int, hero: HeroUpdate -): - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.delete("/heroes/{hero_id}") -def delete_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - session.delete(hero) - session.commit() - return {"ok": True} - - -@app.post("/teams/", response_model=TeamPublic) -def create_team(*, session: Session = Depends(get_session), team: TeamCreate): - db_team = Team.model_validate(team) - session.add(db_team) - session.commit() - session.refresh(db_team) - return db_team - - -@app.get("/teams/", response_model=list[TeamPublic]) -def read_teams( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - teams = session.exec(select(Team).offset(offset).limit(limit)).all() - return teams - - -@app.get("/teams/{team_id}", response_model=TeamPublicWithHeroes) -def read_team(*, team_id: int, session: Session = Depends(get_session)): - team = session.get(Team, team_id) - if not team: - raise HTTPException(status_code=404, detail="Team not found") - return team - - -@app.patch("/teams/{team_id}", response_model=TeamPublic) -def update_team( - *, - session: Session = Depends(get_session), - team_id: int, - team: TeamUpdate, -): - db_team = session.get(Team, team_id) - if not db_team: - raise HTTPException(status_code=404, detail="Team not found") - team_data = team.model_dump(exclude_unset=True) - db_team.sqlmodel_update(team_data) - session.add(db_team) - session.commit() - session.refresh(db_team) - return db_team - - -@app.delete("/teams/{team_id}") -def delete_team(*, session: Session = Depends(get_session), team_id: int): - team = session.get(Team, team_id) - if not team: - raise HTTPException(status_code=404, detail="Team not found") - session.delete(team) - session.commit() - return {"ok": True} diff --git a/docs_src/tutorial/fastapi/response_model/tutorial001_py39.py b/docs_src/tutorial/fastapi/response_model/tutorial001_py39.py deleted file mode 100644 index 53b701deb1..0000000000 --- a/docs_src/tutorial/fastapi/response_model/tutorial001_py39.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=Hero) -def create_hero(hero: Hero): - with Session(engine) as session: - session.add(hero) - session.commit() - session.refresh(hero) - return hero - - -@app.get("/heroes/", response_model=list[Hero]) -def read_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - return heroes diff --git a/docs_src/tutorial/fastapi/session_with_dependency/tutorial001_py39.py b/docs_src/tutorial/fastapi/session_with_dependency/tutorial001_py39.py deleted file mode 100644 index e7371d84e3..0000000000 --- a/docs_src/tutorial/fastapi/session_with_dependency/tutorial001_py39.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Optional - -from fastapi import Depends, FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def get_session(): - with Session(engine) as session: - yield session - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(*, session: Session = Depends(get_session), hero: HeroCreate): - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero( - *, session: Session = Depends(get_session), hero_id: int, hero: HeroUpdate -): - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.delete("/heroes/{hero_id}") -def delete_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - session.delete(hero) - session.commit() - return {"ok": True} diff --git a/docs_src/tutorial/fastapi/simple_hero_api/tutorial001_py39.py b/docs_src/tutorial/fastapi/simple_hero_api/tutorial001_py39.py deleted file mode 100644 index 41eaa621d3..0000000000 --- a/docs_src/tutorial/fastapi/simple_hero_api/tutorial001_py39.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/") -def create_hero(hero: Hero): - with Session(engine) as session: - session.add(hero) - session.commit() - session.refresh(hero) - return hero - - -@app.get("/heroes/") -def read_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - return heroes diff --git a/docs_src/tutorial/fastapi/teams/tutorial001_py39.py b/docs_src/tutorial/fastapi/teams/tutorial001_py39.py deleted file mode 100644 index 928ec70976..0000000000 --- a/docs_src/tutorial/fastapi/teams/tutorial001_py39.py +++ /dev/null @@ -1,190 +0,0 @@ -from typing import Optional - -from fastapi import Depends, FastAPI, HTTPException, Query -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class TeamBase(SQLModel): - name: str = Field(index=True) - headquarters: str - - -class Team(TeamBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class TeamCreate(TeamBase): - pass - - -class TeamPublic(TeamBase): - id: int - - -class TeamUpdate(SQLModel): - name: Optional[str] = None - headquarters: Optional[str] = None - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - team: Optional[Team] = Relationship(back_populates="heroes") - - -class HeroPublic(HeroBase): - id: int - - -class HeroCreate(HeroBase): - pass - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - team_id: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def get_session(): - with Session(engine) as session: - yield session - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(*, session: Session = Depends(get_session), hero: HeroCreate): - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero( - *, session: Session = Depends(get_session), hero_id: int, hero: HeroUpdate -): - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.delete("/heroes/{hero_id}") -def delete_hero(*, session: Session = Depends(get_session), hero_id: int): - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - session.delete(hero) - session.commit() - return {"ok": True} - - -@app.post("/teams/", response_model=TeamPublic) -def create_team(*, session: Session = Depends(get_session), team: TeamCreate): - db_team = Team.model_validate(team) - session.add(db_team) - session.commit() - session.refresh(db_team) - return db_team - - -@app.get("/teams/", response_model=list[TeamPublic]) -def read_teams( - *, - session: Session = Depends(get_session), - offset: int = 0, - limit: int = Query(default=100, le=100), -): - teams = session.exec(select(Team).offset(offset).limit(limit)).all() - return teams - - -@app.get("/teams/{team_id}", response_model=TeamPublic) -def read_team(*, team_id: int, session: Session = Depends(get_session)): - team = session.get(Team, team_id) - if not team: - raise HTTPException(status_code=404, detail="Team not found") - return team - - -@app.patch("/teams/{team_id}", response_model=TeamPublic) -def update_team( - *, - session: Session = Depends(get_session), - team_id: int, - team: TeamUpdate, -): - db_team = session.get(Team, team_id) - if not db_team: - raise HTTPException(status_code=404, detail="Team not found") - team_data = team.model_dump(exclude_unset=True) - db_team.sqlmodel_update(team_data) - session.add(db_team) - session.commit() - session.refresh(db_team) - return db_team - - -@app.delete("/teams/{team_id}") -def delete_team(*, session: Session = Depends(get_session), team_id: int): - team = session.get(Team, team_id) - if not team: - raise HTTPException(status_code=404, detail="Team not found") - session.delete(team) - session.commit() - return {"ok": True} diff --git a/docs_src/tutorial/fastapi/update/tutorial001_py39.py b/docs_src/tutorial/fastapi/update/tutorial001_py39.py deleted file mode 100644 index b6d62bf81c..0000000000 --- a/docs_src/tutorial/fastapi/update/tutorial001_py39.py +++ /dev/null @@ -1,87 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - - -class HeroCreate(HeroBase): - pass - - -class HeroPublic(HeroBase): - id: int - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - with Session(engine) as session: - db_hero = Hero.model_validate(hero) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(offset: int = 0, limit: int = Query(default=100, le=100)): - with Session(engine) as session: - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero(hero_id: int, hero: HeroUpdate): - with Session(engine) as session: - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - db_hero.sqlmodel_update(hero_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero diff --git a/docs_src/tutorial/fastapi/update/tutorial002_py39.py b/docs_src/tutorial/fastapi/update/tutorial002_py39.py deleted file mode 100644 index 14ad1b4826..0000000000 --- a/docs_src/tutorial/fastapi/update/tutorial002_py39.py +++ /dev/null @@ -1,101 +0,0 @@ -from typing import Optional - -from fastapi import FastAPI, HTTPException, Query -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class HeroBase(SQLModel): - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -class Hero(HeroBase, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - hashed_password: str = Field() - - -class HeroCreate(HeroBase): - password: str - - -class HeroPublic(HeroBase): - id: int - - -class HeroUpdate(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None - password: Optional[str] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -connect_args = {"check_same_thread": False} -engine = create_engine(sqlite_url, echo=True, connect_args=connect_args) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def hash_password(password: str) -> str: - # Use something like passlib here - return f"not really hashed {password} hehehe" - - -app = FastAPI() - - -@app.on_event("startup") -def on_startup(): - create_db_and_tables() - - -@app.post("/heroes/", response_model=HeroPublic) -def create_hero(hero: HeroCreate): - hashed_password = hash_password(hero.password) - with Session(engine) as session: - extra_data = {"hashed_password": hashed_password} - db_hero = Hero.model_validate(hero, update=extra_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero - - -@app.get("/heroes/", response_model=list[HeroPublic]) -def read_heroes(offset: int = 0, limit: int = Query(default=100, le=100)): - with Session(engine) as session: - heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() - return heroes - - -@app.get("/heroes/{hero_id}", response_model=HeroPublic) -def read_hero(hero_id: int): - with Session(engine) as session: - hero = session.get(Hero, hero_id) - if not hero: - raise HTTPException(status_code=404, detail="Hero not found") - return hero - - -@app.patch("/heroes/{hero_id}", response_model=HeroPublic) -def update_hero(hero_id: int, hero: HeroUpdate): - with Session(engine) as session: - db_hero = session.get(Hero, hero_id) - if not db_hero: - raise HTTPException(status_code=404, detail="Hero not found") - hero_data = hero.model_dump(exclude_unset=True) - extra_data = {} - if "password" in hero_data: - password = hero_data["password"] - hashed_password = hash_password(password) - extra_data["hashed_password"] = hashed_password - db_hero.sqlmodel_update(hero_data, update=extra_data) - session.add(db_hero) - session.commit() - session.refresh(db_hero) - return db_hero diff --git a/docs_src/tutorial/indexes/tutorial001_py39.py b/docs_src/tutorial/indexes/tutorial001_py39.py deleted file mode 100644 index 539220c9b7..0000000000 --- a/docs_src/tutorial/indexes/tutorial001_py39.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Deadpond") - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/indexes/tutorial002_py39.py b/docs_src/tutorial/indexes/tutorial002_py39.py deleted file mode 100644 index ebc8d64f65..0000000000 --- a/docs_src/tutorial/indexes/tutorial002_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age <= 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/insert/tutorial001_py39.py b/docs_src/tutorial/insert/tutorial001_py39.py deleted file mode 100644 index 17050e908c..0000000000 --- a/docs_src/tutorial/insert/tutorial001_py39.py +++ /dev/null @@ -1,45 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - session = Session(engine) - - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - session.close() - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/insert/tutorial002_py39.py b/docs_src/tutorial/insert/tutorial002_py39.py deleted file mode 100644 index 3ff10c8909..0000000000 --- a/docs_src/tutorial/insert/tutorial002_py39.py +++ /dev/null @@ -1,42 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/insert/tutorial003_py39.py b/docs_src/tutorial/insert/tutorial003_py39.py deleted file mode 100644 index 03f51d2359..0000000000 --- a/docs_src/tutorial/insert/tutorial003_py39.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): # (1)! - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") # (2)! - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: # (3)! - session.add(hero_1) # (4)! - session.add(hero_2) - session.add(hero_3) - - session.commit() # (5)! - # (6)! - - -def main(): # (7)! - create_db_and_tables() # (8)! - create_heroes() # (9)! - - -if __name__ == "__main__": # (10)! - main() # (11)! diff --git a/docs_src/tutorial/many_to_many/tutorial001_py39.py b/docs_src/tutorial/many_to_many/tutorial001_py39.py deleted file mode 100644 index c39fe91452..0000000000 --- a/docs_src/tutorial/many_to_many/tutorial001_py39.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine - - -class HeroTeamLink(SQLModel, table=True): - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", primary_key=True - ) - hero_id: Optional[int] = Field( - default=None, foreign_key="hero.id", primary_key=True - ) - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="teams", link_model=HeroTeamLink) - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - teams: list[Team] = Relationship(back_populates="heroes", link_model=HeroTeamLink) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", - secret_name="Dive Wilson", - teams=[team_z_force, team_preventers], - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - teams=[team_preventers], - ) - hero_spider_boy = Hero( - name="Spider-Boy", secret_name="Pedro Parqueador", teams=[team_preventers] - ) - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Deadpond:", hero_deadpond) - print("Deadpond teams:", hero_deadpond.teams) - print("Rusty-Man:", hero_rusty_man) - print("Rusty-Man Teams:", hero_rusty_man.teams) - print("Spider-Boy:", hero_spider_boy) - print("Spider-Boy Teams:", hero_spider_boy.teams) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/many_to_many/tutorial002_py39.py b/docs_src/tutorial/many_to_many/tutorial002_py39.py deleted file mode 100644 index c3b5f88f0e..0000000000 --- a/docs_src/tutorial/many_to_many/tutorial002_py39.py +++ /dev/null @@ -1,107 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class HeroTeamLink(SQLModel, table=True): - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", primary_key=True - ) - hero_id: Optional[int] = Field( - default=None, foreign_key="hero.id", primary_key=True - ) - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="teams", link_model=HeroTeamLink) - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - teams: list[Team] = Relationship(back_populates="heroes", link_model=HeroTeamLink) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", - secret_name="Dive Wilson", - teams=[team_z_force, team_preventers], - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - teams=[team_preventers], - ) - hero_spider_boy = Hero( - name="Spider-Boy", secret_name="Pedro Parqueador", teams=[team_preventers] - ) - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Deadpond:", hero_deadpond) - print("Deadpond teams:", hero_deadpond.teams) - print("Rusty-Man:", hero_rusty_man) - print("Rusty-Man Teams:", hero_rusty_man.teams) - print("Spider-Boy:", hero_spider_boy) - print("Spider-Boy Teams:", hero_spider_boy.teams) - - -def update_heroes(): - with Session(engine) as session: - hero_spider_boy = session.exec( - select(Hero).where(Hero.name == "Spider-Boy") - ).one() - team_z_force = session.exec(select(Team).where(Team.name == "Z-Force")).one() - - team_z_force.heroes.append(hero_spider_boy) - session.add(team_z_force) - session.commit() - - print("Updated Spider-Boy's Teams:", hero_spider_boy.teams) - print("Z-Force heroes:", team_z_force.heroes) - - hero_spider_boy.teams.remove(team_z_force) - session.add(team_z_force) - session.commit() - - print("Reverted Z-Force's heroes:", team_z_force.heroes) - print("Reverted Spider-Boy's teams:", hero_spider_boy.teams) - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/many_to_many/tutorial003_py39.py b/docs_src/tutorial/many_to_many/tutorial003_py39.py deleted file mode 100644 index 175fbf318b..0000000000 --- a/docs_src/tutorial/many_to_many/tutorial003_py39.py +++ /dev/null @@ -1,123 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class HeroTeamLink(SQLModel, table=True): - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", primary_key=True - ) - hero_id: Optional[int] = Field( - default=None, foreign_key="hero.id", primary_key=True - ) - is_training: bool = False - - team: "Team" = Relationship(back_populates="hero_links") - hero: "Hero" = Relationship(back_populates="team_links") - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - hero_links: list[HeroTeamLink] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_links: list[HeroTeamLink] = Relationship(back_populates="hero") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", - secret_name="Dive Wilson", - ) - hero_rusty_man = Hero( - name="Rusty-Man", - secret_name="Tommy Sharp", - age=48, - ) - hero_spider_boy = Hero( - name="Spider-Boy", - secret_name="Pedro Parqueador", - ) - deadpond_team_z_link = HeroTeamLink(team=team_z_force, hero=hero_deadpond) - deadpond_preventers_link = HeroTeamLink( - team=team_preventers, hero=hero_deadpond, is_training=True - ) - spider_boy_preventers_link = HeroTeamLink( - team=team_preventers, hero=hero_spider_boy, is_training=True - ) - rusty_man_preventers_link = HeroTeamLink( - team=team_preventers, hero=hero_rusty_man - ) - - session.add(deadpond_team_z_link) - session.add(deadpond_preventers_link) - session.add(spider_boy_preventers_link) - session.add(rusty_man_preventers_link) - session.commit() - - for link in team_z_force.hero_links: - print("Z-Force hero:", link.hero, "is training:", link.is_training) - - for link in team_preventers.hero_links: - print("Preventers hero:", link.hero, "is training:", link.is_training) - - -def update_heroes(): - with Session(engine) as session: - hero_spider_boy = session.exec( - select(Hero).where(Hero.name == "Spider-Boy") - ).one() - team_z_force = session.exec(select(Team).where(Team.name == "Z-Force")).one() - - spider_boy_z_force_link = HeroTeamLink( - team=team_z_force, hero=hero_spider_boy, is_training=True - ) - team_z_force.hero_links.append(spider_boy_z_force_link) - session.add(team_z_force) - session.commit() - - print("Updated Spider-Boy's Teams:", hero_spider_boy.team_links) - print("Z-Force heroes:", team_z_force.hero_links) - - for link in hero_spider_boy.team_links: - if link.team.name == "Preventers": - link.is_training = False - - session.add(hero_spider_boy) - session.commit() - - for link in hero_spider_boy.team_links: - print("Spider-Boy team:", link.team, "is training:", link.is_training) - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/offset_and_limit/tutorial001_py39.py b/docs_src/tutorial/offset_and_limit/tutorial001_py39.py deleted file mode 100644 index 1b033accb9..0000000000 --- a/docs_src/tutorial/offset_and_limit/tutorial001_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).limit(3) - results = session.exec(statement) - heroes = results.all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/offset_and_limit/tutorial002_py39.py b/docs_src/tutorial/offset_and_limit/tutorial002_py39.py deleted file mode 100644 index 65a62369f4..0000000000 --- a/docs_src/tutorial/offset_and_limit/tutorial002_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).offset(3).limit(3) - results = session.exec(statement) - heroes = results.all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/offset_and_limit/tutorial003_py39.py b/docs_src/tutorial/offset_and_limit/tutorial003_py39.py deleted file mode 100644 index 36cae9c42c..0000000000 --- a/docs_src/tutorial/offset_and_limit/tutorial003_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).offset(6).limit(3) - results = session.exec(statement) - heroes = results.all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/offset_and_limit/tutorial004_py39.py b/docs_src/tutorial/offset_and_limit/tutorial004_py39.py deleted file mode 100644 index 43828b853f..0000000000 --- a/docs_src/tutorial/offset_and_limit/tutorial004_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age > 32).offset(1).limit(2) - results = session.exec(statement) - heroes = results.all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial001_py39.py b/docs_src/tutorial/one/tutorial001_py39.py deleted file mode 100644 index 072f4a3bf5..0000000000 --- a/docs_src/tutorial/one/tutorial001_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age <= 35) - results = session.exec(statement) - hero = results.first() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial002_py39.py b/docs_src/tutorial/one/tutorial002_py39.py deleted file mode 100644 index c24490659f..0000000000 --- a/docs_src/tutorial/one/tutorial002_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age < 25) - results = session.exec(statement) - hero = results.first() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial003_py39.py b/docs_src/tutorial/one/tutorial003_py39.py deleted file mode 100644 index f8fb0bcd7d..0000000000 --- a/docs_src/tutorial/one/tutorial003_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Deadpond") - results = session.exec(statement) - hero = results.one() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial004_py39.py b/docs_src/tutorial/one/tutorial004_py39.py deleted file mode 100644 index 8688fc4799..0000000000 --- a/docs_src/tutorial/one/tutorial004_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age <= 35) - results = session.exec(statement) - hero = results.one() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial005_py39.py b/docs_src/tutorial/one/tutorial005_py39.py deleted file mode 100644 index f624d4cb68..0000000000 --- a/docs_src/tutorial/one/tutorial005_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age < 25) - results = session.exec(statement) - hero = results.one() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial006_py39.py b/docs_src/tutorial/one/tutorial006_py39.py deleted file mode 100644 index afc48547d9..0000000000 --- a/docs_src/tutorial/one/tutorial006_py39.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - hero = session.exec(select(Hero).where(Hero.name == "Deadpond")).one() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial007_py39.py b/docs_src/tutorial/one/tutorial007_py39.py deleted file mode 100644 index 15df5baa94..0000000000 --- a/docs_src/tutorial/one/tutorial007_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.id == 1) - results = session.exec(statement) - hero = results.first() - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial008_py39.py b/docs_src/tutorial/one/tutorial008_py39.py deleted file mode 100644 index 9aa077ca38..0000000000 --- a/docs_src/tutorial/one/tutorial008_py39.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - hero = session.get(Hero, 1) - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/one/tutorial009_py39.py b/docs_src/tutorial/one/tutorial009_py39.py deleted file mode 100644 index f4ee23b355..0000000000 --- a/docs_src/tutorial/one/tutorial009_py39.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - hero = session.get(Hero, 9001) - print("Hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/back_populates/tutorial001_py39.py b/docs_src/tutorial/relationship_attributes/back_populates/tutorial001_py39.py deleted file mode 100644 index 6ec5e72a7c..0000000000 --- a/docs_src/tutorial/relationship_attributes/back_populates/tutorial001_py39.py +++ /dev/null @@ -1,143 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship() - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship() - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_dr_weird = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_cap = Hero( - name="Captain North America", secret_name="Esteban Rogelios", age=93 - ) - - team_preventers.heroes.append(hero_tarantula) - team_preventers.heroes.append(hero_dr_weird) - team_preventers.heroes.append(hero_cap) - session.add(team_preventers) - session.commit() - session.refresh(hero_tarantula) - session.refresh(hero_dr_weird) - session.refresh(hero_cap) - print("Preventers new hero:", hero_tarantula) - print("Preventers new hero:", hero_dr_weird) - print("Preventers new hero:", hero_cap) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Preventers") - result = session.exec(statement) - team_preventers = result.one() - - print("Preventers heroes:", team_preventers.heroes) - - -def update_heroes(): - with Session(engine) as session: - hero_spider_boy = session.exec( - select(Hero).where(Hero.name == "Spider-Boy") - ).one() - - preventers_team = session.exec( - select(Team).where(Team.name == "Preventers") - ).one() - - print("Hero Spider-Boy:", hero_spider_boy) - print("Preventers Team:", preventers_team) - print("Preventers Team Heroes:", preventers_team.heroes) - - hero_spider_boy.team = None - - print("Spider-Boy without team:", hero_spider_boy) - - print("Preventers Team Heroes again:", preventers_team.heroes) - - session.add(hero_spider_boy) - session.commit() - print("After committing") - - session.refresh(hero_spider_boy) - print("Spider-Boy after commit:", hero_spider_boy) - - print("Preventers Team Heroes after commit:", preventers_team.heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/back_populates/tutorial002_py39.py b/docs_src/tutorial/relationship_attributes/back_populates/tutorial002_py39.py deleted file mode 100644 index d001ef03da..0000000000 --- a/docs_src/tutorial/relationship_attributes/back_populates/tutorial002_py39.py +++ /dev/null @@ -1,143 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_dr_weird = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_cap = Hero( - name="Captain North America", secret_name="Esteban Rogelios", age=93 - ) - - team_preventers.heroes.append(hero_tarantula) - team_preventers.heroes.append(hero_dr_weird) - team_preventers.heroes.append(hero_cap) - session.add(team_preventers) - session.commit() - session.refresh(hero_tarantula) - session.refresh(hero_dr_weird) - session.refresh(hero_cap) - print("Preventers new hero:", hero_tarantula) - print("Preventers new hero:", hero_dr_weird) - print("Preventers new hero:", hero_cap) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Preventers") - result = session.exec(statement) - team_preventers = result.one() - - print("Preventers heroes:", team_preventers.heroes) - - -def update_heroes(): - with Session(engine) as session: - hero_spider_boy = session.exec( - select(Hero).where(Hero.name == "Spider-Boy") - ).one() - - preventers_team = session.exec( - select(Team).where(Team.name == "Preventers") - ).one() - - print("Hero Spider-Boy:", hero_spider_boy) - print("Preventers Team:", preventers_team) - print("Preventers Team Heroes:", preventers_team.heroes) - - hero_spider_boy.team = None - - print("Spider-Boy without team:", hero_spider_boy) - - print("Preventers Team Heroes again:", preventers_team.heroes) - - session.add(hero_spider_boy) - session.commit() - print("After committing") - - session.refresh(hero_spider_boy) - print("Spider-Boy after commit:", hero_spider_boy) - - print("Preventers Team Heroes after commit:", preventers_team.heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/back_populates/tutorial003_py39.py b/docs_src/tutorial/relationship_attributes/back_populates/tutorial003_py39.py deleted file mode 100644 index fc0d08df52..0000000000 --- a/docs_src/tutorial/relationship_attributes/back_populates/tutorial003_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, SQLModel, create_engine - - -class Weapon(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - - hero: "Hero" = Relationship(back_populates="weapon") - - -class Power(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - - hero_id: int = Field(foreign_key="hero.id") - hero: "Hero" = Relationship(back_populates="powers") - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - weapon_id: Optional[int] = Field(default=None, foreign_key="weapon.id") - weapon: Optional[Weapon] = Relationship(back_populates="hero") - - powers: list[Power] = Relationship(back_populates="hero") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def main(): - create_db_and_tables() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial001_py39.py b/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial001_py39.py deleted file mode 100644 index 201f07675d..0000000000 --- a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial001_py39.py +++ /dev/null @@ -1,110 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team", cascade_delete=True) - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", ondelete="CASCADE" - ) - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - -def delete_team(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - session.delete(team) - session.commit() - print("Deleted team:", team) - - -def select_deleted_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Black Lion") - result = session.exec(statement) - hero = result.first() - print("Black Lion not found:", hero) - - statement = select(Hero).where(Hero.name == "Princess Sure-E") - result = session.exec(statement) - hero = result.first() - print("Princess Sure-E not found:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - delete_team() - select_deleted_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial002_py39.py b/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial002_py39.py deleted file mode 100644 index 7a22f6ee16..0000000000 --- a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial002_py39.py +++ /dev/null @@ -1,110 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", ondelete="SET NULL" - ) - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - -def delete_team(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - session.delete(team) - session.commit() - print("Deleted team:", team) - - -def select_deleted_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Black Lion") - result = session.exec(statement) - hero = result.first() - print("Black Lion has no team:", hero) - - statement = select(Hero).where(Hero.name == "Princess Sure-E") - result = session.exec(statement) - hero = result.first() - print("Princess Sure-E has no team:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - delete_team() - select_deleted_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial003_py39.py b/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial003_py39.py deleted file mode 100644 index 0327e69f50..0000000000 --- a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial003_py39.py +++ /dev/null @@ -1,112 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select, text - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team", passive_deletes="all") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", ondelete="SET NULL" - ) - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - with engine.connect() as connection: - connection.execute(text("PRAGMA foreign_keys=ON")) # for SQLite only - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - -def delete_team(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - session.delete(team) - session.commit() - print("Deleted team:", team) - - -def select_deleted_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Black Lion") - result = session.exec(statement) - hero = result.first() - print("Black Lion has no team:", hero) - - statement = select(Hero).where(Hero.name == "Princess Sure-E") - result = session.exec(statement) - hero = result.first() - print("Princess Sure-E has no team:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - delete_team() - select_deleted_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial004_py39.py b/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial004_py39.py deleted file mode 100644 index 25badb1fdf..0000000000 --- a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial004_py39.py +++ /dev/null @@ -1,111 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select, text - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team", passive_deletes="all") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", ondelete="RESTRICT" - ) - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - with engine.connect() as connection: - connection.execute(text("PRAGMA foreign_keys=ON")) # for SQLite only - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - -def delete_team(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - session.delete(team) - session.commit() - print("Deleted team:", team) - - -def select_deleted_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Black Lion") - result = session.exec(statement) - hero = result.first() - print("Black Lion has no team:", hero) - - statement = select(Hero).where(Hero.name == "Princess Sure-E") - result = session.exec(statement) - hero = result.first() - print("Princess Sure-E has no team:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - delete_team() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial005_py39.py b/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial005_py39.py deleted file mode 100644 index edc8fb0bd5..0000000000 --- a/docs_src/tutorial/relationship_attributes/cascade_delete_relationships/tutorial005_py39.py +++ /dev/null @@ -1,124 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select, text - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team", passive_deletes="all") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field( - default=None, foreign_key="team.id", ondelete="RESTRICT" - ) - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - with engine.connect() as connection: - connection.execute(text("PRAGMA foreign_keys=ON")) # for SQLite only - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - -def remove_team_heroes(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - team.heroes.clear() - session.add(team) - session.commit() - session.refresh(team) - print("Team with removed heroes:", team) - - -def delete_team(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Wakaland") - team = session.exec(statement).one() - session.delete(team) - session.commit() - print("Deleted team:", team) - - -def select_deleted_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Black Lion") - result = session.exec(statement) - hero = result.first() - print("Black Lion has no team:", hero) - - statement = select(Hero).where(Hero.name == "Princess Sure-E") - result = session.exec(statement) - hero = result.first() - print("Princess Sure-E has no team:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - remove_team_heroes() - delete_team() - select_deleted_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/create_and_update_relationships/tutorial001_py39.py b/docs_src/tutorial/relationship_attributes/create_and_update_relationships/tutorial001_py39.py deleted file mode 100644 index 43c699d3d9..0000000000 --- a/docs_src/tutorial/relationship_attributes/create_and_update_relationships/tutorial001_py39.py +++ /dev/null @@ -1,102 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_dr_weird = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_cap = Hero( - name="Captain North America", secret_name="Esteban Rogelios", age=93 - ) - - team_preventers.heroes.append(hero_tarantula) - team_preventers.heroes.append(hero_dr_weird) - team_preventers.heroes.append(hero_cap) - session.add(team_preventers) - session.commit() - session.refresh(hero_tarantula) - session.refresh(hero_dr_weird) - session.refresh(hero_cap) - print("Preventers new hero:", hero_tarantula) - print("Preventers new hero:", hero_dr_weird) - print("Preventers new hero:", hero_cap) - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/define_relationship_attributes/tutorial001_py39.py b/docs_src/tutorial/relationship_attributes/define_relationship_attributes/tutorial001_py39.py deleted file mode 100644 index 8530f67b39..0000000000 --- a/docs_src/tutorial/relationship_attributes/define_relationship_attributes/tutorial001_py39.py +++ /dev/null @@ -1,70 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - - -def main(): - create_db_and_tables() - create_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001_py39.py b/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001_py39.py deleted file mode 100644 index 2219c82dab..0000000000 --- a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001_py39.py +++ /dev/null @@ -1,117 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_dr_weird = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_cap = Hero( - name="Captain North America", secret_name="Esteban Rogelios", age=93 - ) - - team_preventers.heroes.append(hero_tarantula) - team_preventers.heroes.append(hero_dr_weird) - team_preventers.heroes.append(hero_cap) - session.add(team_preventers) - session.commit() - session.refresh(hero_tarantula) - session.refresh(hero_dr_weird) - session.refresh(hero_cap) - print("Preventers new hero:", hero_tarantula) - print("Preventers new hero:", hero_dr_weird) - print("Preventers new hero:", hero_cap) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - result = session.exec(statement) - hero_spider_boy = result.one() - - statement = select(Team).where(Team.id == hero_spider_boy.team_id) - result = session.exec(statement) - team = result.first() - print("Spider-Boy's team:", team) - - print("Spider-Boy's team again:", hero_spider_boy.team) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial002_py39.py b/docs_src/tutorial/relationship_attributes/read_relationships/tutorial002_py39.py deleted file mode 100644 index 393bdc8a5e..0000000000 --- a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial002_py39.py +++ /dev/null @@ -1,127 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select - - -class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - headquarters: str - - heroes: list["Hero"] = Relationship(back_populates="team") - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - with Session(engine) as session: - team_preventers = Team(name="Preventers", headquarters="Sharp Tower") - team_z_force = Team(name="Z-Force", headquarters="Sister Margaret's Bar") - - hero_deadpond = Hero( - name="Deadpond", secret_name="Dive Wilson", team=team_z_force - ) - hero_rusty_man = Hero( - name="Rusty-Man", secret_name="Tommy Sharp", age=48, team=team_preventers - ) - hero_spider_boy = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - session.add(hero_deadpond) - session.add(hero_rusty_man) - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_deadpond) - session.refresh(hero_rusty_man) - session.refresh(hero_spider_boy) - - print("Created hero:", hero_deadpond) - print("Created hero:", hero_rusty_man) - print("Created hero:", hero_spider_boy) - - hero_spider_boy.team = team_preventers - session.add(hero_spider_boy) - session.commit() - session.refresh(hero_spider_boy) - print("Updated hero:", hero_spider_boy) - - hero_black_lion = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_sure_e = Hero(name="Princess Sure-E", secret_name="Sure-E") - team_wakaland = Team( - name="Wakaland", - headquarters="Wakaland Capital City", - heroes=[hero_black_lion, hero_sure_e], - ) - session.add(team_wakaland) - session.commit() - session.refresh(team_wakaland) - print("Team Wakaland:", team_wakaland) - - hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_dr_weird = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_cap = Hero( - name="Captain North America", secret_name="Esteban Rogelios", age=93 - ) - - team_preventers.heroes.append(hero_tarantula) - team_preventers.heroes.append(hero_dr_weird) - team_preventers.heroes.append(hero_cap) - session.add(team_preventers) - session.commit() - session.refresh(hero_tarantula) - session.refresh(hero_dr_weird) - session.refresh(hero_cap) - print("Preventers new hero:", hero_tarantula) - print("Preventers new hero:", hero_dr_weird) - print("Preventers new hero:", hero_cap) - - -def select_heroes(): - with Session(engine) as session: - statement = select(Team).where(Team.name == "Preventers") - result = session.exec(statement) - team_preventers = result.one() - - print("Preventers heroes:", team_preventers.heroes) - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - result = session.exec(statement) - hero_spider_boy = result.one() - - hero_spider_boy.team = None - session.add(hero_spider_boy) - session.commit() - - session.refresh(hero_spider_boy) - print("Spider-Boy without team:", hero_spider_boy) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/select/tutorial001_py39.py b/docs_src/tutorial/select/tutorial001_py39.py deleted file mode 100644 index 285f711221..0000000000 --- a/docs_src/tutorial/select/tutorial001_py39.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/select/tutorial002_py39.py b/docs_src/tutorial/select/tutorial002_py39.py deleted file mode 100644 index 2229f3fc30..0000000000 --- a/docs_src/tutorial/select/tutorial002_py39.py +++ /dev/null @@ -1,52 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select # (1)! - - -class Hero(SQLModel, table=True): # (2)! - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) # (3)! - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) # (4)! - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") # (5)! - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: # (6)! - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: # (7)! - statement = select(Hero) # (8)! - results = session.exec(statement) # (9)! - for hero in results: # (10)! - print(hero) # (11)! - # (12)! - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() # (13)! - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/select/tutorial003_py39.py b/docs_src/tutorial/select/tutorial003_py39.py deleted file mode 100644 index 97eab13682..0000000000 --- a/docs_src/tutorial/select/tutorial003_py39.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero) - results = session.exec(statement) - heroes = results.all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/select/tutorial004_py39.py b/docs_src/tutorial/select/tutorial004_py39.py deleted file mode 100644 index e9ddbbb2bf..0000000000 --- a/docs_src/tutorial/select/tutorial004_py39.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - heroes = session.exec(select(Hero)).all() - print(heroes) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/update/tutorial001_py39.py b/docs_src/tutorial/update/tutorial001_py39.py deleted file mode 100644 index 37868acc96..0000000000 --- a/docs_src/tutorial/update/tutorial001_py39.py +++ /dev/null @@ -1,65 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - results = session.exec(statement) - hero = results.one() - print("Hero:", hero) - - hero.age = 16 - session.add(hero) - session.commit() - session.refresh(hero) - print("Updated hero:", hero) - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/update/tutorial002_py39.py b/docs_src/tutorial/update/tutorial002_py39.py deleted file mode 100644 index 572198563c..0000000000 --- a/docs_src/tutorial/update/tutorial002_py39.py +++ /dev/null @@ -1,65 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") # (1)! - results = session.exec(statement) # (2)! - hero = results.one() # (3)! - print("Hero:", hero) # (4)! - - hero.age = 16 # (5)! - session.add(hero) # (6)! - session.commit() # (7)! - session.refresh(hero) # (8)! - print("Updated hero:", hero) # (9)! - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/update/tutorial003_py39.py b/docs_src/tutorial/update/tutorial003_py39.py deleted file mode 100644 index fd2ed75f0b..0000000000 --- a/docs_src/tutorial/update/tutorial003_py39.py +++ /dev/null @@ -1,79 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") - results = session.exec(statement) - hero_1 = results.one() - print("Hero 1:", hero_1) - - statement = select(Hero).where(Hero.name == "Captain North America") - results = session.exec(statement) - hero_2 = results.one() - print("Hero 2:", hero_2) - - hero_1.age = 16 - hero_1.name = "Spider-Youngster" - session.add(hero_1) - - hero_2.name = "Captain North America Except Canada" - hero_2.age = 110 - session.add(hero_2) - - session.commit() - session.refresh(hero_1) - session.refresh(hero_2) - - print("Updated hero 1:", hero_1) - print("Updated hero 2:", hero_2) - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/update/tutorial004_py39.py b/docs_src/tutorial/update/tutorial004_py39.py deleted file mode 100644 index c74316e7b6..0000000000 --- a/docs_src/tutorial/update/tutorial004_py39.py +++ /dev/null @@ -1,80 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str = Field(index=True) - secret_name: str - age: Optional[int] = Field(default=None, index=True) - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def update_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Spider-Boy") # (1)! - results = session.exec(statement) # (2)! - hero_1 = results.one() # (3)! - print("Hero 1:", hero_1) # (4)! - - statement = select(Hero).where(Hero.name == "Captain North America") # (5)! - results = session.exec(statement) # (6)! - hero_2 = results.one() # (7)! - print("Hero 2:", hero_2) # (8)! - - hero_1.age = 16 # (9)! - hero_1.name = "Spider-Youngster" # (10)! - session.add(hero_1) # (11)! - - hero_2.name = "Captain North America Except Canada" # (12)! - hero_2.age = 110 # (13)! - session.add(hero_2) # (14)! - - session.commit() # (15)! - session.refresh(hero_1) # (16)! - session.refresh(hero_2) # (17)! - - print("Updated hero 1:", hero_1) # (18)! - print("Updated hero 2:", hero_2) # (19)! - # (20)! - - -def main(): - create_db_and_tables() - create_heroes() - update_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial001_py39.py b/docs_src/tutorial/where/tutorial001_py39.py deleted file mode 100644 index 71fcbc2626..0000000000 --- a/docs_src/tutorial/where/tutorial001_py39.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name == "Deadpond") - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial002_py39.py b/docs_src/tutorial/where/tutorial002_py39.py deleted file mode 100644 index 7e34448726..0000000000 --- a/docs_src/tutorial/where/tutorial002_py39.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.name != "Deadpond") - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial003_py39.py b/docs_src/tutorial/where/tutorial003_py39.py deleted file mode 100644 index 2aa31ccaf7..0000000000 --- a/docs_src/tutorial/where/tutorial003_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age > 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial004_py39.py b/docs_src/tutorial/where/tutorial004_py39.py deleted file mode 100644 index eeec6aaa5e..0000000000 --- a/docs_src/tutorial/where/tutorial004_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age >= 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial005_py39.py b/docs_src/tutorial/where/tutorial005_py39.py deleted file mode 100644 index 505663e274..0000000000 --- a/docs_src/tutorial/where/tutorial005_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age < 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial006_py39.py b/docs_src/tutorial/where/tutorial006_py39.py deleted file mode 100644 index 91bbca5615..0000000000 --- a/docs_src/tutorial/where/tutorial006_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age <= 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial007_py39.py b/docs_src/tutorial/where/tutorial007_py39.py deleted file mode 100644 index 97250b54fd..0000000000 --- a/docs_src/tutorial/where/tutorial007_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age >= 35).where(Hero.age < 40) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial008_py39.py b/docs_src/tutorial/where/tutorial008_py39.py deleted file mode 100644 index 41d2ae6772..0000000000 --- a/docs_src/tutorial/where/tutorial008_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(Hero.age >= 35, Hero.age < 40) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial009_py39.py b/docs_src/tutorial/where/tutorial009_py39.py deleted file mode 100644 index 9f69d65663..0000000000 --- a/docs_src/tutorial/where/tutorial009_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, or_, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(or_(Hero.age <= 35, Hero.age > 90)) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial010_py310.py b/docs_src/tutorial/where/tutorial010_py310.py deleted file mode 100644 index a65c47acf2..0000000000 --- a/docs_src/tutorial/where/tutorial010_py310.py +++ /dev/null @@ -1,57 +0,0 @@ -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: int | None = Field(default=None, primary_key=True) - name: str - secret_name: str - age: int | None = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where((Hero.age <= 35) | (Hero.age > 90)) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial010_py39.py b/docs_src/tutorial/where/tutorial010_py39.py deleted file mode 100644 index c35eb2c7ba..0000000000 --- a/docs_src/tutorial/where/tutorial010_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where((Hero.age <= 35) | (Hero.age > 90)) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/docs_src/tutorial/where/tutorial011_py39.py b/docs_src/tutorial/where/tutorial011_py39.py deleted file mode 100644 index e365a3acfb..0000000000 --- a/docs_src/tutorial/where/tutorial011_py39.py +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Optional - -from sqlmodel import Field, Session, SQLModel, col, create_engine, select - - -class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - name: str - secret_name: str - age: Optional[int] = None - - -sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" - -engine = create_engine(sqlite_url, echo=True) - - -def create_db_and_tables(): - SQLModel.metadata.create_all(engine) - - -def create_heroes(): - hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") - hero_2 = Hero(name="Spider-Boy", secret_name="Pedro Parqueador") - hero_3 = Hero(name="Rusty-Man", secret_name="Tommy Sharp", age=48) - hero_4 = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32) - hero_5 = Hero(name="Black Lion", secret_name="Trevor Challa", age=35) - hero_6 = Hero(name="Dr. Weird", secret_name="Steve Weird", age=36) - hero_7 = Hero(name="Captain North America", secret_name="Esteban Rogelios", age=93) - - with Session(engine) as session: - session.add(hero_1) - session.add(hero_2) - session.add(hero_3) - session.add(hero_4) - session.add(hero_5) - session.add(hero_6) - session.add(hero_7) - - session.commit() - - -def select_heroes(): - with Session(engine) as session: - statement = select(Hero).where(col(Hero.age) >= 35) - results = session.exec(statement) - for hero in results: - print(hero) - - -def main(): - create_db_and_tables() - create_heroes() - select_heroes() - - -if __name__ == "__main__": - main() diff --git a/pyproject.toml b/pyproject.toml index 6b8f1690fc..6a5419fb7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "sqlmodel" dynamic = ["version"] description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" authors = [ { name = "Sebastián Ramírez", email = "tiangolo@gmail.com" }, ] @@ -21,7 +21,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/scripts/mkdocs_hooks.py b/scripts/mkdocs_hooks.py index 0e8789461b..783ff23302 100644 --- a/scripts/mkdocs_hooks.py +++ b/scripts/mkdocs_hooks.py @@ -1,4 +1,4 @@ -from typing import Any, Union +from typing import Any from mkdocs.config.defaults import MkDocsConfig from mkdocs.structure.files import Files @@ -7,9 +7,9 @@ def generate_renamed_section_items( - items: list[Union[Page, Section, Link]], *, config: MkDocsConfig -) -> list[Union[Page, Section, Link]]: - new_items: list[Union[Page, Section, Link]] = [] + items: list[Page | Section | Link], *, config: MkDocsConfig +) -> list[Page | Section | Link]: + new_items: list[Page | Section | Link] = [] for item in items: if isinstance(item, Section): new_title = item.title diff --git a/sqlmodel/_compat.py b/sqlmodel/_compat.py index 5907d279c8..a220b193f1 100644 --- a/sqlmodel/_compat.py +++ b/sqlmodel/_compat.py @@ -9,9 +9,11 @@ Annotated, Any, ForwardRef, - Optional, + TypeAlias, TypeVar, Union, + get_args, + get_origin, ) from annotated_types import MaxLen @@ -24,7 +26,6 @@ from pydantic.fields import FieldInfo from pydantic_core import PydanticUndefined as Undefined from pydantic_core import PydanticUndefinedType as PydanticUndefinedType -from typing_extensions import get_args, get_origin BaseConfig = ConfigDict UndefinedType = PydanticUndefinedType @@ -37,14 +38,14 @@ UnionType = getattr(types, "UnionType", Union) NoneType = type(None) T = TypeVar("T") -InstanceOrType = Union[T, type[T]] +InstanceOrType: TypeAlias = T | type[T] _TSQLModel = TypeVar("_TSQLModel", bound="SQLModel") class FakeMetadata: - max_length: Optional[int] = None - max_digits: Optional[int] = None - decimal_places: Optional[int] = None + max_length: int | None = None + max_digits: int | None = None + decimal_places: int | None = None @dataclass @@ -75,8 +76,8 @@ def partial_init() -> Generator[None, None, None]: class SQLModelConfig(BaseConfig, total=False): - table: Optional[bool] - registry: Optional[Any] + table: bool | None + registry: Any | None def get_model_fields(model: InstanceOrType[BaseModel]) -> dict[str, "FieldInfo"]: @@ -208,7 +209,7 @@ def sqlmodel_table_construct( *, self_instance: _TSQLModel, values: dict[str, Any], - _fields_set: Union[set[str], None] = None, + _fields_set: set[str] | None = None, ) -> _TSQLModel: # Copy from Pydantic's BaseModel.construct() # Ref: https://github.com/pydantic/pydantic/blob/v2.5.2/pydantic/main.py#L198 @@ -236,7 +237,7 @@ def sqlmodel_table_construct( _fields_set = set(fields_values.keys()) fields_values.update(defaults) - _extra: Union[dict[str, Any], None] = None + _extra: dict[str, Any] | None = None if cls.model_config.get("extra") == "allow": _extra = {} for k, v in values.items(): @@ -276,10 +277,10 @@ def sqlmodel_validate( cls: type[_TSQLModel], obj: Any, *, - strict: Union[bool, None] = None, - from_attributes: Union[bool, None] = None, - context: Union[dict[str, Any], None] = None, - update: Union[dict[str, Any], None] = None, + strict: bool | None = None, + from_attributes: bool | None = None, + context: dict[str, Any] | None = None, + update: dict[str, Any] | None = None, ) -> _TSQLModel: if not is_table_model_class(cls): new_obj: _TSQLModel = cls.__new__(cls) diff --git a/sqlmodel/ext/asyncio/session.py b/sqlmodel/ext/asyncio/session.py index 11e99ed860..f2b989e2fa 100644 --- a/sqlmodel/ext/asyncio/session.py +++ b/sqlmodel/ext/asyncio/session.py @@ -1,9 +1,7 @@ from collections.abc import Mapping, Sequence from typing import ( Any, - Optional, TypeVar, - Union, cast, overload, ) @@ -37,11 +35,11 @@ async def exec( self, statement: Select[_TSelectParam], *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> TupleResult[_TSelectParam]: ... @overload @@ -49,11 +47,11 @@ async def exec( self, statement: SelectOfScalar[_TSelectParam], *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> ScalarResult[_TSelectParam]: ... @overload @@ -61,30 +59,26 @@ async def exec( self, statement: UpdateBase, *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> CursorResult[Any]: ... async def exec( self, - statement: Union[ - Select[_TSelectParam], - SelectOfScalar[_TSelectParam], - Executable[_TSelectParam], - UpdateBase, - ], + statement: Select[_TSelectParam] + | SelectOfScalar[_TSelectParam] + | Executable[_TSelectParam] + | UpdateBase, *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, - ) -> Union[ - TupleResult[_TSelectParam], ScalarResult[_TSelectParam], CursorResult[Any] - ]: + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, + ) -> TupleResult[_TSelectParam] | ScalarResult[_TSelectParam] | CursorResult[Any]: if execution_options: execution_options = util.immutabledict(execution_options).union( _EXECUTE_OPTIONS @@ -131,12 +125,12 @@ async def exec( async def execute( self, statement: _Executable, - params: Optional[_CoreAnyExecuteParams] = None, + params: _CoreAnyExecuteParams | None = None, *, execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> Result[Any]: """ 🚨 You probably want to use `session.exec()` instead of `session.execute()`. diff --git a/sqlmodel/main.py b/sqlmodel/main.py index bdced7ddbe..300031de8b 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -4,7 +4,7 @@ import ipaddress import uuid import weakref -from collections.abc import Mapping, Sequence, Set +from collections.abc import Callable, Mapping, Sequence, Set from dataclasses import dataclass from datetime import date, datetime, time, timedelta from decimal import Decimal @@ -13,13 +13,13 @@ from typing import ( TYPE_CHECKING, Any, - Callable, ClassVar, Literal, - Optional, + TypeAlias, TypeVar, Union, cast, + get_origin, overload, ) @@ -50,7 +50,7 @@ from sqlalchemy.orm.instrumentation import is_instrumented from sqlalchemy.sql.schema import MetaData from sqlalchemy.sql.sqltypes import LargeBinary, Time, Uuid -from typing_extensions import TypeAlias, deprecated, get_origin +from typing_extensions import deprecated from ._compat import ( # type: ignore[attr-defined] PYDANTIC_MINOR_VERSION, @@ -82,12 +82,12 @@ _T = TypeVar("_T") NoArgAnyCallable = Callable[[], Any] -IncEx: TypeAlias = Union[ - set[int], - set[str], - Mapping[int, Union["IncEx", bool]], - Mapping[str, Union["IncEx", bool]], -] +IncEx: TypeAlias = ( + set[int] + | set[str] + | Mapping[int, Union["IncEx", bool]] + | Mapping[str, Union["IncEx", bool]] +) OnDeleteType = Literal["CASCADE", "SET NULL", "RESTRICT"] @@ -96,7 +96,7 @@ def __dataclass_transform__( eq_default: bool = True, order_default: bool = False, kw_only_default: bool = False, - field_descriptors: tuple[Union[type, Callable[..., Any]], ...] = (()), + field_descriptors: tuple[type | Callable[..., Any], ...] = (()), ) -> Callable[[_T], _T]: return lambda a: a @@ -173,13 +173,13 @@ class RelationshipInfo(Representation): def __init__( self, *, - back_populates: Optional[str] = None, - cascade_delete: Optional[bool] = False, - passive_deletes: Optional[Union[bool, Literal["all"]]] = False, - link_model: Optional[Any] = None, - sa_relationship: Optional[RelationshipProperty] = None, # type: ignore - sa_relationship_args: Optional[Sequence[Any]] = None, - sa_relationship_kwargs: Optional[Mapping[str, Any]] = None, + back_populates: str | None = None, + cascade_delete: bool | None = False, + passive_deletes: bool | Literal["all"] | None = False, + link_model: Any | None = None, + sa_relationship: RelationshipProperty | None = None, # type: ignore + sa_relationship_args: Sequence[Any] | None = None, + sa_relationship_kwargs: Mapping[str, Any] | None = None, ) -> None: if sa_relationship is not None: if sa_relationship_args is not None: @@ -203,19 +203,19 @@ def __init__( @dataclass class FieldInfoMetadata: - primary_key: Union[bool, UndefinedType] = Undefined - nullable: Union[bool, UndefinedType] = Undefined + primary_key: bool | UndefinedType = Undefined + nullable: bool | UndefinedType = Undefined foreign_key: Any = Undefined - ondelete: Union[OnDeleteType, UndefinedType] = Undefined - unique: Union[bool, UndefinedType] = Undefined - index: Union[bool, UndefinedType] = Undefined - sa_type: Union[type[Any], UndefinedType] = Undefined - sa_column: Union[Column[Any], UndefinedType] = Undefined - sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined - sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined + ondelete: OnDeleteType | UndefinedType = Undefined + unique: bool | UndefinedType = Undefined + index: bool | UndefinedType = Undefined + sa_type: type[Any] | UndefinedType = Undefined + sa_column: Column[Any] | UndefinedType = Undefined + sa_column_args: Sequence[Any] | UndefinedType = Undefined + sa_column_kwargs: Mapping[str, Any] | UndefinedType = Undefined -def _get_sqlmodel_field_metadata(field_info: Any) -> Optional[FieldInfoMetadata]: +def _get_sqlmodel_field_metadata(field_info: Any) -> FieldInfoMetadata | None: metadata_items = getattr(field_info, "metadata", None) if metadata_items: for meta in metadata_items: @@ -238,40 +238,40 @@ def _get_sqlmodel_field_value( def Field( default: Any = Undefined, *, - default_factory: Optional[NoArgAnyCallable] = None, - alias: Optional[str] = None, - validation_alias: Optional[str] = None, - serialization_alias: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - exclude: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - include: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - const: Optional[bool] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - multiple_of: Optional[float] = None, - max_digits: Optional[int] = None, - decimal_places: Optional[int] = None, - min_items: Optional[int] = None, - max_items: Optional[int] = None, - unique_items: Optional[bool] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, + default_factory: NoArgAnyCallable | None = None, + alias: str | None = None, + validation_alias: str | None = None, + serialization_alias: str | None = None, + title: str | None = None, + description: str | None = None, + exclude: Set[int | str] | Mapping[int | str, Any] | Any = None, + include: Set[int | str] | Mapping[int | str, Any] | Any = None, + const: bool | None = None, + gt: float | None = None, + ge: float | None = None, + lt: float | None = None, + le: float | None = None, + multiple_of: float | None = None, + max_digits: int | None = None, + decimal_places: int | None = None, + min_items: int | None = None, + max_items: int | None = None, + unique_items: bool | None = None, + min_length: int | None = None, + max_length: int | None = None, allow_mutation: bool = True, - regex: Optional[str] = None, - discriminator: Optional[str] = None, + regex: str | None = None, + discriminator: str | None = None, repr: bool = True, - primary_key: Union[bool, UndefinedType] = Undefined, + primary_key: bool | UndefinedType = Undefined, foreign_key: Any = Undefined, - unique: Union[bool, UndefinedType] = Undefined, - nullable: Union[bool, UndefinedType] = Undefined, - index: Union[bool, UndefinedType] = Undefined, - sa_type: Union[type[Any], UndefinedType] = Undefined, - sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined, - sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined, - schema_extra: Optional[dict[str, Any]] = None, + unique: bool | UndefinedType = Undefined, + nullable: bool | UndefinedType = Undefined, + index: bool | UndefinedType = Undefined, + sa_type: type[Any] | UndefinedType = Undefined, + sa_column_args: Sequence[Any] | UndefinedType = Undefined, + sa_column_kwargs: Mapping[str, Any] | UndefinedType = Undefined, + schema_extra: dict[str, Any] | None = None, ) -> Any: ... @@ -281,41 +281,41 @@ def Field( def Field( default: Any = Undefined, *, - default_factory: Optional[NoArgAnyCallable] = None, - alias: Optional[str] = None, - validation_alias: Optional[str] = None, - serialization_alias: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - exclude: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - include: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - const: Optional[bool] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - multiple_of: Optional[float] = None, - max_digits: Optional[int] = None, - decimal_places: Optional[int] = None, - min_items: Optional[int] = None, - max_items: Optional[int] = None, - unique_items: Optional[bool] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, + default_factory: NoArgAnyCallable | None = None, + alias: str | None = None, + validation_alias: str | None = None, + serialization_alias: str | None = None, + title: str | None = None, + description: str | None = None, + exclude: Set[int | str] | Mapping[int | str, Any] | Any = None, + include: Set[int | str] | Mapping[int | str, Any] | Any = None, + const: bool | None = None, + gt: float | None = None, + ge: float | None = None, + lt: float | None = None, + le: float | None = None, + multiple_of: float | None = None, + max_digits: int | None = None, + decimal_places: int | None = None, + min_items: int | None = None, + max_items: int | None = None, + unique_items: bool | None = None, + min_length: int | None = None, + max_length: int | None = None, allow_mutation: bool = True, - regex: Optional[str] = None, - discriminator: Optional[str] = None, + regex: str | None = None, + discriminator: str | None = None, repr: bool = True, - primary_key: Union[bool, UndefinedType] = Undefined, + primary_key: bool | UndefinedType = Undefined, foreign_key: str, - ondelete: Union[OnDeleteType, UndefinedType] = Undefined, - unique: Union[bool, UndefinedType] = Undefined, - nullable: Union[bool, UndefinedType] = Undefined, - index: Union[bool, UndefinedType] = Undefined, - sa_type: Union[type[Any], UndefinedType] = Undefined, - sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined, - sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined, - schema_extra: Optional[dict[str, Any]] = None, + ondelete: OnDeleteType | UndefinedType = Undefined, + unique: bool | UndefinedType = Undefined, + nullable: bool | UndefinedType = Undefined, + index: bool | UndefinedType = Undefined, + sa_type: type[Any] | UndefinedType = Undefined, + sa_column_args: Sequence[Any] | UndefinedType = Undefined, + sa_column_kwargs: Mapping[str, Any] | UndefinedType = Undefined, + schema_extra: dict[str, Any] | None = None, ) -> Any: ... @@ -333,75 +333,75 @@ def Field( def Field( default: Any = Undefined, *, - default_factory: Optional[NoArgAnyCallable] = None, - alias: Optional[str] = None, - validation_alias: Optional[str] = None, - serialization_alias: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - exclude: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - include: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - const: Optional[bool] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - multiple_of: Optional[float] = None, - max_digits: Optional[int] = None, - decimal_places: Optional[int] = None, - min_items: Optional[int] = None, - max_items: Optional[int] = None, - unique_items: Optional[bool] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, + default_factory: NoArgAnyCallable | None = None, + alias: str | None = None, + validation_alias: str | None = None, + serialization_alias: str | None = None, + title: str | None = None, + description: str | None = None, + exclude: Set[int | str] | Mapping[int | str, Any] | Any = None, + include: Set[int | str] | Mapping[int | str, Any] | Any = None, + const: bool | None = None, + gt: float | None = None, + ge: float | None = None, + lt: float | None = None, + le: float | None = None, + multiple_of: float | None = None, + max_digits: int | None = None, + decimal_places: int | None = None, + min_items: int | None = None, + max_items: int | None = None, + unique_items: bool | None = None, + min_length: int | None = None, + max_length: int | None = None, allow_mutation: bool = True, - regex: Optional[str] = None, - discriminator: Optional[str] = None, + regex: str | None = None, + discriminator: str | None = None, repr: bool = True, - sa_column: Union[Column[Any], UndefinedType] = Undefined, - schema_extra: Optional[dict[str, Any]] = None, + sa_column: Column[Any] | UndefinedType = Undefined, + schema_extra: dict[str, Any] | None = None, ) -> Any: ... def Field( default: Any = Undefined, *, - default_factory: Optional[NoArgAnyCallable] = None, - alias: Optional[str] = None, - validation_alias: Optional[str] = None, - serialization_alias: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - exclude: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - include: Union[Set[Union[int, str]], Mapping[Union[int, str], Any], Any] = None, - const: Optional[bool] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - multiple_of: Optional[float] = None, - max_digits: Optional[int] = None, - decimal_places: Optional[int] = None, - min_items: Optional[int] = None, - max_items: Optional[int] = None, - unique_items: Optional[bool] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, + default_factory: NoArgAnyCallable | None = None, + alias: str | None = None, + validation_alias: str | None = None, + serialization_alias: str | None = None, + title: str | None = None, + description: str | None = None, + exclude: Set[int | str] | Mapping[int | str, Any] | Any = None, + include: Set[int | str] | Mapping[int | str, Any] | Any = None, + const: bool | None = None, + gt: float | None = None, + ge: float | None = None, + lt: float | None = None, + le: float | None = None, + multiple_of: float | None = None, + max_digits: int | None = None, + decimal_places: int | None = None, + min_items: int | None = None, + max_items: int | None = None, + unique_items: bool | None = None, + min_length: int | None = None, + max_length: int | None = None, allow_mutation: bool = True, - regex: Optional[str] = None, - discriminator: Optional[str] = None, + regex: str | None = None, + discriminator: str | None = None, repr: bool = True, - primary_key: Union[bool, UndefinedType] = Undefined, + primary_key: bool | UndefinedType = Undefined, foreign_key: Any = Undefined, - ondelete: Union[OnDeleteType, UndefinedType] = Undefined, - unique: Union[bool, UndefinedType] = Undefined, - nullable: Union[bool, UndefinedType] = Undefined, - index: Union[bool, UndefinedType] = Undefined, - sa_type: Union[type[Any], UndefinedType] = Undefined, - sa_column: Union[Column, UndefinedType] = Undefined, # type: ignore - sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined, - sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined, - schema_extra: Optional[dict[str, Any]] = None, + ondelete: OnDeleteType | UndefinedType = Undefined, + unique: bool | UndefinedType = Undefined, + nullable: bool | UndefinedType = Undefined, + index: bool | UndefinedType = Undefined, + sa_type: type[Any] | UndefinedType = Undefined, + sa_column: Column | UndefinedType = Undefined, # type: ignore + sa_column_args: Sequence[Any] | UndefinedType = Undefined, + sa_column_kwargs: Mapping[str, Any] | UndefinedType = Undefined, + schema_extra: dict[str, Any] | None = None, ) -> Any: current_schema_extra = schema_extra or {} # Extract possible alias settings from schema_extra so we can control precedence @@ -476,35 +476,35 @@ def Field( @overload def Relationship( *, - back_populates: Optional[str] = None, - cascade_delete: Optional[bool] = False, - passive_deletes: Optional[Union[bool, Literal["all"]]] = False, - link_model: Optional[Any] = None, - sa_relationship_args: Optional[Sequence[Any]] = None, - sa_relationship_kwargs: Optional[Mapping[str, Any]] = None, + back_populates: str | None = None, + cascade_delete: bool | None = False, + passive_deletes: bool | Literal["all"] | None = False, + link_model: Any | None = None, + sa_relationship_args: Sequence[Any] | None = None, + sa_relationship_kwargs: Mapping[str, Any] | None = None, ) -> Any: ... @overload def Relationship( *, - back_populates: Optional[str] = None, - cascade_delete: Optional[bool] = False, - passive_deletes: Optional[Union[bool, Literal["all"]]] = False, - link_model: Optional[Any] = None, - sa_relationship: Optional[RelationshipProperty[Any]] = None, + back_populates: str | None = None, + cascade_delete: bool | None = False, + passive_deletes: bool | Literal["all"] | None = False, + link_model: Any | None = None, + sa_relationship: RelationshipProperty[Any] | None = None, ) -> Any: ... def Relationship( *, - back_populates: Optional[str] = None, - cascade_delete: Optional[bool] = False, - passive_deletes: Optional[Union[bool, Literal["all"]]] = False, - link_model: Optional[Any] = None, - sa_relationship: Optional[RelationshipProperty[Any]] = None, - sa_relationship_args: Optional[Sequence[Any]] = None, - sa_relationship_kwargs: Optional[Mapping[str, Any]] = None, + back_populates: str | None = None, + cascade_delete: bool | None = False, + passive_deletes: bool | Literal["all"] | None = False, + link_model: Any | None = None, + sa_relationship: RelationshipProperty[Any] | None = None, + sa_relationship_args: Sequence[Any] | None = None, + sa_relationship_kwargs: Mapping[str, Any] | None = None, ) -> Any: relationship_info = RelationshipInfo( back_populates=back_populates, @@ -807,7 +807,7 @@ def get_column_from_field(field: Any) -> Column: # type: ignore class SQLModel(BaseModel, metaclass=SQLModelMetaclass, registry=default_registry): # SQLAlchemy needs to set weakref(s), Pydantic will set the other slots values __slots__ = ("__weakref__",) - __tablename__: ClassVar[Union[str, Callable[..., str]]] + __tablename__: ClassVar[str | Callable[..., str]] __sqlmodel_relationships__: ClassVar[builtins.dict[str, RelationshipProperty[Any]]] __name__: ClassVar[str] metadata: ClassVar[MetaData] @@ -857,7 +857,7 @@ def __setattr__(self, name: str, value: Any) -> None: if name not in self.__sqlmodel_relationships__: super().__setattr__(name, value) - def __repr_args__(self) -> Sequence[tuple[Optional[str], Any]]: + def __repr_args__(self) -> Sequence[tuple[str | None, Any]]: # Don't show SQLAlchemy private attributes return [ (k, v) @@ -874,10 +874,10 @@ def model_validate( # type: ignore[override] cls: type[_TSQLModel], obj: Any, *, - strict: Union[bool, None] = None, - from_attributes: Union[bool, None] = None, - context: Union[builtins.dict[str, Any], None] = None, - update: Union[builtins.dict[str, Any], None] = None, + strict: bool | None = None, + from_attributes: bool | None = None, + context: builtins.dict[str, Any] | None = None, + update: builtins.dict[str, Any] | None = None, ) -> _TSQLModel: return sqlmodel_validate( cls=cls, @@ -891,18 +891,18 @@ def model_validate( # type: ignore[override] def model_dump( self, *, - mode: Union[Literal["json", "python"], str] = "python", - include: Union[IncEx, None] = None, - exclude: Union[IncEx, None] = None, - context: Union[Any, None] = None, # v2.7 - by_alias: Union[bool, None] = None, + mode: Literal["json", "python"] | str = "python", + include: IncEx | None = None, + exclude: IncEx | None = None, + context: Any | None = None, # v2.7 + by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, # v2.12 round_trip: bool = False, - warnings: Union[bool, Literal["none", "warn", "error"]] = True, - fallback: Union[Callable[[Any], Any], None] = None, # v2.11 + warnings: bool | Literal["none", "warn", "error"] = True, + fallback: Callable[[Any], Any] | None = None, # v2.11 serialize_as_any: bool = False, # v2.7 ) -> builtins.dict[str, Any]: if PYDANTIC_MINOR_VERSION < (2, 11): @@ -936,8 +936,8 @@ def model_dump( def dict( self, *, - include: Union[IncEx, None] = None, - exclude: Union[IncEx, None] = None, + include: IncEx | None = None, + exclude: IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, @@ -962,7 +962,7 @@ def dict( def from_orm( cls: type[_TSQLModel], obj: Any, - update: Optional[builtins.dict[str, Any]] = None, + update: builtins.dict[str, Any] | None = None, ) -> _TSQLModel: return cls.model_validate(obj, update=update) @@ -976,15 +976,15 @@ def from_orm( def parse_obj( cls: type[_TSQLModel], obj: Any, - update: Optional[builtins.dict[str, Any]] = None, + update: builtins.dict[str, Any] | None = None, ) -> _TSQLModel: return cls.model_validate(obj, update=update) def sqlmodel_update( self: _TSQLModel, - obj: Union[builtins.dict[str, Any], BaseModel], + obj: builtins.dict[str, Any] | BaseModel, *, - update: Union[builtins.dict[str, Any], None] = None, + update: builtins.dict[str, Any] | None = None, ) -> _TSQLModel: use_update = (update or {}).copy() if isinstance(obj, dict): diff --git a/sqlmodel/orm/session.py b/sqlmodel/orm/session.py index d6966c0e6d..5c721ae0da 100644 --- a/sqlmodel/orm/session.py +++ b/sqlmodel/orm/session.py @@ -1,9 +1,7 @@ from collections.abc import Mapping, Sequence from typing import ( Any, - Optional, TypeVar, - Union, overload, ) @@ -30,11 +28,11 @@ def exec( self, statement: Select[_TSelectParam], *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> TupleResult[_TSelectParam]: ... @overload @@ -42,11 +40,11 @@ def exec( self, statement: SelectOfScalar[_TSelectParam], *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> ScalarResult[_TSelectParam]: ... @overload @@ -54,30 +52,26 @@ def exec( self, statement: UpdateBase, *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> CursorResult[Any]: ... def exec( self, - statement: Union[ - Select[_TSelectParam], - SelectOfScalar[_TSelectParam], - Executable[_TSelectParam], - UpdateBase, - ], + statement: Select[_TSelectParam] + | SelectOfScalar[_TSelectParam] + | Executable[_TSelectParam] + | UpdateBase, *, - params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, + params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None, execution_options: Mapping[str, Any] = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, - ) -> Union[ - TupleResult[_TSelectParam], ScalarResult[_TSelectParam], CursorResult[Any] - ]: + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, + ) -> TupleResult[_TSelectParam] | ScalarResult[_TSelectParam] | CursorResult[Any]: results = super().execute( statement, params=params, @@ -114,12 +108,12 @@ def exec( def execute( self, statement: _Executable, - params: Optional[_CoreAnyExecuteParams] = None, + params: _CoreAnyExecuteParams | None = None, *, execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT, - bind_arguments: Optional[dict[str, Any]] = None, - _parent_execute_state: Optional[Any] = None, - _add_event: Optional[Any] = None, + bind_arguments: dict[str, Any] | None = None, + _parent_execute_state: Any | None = None, + _add_event: Any | None = None, ) -> Result[Any]: """ 🚨 You probably want to use `session.exec()` instead of `session.execute()`. diff --git a/sqlmodel/sql/_expression_select_cls.py b/sqlmodel/sql/_expression_select_cls.py index 8f5469f4f2..1229c22935 100644 --- a/sqlmodel/sql/_expression_select_cls.py +++ b/sqlmodel/sql/_expression_select_cls.py @@ -1,6 +1,5 @@ from typing import ( TypeVar, - Union, ) from sqlalchemy.sql._typing import ( @@ -17,13 +16,13 @@ class SelectBase(_Select[tuple[_T]]): inherit_cache = True - def where(self, *whereclause: Union[_ColumnExpressionArgument[bool], bool]) -> Self: + def where(self, *whereclause: _ColumnExpressionArgument[bool] | bool) -> Self: """Return a new `Select` construct with the given expression added to its `WHERE` clause, joined to the existing clause via `AND`, if any. """ return super().where(*whereclause) # type: ignore[arg-type] - def having(self, *having: Union[_ColumnExpressionArgument[bool], bool]) -> Self: + def having(self, *having: _ColumnExpressionArgument[bool] | bool) -> Self: """Return a new `Select` construct with the given expression added to its `HAVING` clause, joined to the existing clause via `AND`, if any. """ diff --git a/sqlmodel/sql/_expression_select_gen.py b/sqlmodel/sql/_expression_select_gen.py index f602732fb3..83d934c68b 100644 --- a/sqlmodel/sql/_expression_select_gen.py +++ b/sqlmodel/sql/_expression_select_gen.py @@ -5,7 +5,6 @@ from typing import ( Any, TypeVar, - Union, overload, ) from uuid import UUID @@ -23,11 +22,7 @@ _T = TypeVar("_T") -_TCCA = Union[ - TypedColumnsClauseRole[_T], - SQLCoreOperations[_T], - type[_T], -] +_TCCA = TypedColumnsClauseRole[_T] | SQLCoreOperations[_T] | type[_T] # Generated TypeVars start @@ -358,7 +353,7 @@ def select( # type: ignore # Generated overloads end -def select(*entities: Any) -> Union[Select, SelectOfScalar]: # type: ignore +def select(*entities: Any) -> Select | SelectOfScalar: # type: ignore if len(entities) == 1: return SelectOfScalar(*entities) return Select(*entities) diff --git a/sqlmodel/sql/_expression_select_gen.py.jinja2 b/sqlmodel/sql/_expression_select_gen.py.jinja2 index ad0b59aef7..2ce54cb2fa 100644 --- a/sqlmodel/sql/_expression_select_gen.py.jinja2 +++ b/sqlmodel/sql/_expression_select_gen.py.jinja2 @@ -3,7 +3,6 @@ from datetime import datetime from typing import ( Any, TypeVar, - Union, overload, ) from uuid import UUID @@ -21,11 +20,7 @@ from ._expression_select_cls import Select, SelectOfScalar _T = TypeVar("_T") -_TCCA = Union[ - TypedColumnsClauseRole[_T], - SQLCoreOperations[_T], - type[_T], -] +_TCCA = TypedColumnsClauseRole[_T] | SQLCoreOperations[_T] | type[_T] # Generated TypeVars start @@ -75,7 +70,7 @@ def select( # type: ignore # Generated overloads end -def select(*entities: Any) -> Union[Select, SelectOfScalar]: # type: ignore +def select(*entities: Any) -> Select | SelectOfScalar: # type: ignore if len(entities) == 1: return SelectOfScalar(*entities) return Select(*entities) diff --git a/sqlmodel/sql/expression.py b/sqlmodel/sql/expression.py index 69a20d2801..8b1b5ee3fb 100644 --- a/sqlmodel/sql/expression.py +++ b/sqlmodel/sql/expression.py @@ -4,7 +4,6 @@ Literal, Optional, TypeVar, - Union, ) import sqlalchemy @@ -42,41 +41,41 @@ _T = TypeVar("_T") -_TypeEngineArgument = Union[type[TypeEngine[_T]], TypeEngine[_T]] +_TypeEngineArgument = type[TypeEngine[_T]] | TypeEngine[_T] # Redefine operators that would only take a column expression to also take the (virtual) # types of Pydantic models, e.g. str instead of only Mapped[str]. -def all_(expr: Union[_ColumnExpressionArgument[_T], _T]) -> CollectionAggregate[bool]: +def all_(expr: _ColumnExpressionArgument[_T] | _T) -> CollectionAggregate[bool]: return sqlalchemy.all_(expr) # type: ignore[arg-type] def and_( - initial_clause: Union[Literal[True], _ColumnExpressionArgument[bool], bool], - *clauses: Union[_ColumnExpressionArgument[bool], bool], + initial_clause: Literal[True] | _ColumnExpressionArgument[bool] | bool, + *clauses: _ColumnExpressionArgument[bool] | bool, ) -> ColumnElement[bool]: return sqlalchemy.and_(initial_clause, *clauses) # type: ignore[arg-type] -def any_(expr: Union[_ColumnExpressionArgument[_T], _T]) -> CollectionAggregate[bool]: +def any_(expr: _ColumnExpressionArgument[_T] | _T) -> CollectionAggregate[bool]: return sqlalchemy.any_(expr) # type: ignore[arg-type] def asc( - column: Union[_ColumnExpressionOrStrLabelArgument[_T], _T], + column: _ColumnExpressionOrStrLabelArgument[_T] | _T, ) -> UnaryExpression[_T]: return sqlalchemy.asc(column) # type: ignore[arg-type] def collate( - expression: Union[_ColumnExpressionArgument[str], str], collation: str + expression: _ColumnExpressionArgument[str] | str, collation: str ) -> BinaryExpression[str]: return sqlalchemy.collate(expression, collation) # type: ignore[arg-type] def between( - expr: Union[_ColumnExpressionOrLiteralArgument[_T], _T], + expr: _ColumnExpressionOrLiteralArgument[_T] | _T, lower_bound: Any, upper_bound: Any, symmetric: bool = False, @@ -84,101 +83,93 @@ def between( return sqlalchemy.between(expr, lower_bound, upper_bound, symmetric=symmetric) -def not_(clause: Union[_ColumnExpressionArgument[_T], _T]) -> ColumnElement[_T]: +def not_(clause: _ColumnExpressionArgument[_T] | _T) -> ColumnElement[_T]: return sqlalchemy.not_(clause) # type: ignore[arg-type] def case( - *whens: Union[ - tuple[Union[_ColumnExpressionArgument[bool], bool], Any], Mapping[Any, Any] - ], - value: Optional[Any] = None, - else_: Optional[Any] = None, + *whens: tuple[_ColumnExpressionArgument[bool] | bool, Any] | Mapping[Any, Any], + value: Any | None = None, + else_: Any | None = None, ) -> Case[Any]: return sqlalchemy.case(*whens, value=value, else_=else_) # type: ignore[arg-type] def cast( - expression: Union[_ColumnExpressionOrLiteralArgument[Any], Any], + expression: _ColumnExpressionOrLiteralArgument[Any] | Any, type_: "_TypeEngineArgument[_T]", ) -> Cast[_T]: return sqlalchemy.cast(expression, type_) def try_cast( - expression: Union[_ColumnExpressionOrLiteralArgument[Any], Any], + expression: _ColumnExpressionOrLiteralArgument[Any] | Any, type_: "_TypeEngineArgument[_T]", ) -> TryCast[_T]: return sqlalchemy.try_cast(expression, type_) def desc( - column: Union[_ColumnExpressionOrStrLabelArgument[_T], _T], + column: _ColumnExpressionOrStrLabelArgument[_T] | _T, ) -> UnaryExpression[_T]: return sqlalchemy.desc(column) # type: ignore[arg-type] -def distinct(expr: Union[_ColumnExpressionArgument[_T], _T]) -> UnaryExpression[_T]: +def distinct(expr: _ColumnExpressionArgument[_T] | _T) -> UnaryExpression[_T]: return sqlalchemy.distinct(expr) # type: ignore[arg-type] -def bitwise_not(expr: Union[_ColumnExpressionArgument[_T], _T]) -> UnaryExpression[_T]: +def bitwise_not(expr: _ColumnExpressionArgument[_T] | _T) -> UnaryExpression[_T]: return sqlalchemy.bitwise_not(expr) # type: ignore[arg-type] -def extract(field: str, expr: Union[_ColumnExpressionArgument[Any], Any]) -> Extract: +def extract(field: str, expr: _ColumnExpressionArgument[Any] | Any) -> Extract: return sqlalchemy.extract(field, expr) def funcfilter( - func: FunctionElement[_T], *criterion: Union[_ColumnExpressionArgument[bool], bool] + func: FunctionElement[_T], *criterion: _ColumnExpressionArgument[bool] | bool ) -> FunctionFilter[_T]: return sqlalchemy.funcfilter(func, *criterion) # type: ignore[arg-type] def label( name: str, - element: Union[_ColumnExpressionArgument[_T], _T], + element: _ColumnExpressionArgument[_T] | _T, type_: Optional["_TypeEngineArgument[_T]"] = None, ) -> Label[_T]: return sqlalchemy.label(name, element, type_=type_) # type: ignore[arg-type] def nulls_first( - column: Union[_ColumnExpressionArgument[_T], _T], + column: _ColumnExpressionArgument[_T] | _T, ) -> UnaryExpression[_T]: return sqlalchemy.nulls_first(column) # type: ignore[arg-type] -def nulls_last(column: Union[_ColumnExpressionArgument[_T], _T]) -> UnaryExpression[_T]: +def nulls_last(column: _ColumnExpressionArgument[_T] | _T) -> UnaryExpression[_T]: return sqlalchemy.nulls_last(column) # type: ignore[arg-type] def or_( - initial_clause: Union[Literal[False], _ColumnExpressionArgument[bool], bool], - *clauses: Union[_ColumnExpressionArgument[bool], bool], + initial_clause: Literal[False] | _ColumnExpressionArgument[bool] | bool, + *clauses: _ColumnExpressionArgument[bool] | bool, ) -> ColumnElement[bool]: return sqlalchemy.or_(initial_clause, *clauses) # type: ignore[arg-type] def over( element: FunctionElement[_T], - partition_by: Optional[ - Union[ - Iterable[Union[_ColumnExpressionArgument[Any], Any]], - _ColumnExpressionArgument[Any], - Any, - ] - ] = None, - order_by: Optional[ - Union[ - Iterable[Union[_ColumnExpressionArgument[Any], Any]], - _ColumnExpressionArgument[Any], - Any, - ] - ] = None, - range_: Optional[tuple[Optional[int], Optional[int]]] = None, - rows: Optional[tuple[Optional[int], Optional[int]]] = None, + partition_by: Iterable[_ColumnExpressionArgument[Any] | Any] + | _ColumnExpressionArgument[Any] + | Any + | None = None, + order_by: Iterable[_ColumnExpressionArgument[Any] | Any] + | _ColumnExpressionArgument[Any] + | Any + | None = None, + range_: tuple[int | None, int | None] | None = None, + rows: tuple[int | None, int | None] | None = None, ) -> Over[_T]: return sqlalchemy.over( element, partition_by=partition_by, order_by=order_by, range_=range_, rows=rows @@ -186,21 +177,21 @@ def over( def tuple_( - *clauses: Union[_ColumnExpressionArgument[Any], Any], - types: Optional[Sequence["_TypeEngineArgument[Any]"]] = None, + *clauses: _ColumnExpressionArgument[Any] | Any, + types: Sequence["_TypeEngineArgument[Any]"] | None = None, ) -> tuple[Any, ...]: return sqlalchemy.tuple_(*clauses, types=types) # type: ignore[return-value] def type_coerce( - expression: Union[_ColumnExpressionOrLiteralArgument[Any], Any], + expression: _ColumnExpressionOrLiteralArgument[Any] | Any, type_: "_TypeEngineArgument[_T]", ) -> TypeCoerce[_T]: return sqlalchemy.type_coerce(expression, type_) def within_group( - element: FunctionElement[_T], *order_by: Union[_ColumnExpressionArgument[Any], Any] + element: FunctionElement[_T], *order_by: _ColumnExpressionArgument[Any] | Any ) -> WithinGroup[_T]: return sqlalchemy.within_group(element, *order_by) diff --git a/tests/conftest.py b/tests/conftest.py index 9f5f8cf36a..1ad80db450 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,10 +1,10 @@ import shutil import subprocess import sys -from collections.abc import Generator +from collections.abc import Callable, Generator from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Callable, Union +from typing import Any from unittest.mock import patch import pytest @@ -35,7 +35,7 @@ def cov_tmp_path(tmp_path: Path) -> Generator[Path, None, None]: shutil.copy(coverage_path, coverage_destiny_path) -def coverage_run(*, module: str, cwd: Union[str, Path]) -> subprocess.CompletedProcess: +def coverage_run(*, module: str, cwd: str | Path) -> subprocess.CompletedProcess: result = subprocess.run( [ "coverage", @@ -53,7 +53,7 @@ def coverage_run(*, module: str, cwd: Union[str, Path]) -> subprocess.CompletedP def get_testing_print_function( - calls: list[list[Union[str, dict[str, Any]]]], + calls: list[list[str | dict[str, Any]]], ) -> Callable[..., Any]: def new_print(*args: Any) -> None: data: list[Any] = [] diff --git a/tests/test_advanced/test_decimal/test_tutorial001.py b/tests/test_advanced/test_decimal/test_tutorial001.py index 2e839e0e26..d867c6b04a 100644 --- a/tests/test_advanced/test_decimal/test_tutorial001.py +++ b/tests/test_advanced/test_decimal/test_tutorial001.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_advanced/test_uuid/test_tutorial001.py b/tests/test_advanced/test_uuid/test_tutorial001.py index e453ef00e2..20a61f0745 100644 --- a/tests/test_advanced/test_uuid/test_tutorial001.py +++ b/tests/test_advanced/test_uuid/test_tutorial001.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_advanced/test_uuid/test_tutorial002.py b/tests/test_advanced/test_uuid/test_tutorial002.py index e171c1e0ea..c977afbd5f 100644 --- a/tests/test_advanced/test_uuid/test_tutorial002.py +++ b/tests/test_advanced/test_uuid/test_tutorial002.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_aliases.py b/tests/test_aliases.py index f123251e09..f0ebf747b4 100644 --- a/tests/test_aliases.py +++ b/tests/test_aliases.py @@ -1,5 +1,3 @@ -from typing import Union - import pytest from pydantic import BaseModel, ValidationError from pydantic import Field as PField @@ -28,14 +26,14 @@ class SQLModelUserWithConfig(SQLModelUser): @pytest.mark.parametrize("model", [PydanticUser, SQLModelUser]) -def test_create_with_field_name(model: Union[type[PydanticUser], type[SQLModelUser]]): +def test_create_with_field_name(model: type[PydanticUser] | type[SQLModelUser]): with pytest.raises(ValidationError): model(full_name="Alice") @pytest.mark.parametrize("model", [PydanticUserWithConfig, SQLModelUserWithConfig]) def test_create_with_field_name_with_config( - model: Union[type[PydanticUserWithConfig], type[SQLModelUserWithConfig]], + model: type[PydanticUserWithConfig] | type[SQLModelUserWithConfig], ): user = model(full_name="Alice") assert user.full_name == "Alice" @@ -46,12 +44,10 @@ def test_create_with_field_name_with_config( [PydanticUser, SQLModelUser, PydanticUserWithConfig, SQLModelUserWithConfig], ) def test_create_with_alias( - model: Union[ - type[PydanticUser], - type[SQLModelUser], - type[PydanticUserWithConfig], - type[SQLModelUserWithConfig], - ], + model: type[PydanticUser] + | type[SQLModelUser] + | type[PydanticUserWithConfig] + | type[SQLModelUserWithConfig], ): user = model(fullName="Bob") # using alias assert user.full_name == "Bob" @@ -59,7 +55,7 @@ def test_create_with_alias( @pytest.mark.parametrize("model", [PydanticUserWithConfig, SQLModelUserWithConfig]) def test_create_with_both_prefers_alias( - model: Union[type[PydanticUserWithConfig], type[SQLModelUserWithConfig]], + model: type[PydanticUserWithConfig] | type[SQLModelUserWithConfig], ): user = model(full_name="IGNORED", fullName="Charlie") assert user.full_name == "Charlie" # alias should take precedence @@ -67,7 +63,7 @@ def test_create_with_both_prefers_alias( @pytest.mark.parametrize("model", [PydanticUser, SQLModelUser]) def test_dict_default_uses_field_names( - model: Union[type[PydanticUser], type[SQLModelUser]], + model: type[PydanticUser] | type[SQLModelUser], ): user = model(fullName="Dana") data = user.model_dump() @@ -78,7 +74,7 @@ def test_dict_default_uses_field_names( @pytest.mark.parametrize("model", [PydanticUser, SQLModelUser]) def test_dict_by_alias_uses_aliases( - model: Union[type[PydanticUser], type[SQLModelUser]], + model: type[PydanticUser] | type[SQLModelUser], ): user = model(fullName="Dana") data = user.model_dump(by_alias=True) @@ -89,7 +85,7 @@ def test_dict_by_alias_uses_aliases( @pytest.mark.parametrize("model", [PydanticUser, SQLModelUser]) def test_json_by_alias( - model: Union[type[PydanticUser], type[SQLModelUser]], + model: type[PydanticUser] | type[SQLModelUser], ): user = model(fullName="Frank") json_data = user.model_dump_json(by_alias=True) @@ -107,7 +103,7 @@ class SQLModelUserV2(SQLModel): @pytest.mark.parametrize("model", [PydanticUserV2, SQLModelUserV2]) def test_create_with_validation_alias( - model: Union[type[PydanticUserV2], type[SQLModelUserV2]], + model: type[PydanticUserV2] | type[SQLModelUserV2], ): user = model(firstName="John") assert user.first_name == "John" @@ -115,7 +111,7 @@ def test_create_with_validation_alias( @pytest.mark.parametrize("model", [PydanticUserV2, SQLModelUserV2]) def test_serialize_with_serialization_alias( - model: Union[type[PydanticUserV2], type[SQLModelUserV2]], + model: type[PydanticUserV2] | type[SQLModelUserV2], ): user = model(firstName="Jane") data = user.model_dump(by_alias=True) diff --git a/tests/test_annotated_uuid.py b/tests/test_annotated_uuid.py index 6e22d60698..44d5ced780 100644 --- a/tests/test_annotated_uuid.py +++ b/tests/test_annotated_uuid.py @@ -1,5 +1,4 @@ import uuid -from typing import Optional from sqlmodel import Field, Session, SQLModel, create_engine, select @@ -9,7 +8,7 @@ def test_annotated_optional_types(clear_sqlmodel) -> None: class Hero(SQLModel, table=True): # Pydantic UUID4 is: Annotated[UUID, UuidVersion(4)] - id: Optional[UUID4] = Field(default_factory=uuid.uuid4, primary_key=True) + id: UUID4 | None = Field(default_factory=uuid.uuid4, primary_key=True) engine = create_engine("sqlite:///:memory:") SQLModel.metadata.create_all(engine) diff --git a/tests/test_field_sa_args_kwargs.py b/tests/test_field_sa_args_kwargs.py index 94a1a13483..4a67e8e826 100644 --- a/tests/test_field_sa_args_kwargs.py +++ b/tests/test_field_sa_args_kwargs.py @@ -1,17 +1,15 @@ -from typing import Optional - from sqlalchemy import ForeignKey from sqlmodel import Field, SQLModel, create_engine def test_sa_column_args(clear_sqlmodel, caplog) -> None: class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - team_id: Optional[int] = Field( + id: int | None = Field(default=None, primary_key=True) + team_id: int | None = Field( default=None, sa_column_args=[ForeignKey("team.id")], ) @@ -26,7 +24,7 @@ class Hero(SQLModel, table=True): def test_sa_column_kargs(clear_sqlmodel, caplog) -> None: class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_column_kwargs={"primary_key": True}, ) diff --git a/tests/test_field_sa_column.py b/tests/test_field_sa_column.py index 48001aecec..1bfca79503 100644 --- a/tests/test_field_sa_column.py +++ b/tests/test_field_sa_column.py @@ -1,4 +1,4 @@ -from typing import Annotated, Optional +from typing import Annotated import pytest from sqlalchemy import Column, Integer, String @@ -7,7 +7,7 @@ def test_sa_column_takes_precedence() -> None: class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_column=Column(String, primary_key=True, nullable=False), ) @@ -19,7 +19,7 @@ class Item(SQLModel, table=True): def test_sa_column_with_annotated_metadata() -> None: class Item(SQLModel, table=True): - id: Annotated[Optional[int], "meta"] = Field( + id: Annotated[int | None, "meta"] = Field( default=None, sa_column=Column(String, primary_key=True, nullable=False), ) @@ -32,7 +32,7 @@ def test_sa_column_no_sa_args() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_column_args=[Integer], sa_column=Column(Integer, primary_key=True), @@ -43,7 +43,7 @@ def test_sa_column_no_sa_kargs() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_column_kwargs={"primary_key": True}, sa_column=Column(Integer, primary_key=True), @@ -54,7 +54,7 @@ def test_sa_column_no_type() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_type=Integer, sa_column=Column(Integer, primary_key=True), @@ -65,7 +65,7 @@ def test_sa_column_no_primary_key() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, primary_key=True, sa_column=Column(Integer, primary_key=True), @@ -76,7 +76,7 @@ def test_sa_column_no_nullable() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, nullable=True, sa_column=Column(Integer, primary_key=True), @@ -87,12 +87,12 @@ def test_sa_column_no_foreign_key() -> None: with pytest.raises(RuntimeError): class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - team_id: Optional[int] = Field( + id: int | None = Field(default=None, primary_key=True) + team_id: int | None = Field( default=None, foreign_key="team.id", sa_column=Column(Integer, primary_key=True), @@ -103,7 +103,7 @@ def test_sa_column_no_unique() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, unique=True, sa_column=Column(Integer, primary_key=True), @@ -114,7 +114,7 @@ def test_sa_column_no_index() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, index=True, sa_column=Column(Integer, primary_key=True), @@ -125,7 +125,7 @@ def test_sa_column_no_ondelete() -> None: with pytest.raises(RuntimeError): class Item(SQLModel, table=True): - id: Optional[int] = Field( + id: int | None = Field( default=None, sa_column=Column(Integer, primary_key=True), ondelete="CASCADE", diff --git a/tests/test_field_sa_relationship.py b/tests/test_field_sa_relationship.py index c3f8030299..55b0334df9 100644 --- a/tests/test_field_sa_relationship.py +++ b/tests/test_field_sa_relationship.py @@ -1,5 +1,3 @@ -from typing import Optional - import pytest from sqlalchemy.orm import relationship from sqlmodel import Field, Relationship, SQLModel @@ -9,7 +7,7 @@ def test_sa_relationship_no_args() -> None: with pytest.raises(RuntimeError): # pragma: no cover class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) headquarters: str @@ -20,20 +18,20 @@ class Team(SQLModel, table=True): ) class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) secret_name: str - age: Optional[int] = Field(default=None, index=True) + age: int | None = Field(default=None, index=True) - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") + team_id: int | None = Field(default=None, foreign_key="team.id") + team: Team | None = Relationship(back_populates="heroes") def test_sa_relationship_no_kwargs() -> None: with pytest.raises(RuntimeError): # pragma: no cover class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) headquarters: str @@ -44,10 +42,10 @@ class Team(SQLModel, table=True): ) class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) secret_name: str - age: Optional[int] = Field(default=None, index=True) + age: int | None = Field(default=None, index=True) - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship(back_populates="heroes") + team_id: int | None = Field(default=None, foreign_key="team.id") + team: Team | None = Relationship(back_populates="heroes") diff --git a/tests/test_future_annotations.py b/tests/test_future_annotations.py index 6caf0fa52b..93f39a33fe 100644 --- a/tests/test_future_annotations.py +++ b/tests/test_future_annotations.py @@ -1,16 +1,16 @@ from __future__ import annotations -from typing import Annotated, Optional +from typing import Annotated from sqlmodel import Field, Session, SQLModel, create_engine, select def test_model_with_future_annotations(clear_sqlmodel): class Hero(SQLModel, table=True): - id: Annotated[Optional[int], Field(primary_key=True)] = None + id: Annotated[int | None, Field(primary_key=True)] = None name: str secret_name: str - age: Optional[int] = None + age: int | None = None hero = Hero(name="Deadpond", secret_name="Dive Wilson", age=25) @@ -35,13 +35,13 @@ class Hero(SQLModel, table=True): def test_model_with_string_annotations(clear_sqlmodel): class Team(SQLModel, table=True): - id: Annotated[Optional[int], Field(primary_key=True)] = None + id: Annotated[int | None, Field(primary_key=True)] = None name: str class Player(SQLModel, table=True): - id: Annotated[Optional[int], Field(primary_key=True)] = None + id: Annotated[int | None, Field(primary_key=True)] = None name: str - team_id: Annotated[Optional[int], Field(foreign_key="team.id")] = None + team_id: Annotated[int | None, Field(foreign_key="team.id")] = None engine = create_engine("sqlite://") SQLModel.metadata.create_all(engine) diff --git a/tests/test_instance_no_args.py b/tests/test_instance_no_args.py index 5c8ad77531..72680dfff9 100644 --- a/tests/test_instance_no_args.py +++ b/tests/test_instance_no_args.py @@ -1,5 +1,3 @@ -from typing import Optional - import pytest from pydantic import ValidationError from sqlmodel import Field, Session, SQLModel, create_engine, select @@ -7,9 +5,9 @@ def test_allow_instantiation_without_arguments(clear_sqlmodel): class Item(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str - description: Optional[str] = None + description: str | None = None engine = create_engine("sqlite:///:memory:") SQLModel.metadata.create_all(engine) @@ -27,9 +25,9 @@ class Item(SQLModel, table=True): def test_not_allow_instantiation_without_arguments_if_not_table(): class Item(SQLModel): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str - description: Optional[str] = None + description: str | None = None with pytest.raises(ValidationError): Item() diff --git a/tests/test_main.py b/tests/test_main.py index 2a862d14b5..fa40b71853 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,4 +1,4 @@ -from typing import Annotated, Optional +from typing import Annotated import pytest from sqlalchemy.exc import IntegrityError @@ -8,10 +8,10 @@ def test_should_allow_duplicate_row_if_unique_constraint_is_not_passed(clear_sqlmodel): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str secret_name: str - age: Optional[int] = None + age: int | None = None hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") hero_2 = Hero(name="Deadpond", secret_name="Dive Wilson") @@ -38,10 +38,10 @@ class Hero(SQLModel, table=True): def test_should_allow_duplicate_row_if_unique_constraint_is_false(clear_sqlmodel): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str secret_name: str = Field(unique=False) - age: Optional[int] = None + age: int | None = None hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") hero_2 = Hero(name="Deadpond", secret_name="Dive Wilson") @@ -70,10 +70,10 @@ def test_should_raise_exception_when_try_to_duplicate_row_if_unique_constraint_i clear_sqlmodel, ): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str secret_name: str = Field(unique=True) - age: Optional[int] = None + age: int | None = None hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") hero_2 = Hero(name="Deadpond", secret_name="Dive Wilson") @@ -97,17 +97,17 @@ def test_sa_relationship_property(clear_sqlmodel): """Test https://github.com/tiangolo/sqlmodel/issues/315#issuecomment-1272122306""" class Team(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(unique=True) heroes: list["Hero"] = Relationship( # noqa: F821 sa_relationship=RelationshipProperty("Hero", back_populates="team") ) class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(unique=True) - team_id: Optional[int] = Field(default=None, foreign_key="team.id") - team: Optional[Team] = Relationship( + team_id: int | None = Field(default=None, foreign_key="team.id") + team: Team | None = Relationship( sa_relationship=RelationshipProperty("Team", back_populates="heroes") ) diff --git a/tests/test_missing_type.py b/tests/test_missing_type.py index ac4aa42e05..9005390d4f 100644 --- a/tests/test_missing_type.py +++ b/tests/test_missing_type.py @@ -1,5 +1,3 @@ -from typing import Optional - import pytest from pydantic import BaseModel from sqlmodel import Field, SQLModel @@ -18,5 +16,5 @@ def validate(cls, v): # pragma: no cover with pytest.raises(ValueError): class Item(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) item: CustomType diff --git a/tests/test_nullable.py b/tests/test_nullable.py index a40bb5b5f0..db028304ab 100644 --- a/tests/test_nullable.py +++ b/tests/test_nullable.py @@ -1,5 +1,3 @@ -from typing import Optional - import pytest from sqlalchemy.exc import IntegrityError from sqlmodel import Field, Session, SQLModel, create_engine @@ -7,41 +5,41 @@ def test_nullable_fields(clear_sqlmodel, caplog): class Hero(SQLModel, table=True): - primary_key: Optional[int] = Field( + primary_key: int | None = Field( default=None, primary_key=True, ) required_value: str - optional_default_ellipsis: Optional[str] = Field(default=...) - optional_default_none: Optional[str] = Field(default=None) - optional_non_nullable: Optional[str] = Field( + optional_default_ellipsis: str | None = Field(default=...) + optional_default_none: str | None = Field(default=None) + optional_non_nullable: str | None = Field( nullable=False, ) - optional_nullable: Optional[str] = Field( + optional_nullable: str | None = Field( nullable=True, ) - optional_default_ellipses_non_nullable: Optional[str] = Field( + optional_default_ellipses_non_nullable: str | None = Field( default=..., nullable=False, ) - optional_default_ellipses_nullable: Optional[str] = Field( + optional_default_ellipses_nullable: str | None = Field( default=..., nullable=True, ) - optional_default_none_non_nullable: Optional[str] = Field( + optional_default_none_non_nullable: str | None = Field( default=None, nullable=False, ) - optional_default_none_nullable: Optional[str] = Field( + optional_default_none_nullable: str | None = Field( default=None, nullable=True, ) default_ellipses_non_nullable: str = Field(default=..., nullable=False) - optional_default_str: Optional[str] = "default" - optional_default_str_non_nullable: Optional[str] = Field( + optional_default_str: str | None = "default" + optional_default_str_non_nullable: str | None = Field( default="default", nullable=False ) - optional_default_str_nullable: Optional[str] = Field( + optional_default_str_nullable: str | None = Field( default="default", nullable=True ) str_default_str: str = "default" @@ -82,12 +80,12 @@ class Hero(SQLModel, table=True): # Test for regression in https://github.com/tiangolo/sqlmodel/issues/420 def test_non_nullable_optional_field_with_no_default_set(clear_sqlmodel, caplog): class Hero(SQLModel, table=True): - primary_key: Optional[int] = Field( + primary_key: int | None = Field( default=None, primary_key=True, ) - optional_non_nullable_no_default: Optional[str] = Field(nullable=False) + optional_non_nullable_no_default: str | None = Field(nullable=False) engine = create_engine("sqlite://", echo=True) SQLModel.metadata.create_all(engine) @@ -110,7 +108,7 @@ class Hero(SQLModel, table=True): def test_nullable_primary_key(clear_sqlmodel, caplog): # Probably the weirdest corner case, it shouldn't happen anywhere, but let's test it class Hero(SQLModel, table=True): - nullable_integer_primary_key: Optional[int] = Field( + nullable_integer_primary_key: int | None = Field( default=None, primary_key=True, nullable=True, diff --git a/tests/test_ondelete_raises.py b/tests/test_ondelete_raises.py index 761b8799a4..c6bc05c06a 100644 --- a/tests/test_ondelete_raises.py +++ b/tests/test_ondelete_raises.py @@ -1,4 +1,4 @@ -from typing import Any, Union +from typing import Any import pytest from sqlmodel import Field, Relationship, SQLModel @@ -8,17 +8,17 @@ def test_ondelete_requires_nullable(clear_sqlmodel: Any) -> None: with pytest.raises(RuntimeError) as exc: class Team(SQLModel, table=True): - id: Union[int, None] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) heroes: list["Hero"] = Relationship( back_populates="team", passive_deletes="all" ) class Hero(SQLModel, table=True): - id: Union[int, None] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) secret_name: str - age: Union[int, None] = Field(default=None, index=True) + age: int | None = Field(default=None, index=True) team_id: int = Field(foreign_key="team.id", ondelete="SET NULL") team: Team = Relationship(back_populates="heroes") @@ -30,7 +30,7 @@ def test_ondelete_requires_foreign_key(clear_sqlmodel: Any) -> None: with pytest.raises(RuntimeError) as exc: class Team(SQLModel, table=True): - id: Union[int, None] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) age: int = Field(ondelete="CASCADE") diff --git a/tests/test_pydantic/test_field.py b/tests/test_pydantic/test_field.py index 140b02fd9b..11f4150d98 100644 --- a/tests/test_pydantic/test_field.py +++ b/tests/test_pydantic/test_field.py @@ -1,5 +1,5 @@ from decimal import Decimal -from typing import Literal, Optional, Union +from typing import Literal import pytest from pydantic import ValidationError @@ -38,7 +38,7 @@ class Lizard(SQLModel): scales: bool class Model(SQLModel): - pet: Union[Cat, Dog, Lizard] = Field(..., discriminator="pet_type") + pet: Cat | Dog | Lizard = Field(..., discriminator="pet_type") n: int Model(pet={"pet_type": "dog", "barks": 3.14}, n=1) # type: ignore[arg-type] @@ -49,7 +49,7 @@ class Model(SQLModel): def test_repr(): class Model(SQLModel): - id: Optional[int] = Field(primary_key=True) + id: int | None = Field(primary_key=True) foo: str = Field(repr=False) instance = Model(id=123, foo="bar") diff --git a/tests/test_query.py b/tests/test_query.py index 88517b92fe..26d35b3c2b 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,15 +1,13 @@ -from typing import Optional - import pytest from sqlmodel import Field, Session, SQLModel, create_engine def test_query(clear_sqlmodel): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str secret_name: str - age: Optional[int] = None + age: int | None = None hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson") diff --git a/tests/test_select_typing.py b/tests/test_select_typing.py index 8f1d030631..315f0efec7 100644 --- a/tests/test_select_typing.py +++ b/tests/test_select_typing.py @@ -1,16 +1,14 @@ -from typing import Optional - from sqlmodel import Field, Session, SQLModel, create_engine, select from sqlmodel.pool import StaticPool def test_fields() -> None: class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) name: str secret_name: str - age: Optional[int] = None - food: Optional[str] = None + age: int | None = None + food: str | None = None engine = create_engine( "sqlite://", connect_args={"check_same_thread": False}, poolclass=StaticPool diff --git a/tests/test_sqlalchemy_type_errors.py b/tests/test_sqlalchemy_type_errors.py index cc3326b5ff..5a40f9c172 100644 --- a/tests/test_sqlalchemy_type_errors.py +++ b/tests/test_sqlalchemy_type_errors.py @@ -1,4 +1,4 @@ -from typing import Any, Optional, Union +from typing import Any import pytest from sqlmodel import Field, SQLModel @@ -8,7 +8,7 @@ def test_type_list_breaks() -> None: with pytest.raises(ValueError): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) tags: list[str] @@ -16,7 +16,7 @@ def test_type_dict_breaks() -> None: with pytest.raises(ValueError): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) + id: int | None = Field(default=None, primary_key=True) tags: dict[str, Any] @@ -24,5 +24,5 @@ def test_type_union_breaks() -> None: with pytest.raises(ValueError): class Hero(SQLModel, table=True): - id: Optional[int] = Field(default=None, primary_key=True) - tags: Union[int, str] + id: int | None = Field(default=None, primary_key=True) + tags: int | str diff --git a/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py index cd285ae438..a7519a5a5d 100644 --- a/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py @@ -1,6 +1,6 @@ import importlib from types import ModuleType -from typing import Any, Union +from typing import Any import pytest from sqlmodel import create_engine @@ -8,7 +8,7 @@ from tests.conftest import PrintMock, needs_py310 -def check_calls(calls: list[list[Union[str, dict[str, Any]]]]) -> None: +def check_calls(calls: list[list[str | dict[str, Any]]]) -> None: assert calls[0] == ["Before interacting with the database"] assert calls[1] == [ "Hero 1:", @@ -138,8 +138,6 @@ def check_calls(calls: list[list[Union[str, dict[str, Any]]]]) -> None: @pytest.fixture( name="module", params=[ - "tutorial001_py39", - "tutorial002_py39", pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial002_py310", marks=needs_py310), ], diff --git a/tests/test_tutorial/test_code_structure/test_tutorial001.py b/tests/test_tutorial/test_code_structure/test_tutorial001.py index aa832f6223..40ef804248 100644 --- a/tests/test_tutorial/test_code_structure/test_tutorial001.py +++ b/tests/test_tutorial/test_code_structure/test_tutorial001.py @@ -34,7 +34,6 @@ class Modules: @pytest.fixture( name="modules", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_code_structure/test_tutorial002.py b/tests/test_tutorial/test_code_structure/test_tutorial002.py index 990d3ecaaa..8ded4f9535 100644 --- a/tests/test_tutorial/test_code_structure/test_tutorial002.py +++ b/tests/test_tutorial/test_code_structure/test_tutorial002.py @@ -34,7 +34,6 @@ class Modules: @pytest.fixture( name="modules", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py b/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py index 66e57debeb..fa1fc91b51 100644 --- a/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py @@ -12,7 +12,6 @@ @pytest.fixture( name="module", params=[ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py b/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py index 7e20767f59..1bd89ab2f0 100644 --- a/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py @@ -63,7 +63,6 @@ @pytest.fixture( name="module", params=[ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py b/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py index c7363a0731..19357320db 100644 --- a/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py @@ -43,7 +43,6 @@ @pytest.fixture( name="module", params=[ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py index 4b141f11d1..9023dc80a1 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py @@ -77,7 +77,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], indirect=True, @@ -90,7 +89,6 @@ def test_tutorial001(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - "tutorial002_py39", pytest.param("tutorial002_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial003.py b/tests/test_tutorial/test_connect/test_select/test_tutorial003.py index 3ded56065c..cdba5c42b8 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial003.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial003.py @@ -79,7 +79,6 @@ @pytest.fixture( name="module", params=[ - "tutorial003_py39", pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial004.py b/tests/test_tutorial/test_connect/test_select/test_tutorial004.py index 7e8240bb09..f39bceaccb 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial004.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial004.py @@ -53,7 +53,6 @@ @pytest.fixture( name="module", params=[ - "tutorial004_py39", pytest.param("tutorial004_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial005.py b/tests/test_tutorial/test_connect/test_select/test_tutorial005.py index 004229a29b..a0539e425c 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial005.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial005.py @@ -55,7 +55,6 @@ @pytest.fixture( name="module", params=[ - "tutorial005_py39", pytest.param("tutorial005_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_connect/test_update/test_tutorial001.py b/tests/test_tutorial/test_connect/test_update/test_tutorial001.py index 7120dce7ed..e46c672824 100644 --- a/tests/test_tutorial/test_connect/test_update/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_update/test_tutorial001.py @@ -53,7 +53,6 @@ @pytest.fixture( name="module", params=[ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py index 3e054bf3eb..6a1b195a4b 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py @@ -8,7 +8,6 @@ @pytest.mark.parametrize( "module_name", [ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py index f92bfee71d..a7f5ee228c 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py @@ -12,7 +12,6 @@ @pytest.fixture( name="module", params=[ - "tutorial002_py39", pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py index e11e0a0472..26afb23a03 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py @@ -12,7 +12,6 @@ @pytest.fixture( name="module", params=[ - "tutorial003_py39", pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py index 5e6c354b3e..8b8a3e586b 100644 --- a/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py @@ -71,7 +71,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], indirect=True, @@ -84,7 +83,6 @@ def test_tutorial001(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - "tutorial002_py39", pytest.param("tutorial002_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py index 71fc72318f..a9c2bad5ff 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py @@ -17,7 +17,6 @@ class Modules: @pytest.fixture( name="modules_path", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py index 73bf080ec7..3afdb05253 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py @@ -17,7 +17,6 @@ class Modules: @pytest.fixture( name="modules_path", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py index 41c4d57301..235a1aba68 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py @@ -17,7 +17,6 @@ class Modules: @pytest.fixture( name="modules_path", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py index ba3a61ad1f..cf3b363261 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py @@ -17,7 +17,6 @@ class Modules: @pytest.fixture( name="modules_path", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py index 5d704ffb57..b8467ee447 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py @@ -3,11 +3,11 @@ import pytest from sqlmodel import Session -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import main as app_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import ( +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310 import ( test_main_005 as test_mod, ) -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39.test_main_005 import ( +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310.test_main_005 import ( session_fixture, ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py index 1d474a7ec8..ae8e702153 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py @@ -4,11 +4,11 @@ from fastapi.testclient import TestClient from sqlmodel import Session -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import main as app_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import ( +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310 import ( test_main_006 as test_mod, ) -from docs_src.tutorial.fastapi.app_testing.tutorial001_py39.test_main_006 import ( +from docs_src.tutorial.fastapi.app_testing.tutorial001_py310.test_main_006 import ( client_fixture, session_fixture, ) diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py index c6d942ea3f..e41d4aca9d 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py @@ -11,7 +11,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py index d3dea79f47..1c036a42bd 100644 --- a/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py index 99f5566360..34ddd2b3fb 100644 --- a/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py index 5e3a956069..9ccdcd9b53 100644 --- a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py @@ -15,7 +15,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py index d8a891ff1b..9806c206be 100644 --- a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py +++ b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py @@ -15,7 +15,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py index 8b22e050c5..19047c7e0f 100644 --- a/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py index 4756ac6c86..62776e7a22 100644 --- a/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py index 77a7fc6f68..16b9f57983 100644 --- a/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py index ffd0381bfb..ba463ccd7e 100644 --- a/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py index 17c69440a8..8a28e2609e 100644 --- a/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py index c770b4718f..49dc413664 100644 --- a/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py index b28ca100b0..f6eef2bae3 100644 --- a/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py b/tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py index 1b784b2f64..6c3c52b5a8 100644 --- a/tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py +++ b/tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py @@ -13,7 +13,6 @@ @pytest.fixture( name="module", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_indexes/test_tutorial001.py b/tests/test_tutorial/test_indexes/test_tutorial001.py index 8f031a8a32..556c522f6b 100644 --- a/tests/test_tutorial/test_indexes/test_tutorial001.py +++ b/tests/test_tutorial/test_indexes/test_tutorial001.py @@ -12,7 +12,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_indexes/test_tutorial002.py b/tests/test_tutorial/test_indexes/test_tutorial002.py index 29b0987a40..b047ebbc03 100644 --- a/tests/test_tutorial/test_indexes/test_tutorial002.py +++ b/tests/test_tutorial/test_indexes/test_tutorial002.py @@ -12,7 +12,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_insert/test_tutorial001.py b/tests/test_tutorial/test_insert/test_tutorial001.py index 6e20feeb15..2c18c5645e 100644 --- a/tests/test_tutorial/test_insert/test_tutorial001.py +++ b/tests/test_tutorial/test_insert/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_insert/test_tutorial002.py b/tests/test_tutorial/test_insert/test_tutorial002.py index b70ac63739..e26cc2387f 100644 --- a/tests/test_tutorial/test_insert/test_tutorial002.py +++ b/tests/test_tutorial/test_insert/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_insert/test_tutorial003.py b/tests/test_tutorial/test_insert/test_tutorial003.py index 902f5519d8..b3a3e35918 100644 --- a/tests/test_tutorial/test_insert/test_tutorial003.py +++ b/tests/test_tutorial/test_insert/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py index b1b581e38e..b1d8456367 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py index 896f2bfcec..c71342a111 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py index 8e9e0b7302..884577911b 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py index 228acd6aac..1a81a3f03c 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial001.py b/tests/test_tutorial/test_many_to_many/test_tutorial001.py index 427fe41895..e60c905981 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial001.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial002.py b/tests/test_tutorial/test_many_to_many/test_tutorial002.py index 7ac120d5ae..cf37f6f62b 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial002.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial003.py b/tests/test_tutorial/test_many_to_many/test_tutorial003.py index 6c14445b03..2f64874c15 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial003.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial001.py b/tests/test_tutorial/test_one/test_tutorial001.py index a4dd986ba0..8b418a60ac 100644 --- a/tests/test_tutorial/test_one/test_tutorial001.py +++ b/tests/test_tutorial/test_one/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial002.py b/tests/test_tutorial/test_one/test_tutorial002.py index 96dda11d2f..230dbc42a9 100644 --- a/tests/test_tutorial/test_one/test_tutorial002.py +++ b/tests/test_tutorial/test_one/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial003.py b/tests/test_tutorial/test_one/test_tutorial003.py index 5de20da912..f79277e467 100644 --- a/tests/test_tutorial/test_one/test_tutorial003.py +++ b/tests/test_tutorial/test_one/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial004.py b/tests/test_tutorial/test_one/test_tutorial004.py index fce8277189..5bf74d0ef6 100644 --- a/tests/test_tutorial/test_one/test_tutorial004.py +++ b/tests/test_tutorial/test_one/test_tutorial004.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial005.py b/tests/test_tutorial/test_one/test_tutorial005.py index a4f7914060..b1c087516f 100644 --- a/tests/test_tutorial/test_one/test_tutorial005.py +++ b/tests/test_tutorial/test_one/test_tutorial005.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial006.py b/tests/test_tutorial/test_one/test_tutorial006.py index 4ae19a5ee2..ac58f0fe42 100644 --- a/tests/test_tutorial/test_one/test_tutorial006.py +++ b/tests/test_tutorial/test_one/test_tutorial006.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial006_py39"), pytest.param("tutorial006_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial007.py b/tests/test_tutorial/test_one/test_tutorial007.py index edf674fef5..a5e54013b6 100644 --- a/tests/test_tutorial/test_one/test_tutorial007.py +++ b/tests/test_tutorial/test_one/test_tutorial007.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial007_py39"), pytest.param("tutorial007_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial008.py b/tests/test_tutorial/test_one/test_tutorial008.py index 5a8e03a2d0..2f1dfb4710 100644 --- a/tests/test_tutorial/test_one/test_tutorial008.py +++ b/tests/test_tutorial/test_one/test_tutorial008.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial008_py39"), pytest.param("tutorial008_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_one/test_tutorial009.py b/tests/test_tutorial/test_one/test_tutorial009.py index bfd1d3a2c3..83b4244bee 100644 --- a/tests/test_tutorial/test_one/test_tutorial009.py +++ b/tests/test_tutorial/test_one/test_tutorial009.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial009_py39"), pytest.param("tutorial009_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py index 208cfb7caa..dc3a1af96a 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py index 65a849f270..8fb5ae6c45 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py index a23800db98..05a075581c 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py @@ -12,7 +12,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py index d73be8f3c3..aa6d1b88fb 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py index 516f3e3843..c1f5c269be 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial001.py index fddaf3d9bf..225e7733ef 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial002.py b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial002.py index 5614c2fecc..774cdb905d 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial002.py +++ b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial003.py b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial003.py index 095062d7d7..99d806c679 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial003.py +++ b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial004.py b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial004.py index fb045d45a7..33af8845e3 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial004.py +++ b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial004.py @@ -11,7 +11,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial005.py b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial005.py index d2170f225c..6b677516aa 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial005.py +++ b/tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial005.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py index 651f44a033..0f9da6179b 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py index 306f3f174b..36d72eca28 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py +++ b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py index 4d28303d7b..6b95a94859 100644 --- a/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py @@ -1,6 +1,6 @@ import importlib from types import ModuleType -from typing import Any, Union +from typing import Any import pytest from sqlmodel import create_engine @@ -8,7 +8,7 @@ from ...conftest import PrintMock, needs_py310 -def check_calls(calls: list[list[Union[str, dict[str, Any]]]]): +def check_calls(calls: list[list[str | dict[str, Any]]]): assert calls[0][0] == { "name": "Deadpond", "secret_name": "Dive Wilson", @@ -40,7 +40,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], indirect=True, @@ -53,7 +52,6 @@ def test_tutorial_001(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_select/test_tutorial003_tutorial004.py b/tests/test_tutorial/test_select/test_tutorial003_tutorial004.py index e8e3daf190..0554fa9a93 100644 --- a/tests/test_tutorial/test_select/test_tutorial003_tutorial004.py +++ b/tests/test_tutorial/test_select/test_tutorial003_tutorial004.py @@ -1,6 +1,6 @@ import importlib from types import ModuleType -from typing import Any, Union +from typing import Any import pytest from sqlmodel import create_engine @@ -8,7 +8,7 @@ from ...conftest import PrintMock, needs_py310 -def check_calls(calls: list[list[Union[str, dict[str, Any]]]]): +def check_calls(calls: list[list[str | dict[str, Any]]]): assert calls[0][0] == [ { "name": "Deadpond", @@ -42,7 +42,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], indirect=True, @@ -55,7 +54,6 @@ def test_tutorial_003(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py index 6f4b05ee1d..60e2fbc8c7 100644 --- a/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py @@ -39,7 +39,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], indirect=True, @@ -52,7 +51,6 @@ def test_tutorial001(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py b/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py index 944b2ebf06..30abec5b34 100644 --- a/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py +++ b/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py @@ -52,7 +52,6 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType: @pytest.mark.parametrize( "module", [ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], indirect=True, @@ -65,7 +64,6 @@ def test_tutorial003(print_mock: PrintMock, module: ModuleType): @pytest.mark.parametrize( "module", [ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], indirect=True, diff --git a/tests/test_tutorial/test_where/test_tutorial001.py b/tests/test_tutorial/test_where/test_tutorial001.py index a6b869d81e..3b30d335d4 100644 --- a/tests/test_tutorial/test_where/test_tutorial001.py +++ b/tests/test_tutorial/test_where/test_tutorial001.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial002.py b/tests/test_tutorial/test_where/test_tutorial002.py index 7c6812fb2b..ed9db58eb7 100644 --- a/tests/test_tutorial/test_where/test_tutorial002.py +++ b/tests/test_tutorial/test_where/test_tutorial002.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial003.py b/tests/test_tutorial/test_where/test_tutorial003.py index 304310a77a..18bdeb2a40 100644 --- a/tests/test_tutorial/test_where/test_tutorial003.py +++ b/tests/test_tutorial/test_where/test_tutorial003.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial004.py b/tests/test_tutorial/test_where/test_tutorial004.py index bace062f67..640f3aa535 100644 --- a/tests/test_tutorial/test_where/test_tutorial004.py +++ b/tests/test_tutorial/test_where/test_tutorial004.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial005.py b/tests/test_tutorial/test_where/test_tutorial005.py index 39f7b1b2bc..37ad55d968 100644 --- a/tests/test_tutorial/test_where/test_tutorial005.py +++ b/tests/test_tutorial/test_where/test_tutorial005.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial006.py b/tests/test_tutorial/test_where/test_tutorial006.py index 9830142ad0..5cc260b71f 100644 --- a/tests/test_tutorial/test_where/test_tutorial006.py +++ b/tests/test_tutorial/test_where/test_tutorial006.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial006_py39"), pytest.param("tutorial006_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial007.py b/tests/test_tutorial/test_where/test_tutorial007.py index c2650193da..664c6ebfc4 100644 --- a/tests/test_tutorial/test_where/test_tutorial007.py +++ b/tests/test_tutorial/test_where/test_tutorial007.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial007_py39"), pytest.param("tutorial007_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial008.py b/tests/test_tutorial/test_where/test_tutorial008.py index ac5ccf0553..a6ef4cd052 100644 --- a/tests/test_tutorial/test_where/test_tutorial008.py +++ b/tests/test_tutorial/test_where/test_tutorial008.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial008_py39"), pytest.param("tutorial008_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial009.py b/tests/test_tutorial/test_where/test_tutorial009.py index 22b359768e..9d80c81b62 100644 --- a/tests/test_tutorial/test_where/test_tutorial009.py +++ b/tests/test_tutorial/test_where/test_tutorial009.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial009_py39"), pytest.param("tutorial009_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_where/test_tutorial010.py b/tests/test_tutorial/test_where/test_tutorial010.py deleted file mode 100644 index 8740de1a7c..0000000000 --- a/tests/test_tutorial/test_where/test_tutorial010.py +++ /dev/null @@ -1,37 +0,0 @@ -import importlib -from types import ModuleType - -import pytest -from sqlmodel import create_engine - -from ...conftest import PrintMock, needs_py310 - - -@pytest.fixture( - name="mod", - params=[ - pytest.param("tutorial010_py39"), - pytest.param("tutorial010_py310", marks=needs_py310), - ], -) -def get_module(request: pytest.FixtureRequest) -> ModuleType: - mod = importlib.import_module(f"docs_src.tutorial.where.{request.param}") - mod.sqlite_url = "sqlite://" - mod.engine = create_engine(mod.sqlite_url) - return mod - - -def test_tutorial(print_mock: PrintMock, mod: ModuleType): - mod.main() - assert print_mock.calls == [ - [{"name": "Tarantula", "secret_name": "Natalia Roman-on", "age": 32, "id": 4}], - [{"name": "Black Lion", "secret_name": "Trevor Challa", "age": 35, "id": 5}], - [ - { - "name": "Captain North America", - "secret_name": "Esteban Rogelios", - "age": 93, - "id": 7, - } - ], - ] diff --git a/tests/test_tutorial/test_where/test_tutorial011.py b/tests/test_tutorial/test_where/test_tutorial011.py index 8131e2adc1..2c048844c1 100644 --- a/tests/test_tutorial/test_where/test_tutorial011.py +++ b/tests/test_tutorial/test_where/test_tutorial011.py @@ -10,7 +10,6 @@ @pytest.fixture( name="mod", params=[ - pytest.param("tutorial011_py39"), pytest.param("tutorial011_py310", marks=needs_py310), ], ) diff --git a/tests/test_validation.py b/tests/test_validation.py index fbea2f7b97..47fbca87c2 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -1,5 +1,3 @@ -from typing import Optional - import pytest from pydantic.error_wrappers import ValidationError from sqlmodel import SQLModel @@ -18,9 +16,9 @@ def test_validation_pydantic_v2(clear_sqlmodel): from pydantic import field_validator class Hero(SQLModel): - name: Optional[str] = None - secret_name: Optional[str] = None - age: Optional[int] = None + name: str | None = None + secret_name: str | None = None + age: int | None = None @field_validator("name", "secret_name", "age") def reject_none(cls, v): diff --git a/uv.lock b/uv.lock index 8475ef301e..b3e5d0b303 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,6 @@ version = 1 revision = 3 -requires-python = ">=3.9" -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version < '3.10'", -] +requires-python = ">=3.10" [[package]] name = "annotated-doc" @@ -61,68 +57,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/02/e3/a4fa1946722c4c7b063cc25043a12d9ce9b4323777f89643be74cef2993c/backrefs-6.1-py39-none-any.whl", hash = "sha256:a9e99b8a4867852cad177a6430e31b0f6e495d65f8c6c134b68c14c3c95bf4b0", size = 381058, upload-time = "2025-11-15T14:52:06.698Z" }, ] -[[package]] -name = "black" -version = "25.11.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "mypy-extensions", marker = "python_full_version < '3.10'" }, - { name = "packaging", marker = "python_full_version < '3.10'" }, - { name = "pathspec", marker = "python_full_version < '3.10'" }, - { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pytokens", marker = "python_full_version < '3.10'" }, - { name = "tomli", marker = "python_full_version < '3.10'" }, - { name = "typing-extensions", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/8c/ad/33adf4708633d047950ff2dfdea2e215d84ac50ef95aff14a614e4b6e9b2/black-25.11.0.tar.gz", hash = "sha256:9a323ac32f5dc75ce7470501b887250be5005a01602e931a15e45593f70f6e08", size = 655669, upload-time = "2025-11-10T01:53:50.558Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b3/d2/6caccbc96f9311e8ec3378c296d4f4809429c43a6cd2394e3c390e86816d/black-25.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ec311e22458eec32a807f029b2646f661e6859c3f61bc6d9ffb67958779f392e", size = 1743501, upload-time = "2025-11-10T01:59:06.202Z" }, - { url = "https://files.pythonhosted.org/packages/69/35/b986d57828b3f3dccbf922e2864223197ba32e74c5004264b1c62bc9f04d/black-25.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1032639c90208c15711334d681de2e24821af0575573db2810b0763bcd62e0f0", size = 1597308, upload-time = "2025-11-10T01:57:58.633Z" }, - { url = "https://files.pythonhosted.org/packages/39/8e/8b58ef4b37073f52b64a7b2dd8c9a96c84f45d6f47d878d0aa557e9a2d35/black-25.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0c0f7c461df55cf32929b002335883946a4893d759f2df343389c4396f3b6b37", size = 1656194, upload-time = "2025-11-10T01:57:10.909Z" }, - { url = "https://files.pythonhosted.org/packages/8d/30/9c2267a7955ecc545306534ab88923769a979ac20a27cf618d370091e5dd/black-25.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:f9786c24d8e9bd5f20dc7a7f0cdd742644656987f6ea6947629306f937726c03", size = 1347996, upload-time = "2025-11-10T01:57:22.391Z" }, - { url = "https://files.pythonhosted.org/packages/c4/62/d304786b75ab0c530b833a89ce7d997924579fb7484ecd9266394903e394/black-25.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:895571922a35434a9d8ca67ef926da6bc9ad464522a5fe0db99b394ef1c0675a", size = 1727891, upload-time = "2025-11-10T02:01:40.507Z" }, - { url = "https://files.pythonhosted.org/packages/82/5d/ffe8a006aa522c9e3f430e7b93568a7b2163f4b3f16e8feb6d8c3552761a/black-25.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cb4f4b65d717062191bdec8e4a442539a8ea065e6af1c4f4d36f0cdb5f71e170", size = 1581875, upload-time = "2025-11-10T01:57:51.192Z" }, - { url = "https://files.pythonhosted.org/packages/cb/c8/7c8bda3108d0bb57387ac41b4abb5c08782b26da9f9c4421ef6694dac01a/black-25.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d81a44cbc7e4f73a9d6ae449ec2317ad81512d1e7dce7d57f6333fd6259737bc", size = 1642716, upload-time = "2025-11-10T01:56:51.589Z" }, - { url = "https://files.pythonhosted.org/packages/34/b9/f17dea34eecb7cc2609a89627d480fb6caea7b86190708eaa7eb15ed25e7/black-25.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:7eebd4744dfe92ef1ee349dc532defbf012a88b087bb7ddd688ff59a447b080e", size = 1352904, upload-time = "2025-11-10T01:59:26.252Z" }, - { url = "https://files.pythonhosted.org/packages/7f/12/5c35e600b515f35ffd737da7febdb2ab66bb8c24d88560d5e3ef3d28c3fd/black-25.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:80e7486ad3535636657aa180ad32a7d67d7c273a80e12f1b4bfa0823d54e8fac", size = 1772831, upload-time = "2025-11-10T02:03:47Z" }, - { url = "https://files.pythonhosted.org/packages/1a/75/b3896bec5a2bb9ed2f989a970ea40e7062f8936f95425879bbe162746fe5/black-25.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6cced12b747c4c76bc09b4db057c319d8545307266f41aaee665540bc0e04e96", size = 1608520, upload-time = "2025-11-10T01:58:46.895Z" }, - { url = "https://files.pythonhosted.org/packages/f3/b5/2bfc18330eddbcfb5aab8d2d720663cd410f51b2ed01375f5be3751595b0/black-25.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cb2d54a39e0ef021d6c5eef442e10fd71fcb491be6413d083a320ee768329dd", size = 1682719, upload-time = "2025-11-10T01:56:55.24Z" }, - { url = "https://files.pythonhosted.org/packages/96/fb/f7dc2793a22cdf74a72114b5ed77fe3349a2e09ef34565857a2f917abdf2/black-25.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae263af2f496940438e5be1a0c1020e13b09154f3af4df0835ea7f9fe7bfa409", size = 1362684, upload-time = "2025-11-10T01:57:07.639Z" }, - { url = "https://files.pythonhosted.org/packages/ad/47/3378d6a2ddefe18553d1115e36aea98f4a90de53b6a3017ed861ba1bd3bc/black-25.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0a1d40348b6621cc20d3d7530a5b8d67e9714906dfd7346338249ad9c6cedf2b", size = 1772446, upload-time = "2025-11-10T02:02:16.181Z" }, - { url = "https://files.pythonhosted.org/packages/ba/4b/0f00bfb3d1f7e05e25bfc7c363f54dc523bb6ba502f98f4ad3acf01ab2e4/black-25.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:51c65d7d60bb25429ea2bf0731c32b2a2442eb4bd3b2afcb47830f0b13e58bfd", size = 1607983, upload-time = "2025-11-10T02:02:52.502Z" }, - { url = "https://files.pythonhosted.org/packages/99/fe/49b0768f8c9ae57eb74cc10a1f87b4c70453551d8ad498959721cc345cb7/black-25.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:936c4dd07669269f40b497440159a221ee435e3fddcf668e0c05244a9be71993", size = 1682481, upload-time = "2025-11-10T01:57:12.35Z" }, - { url = "https://files.pythonhosted.org/packages/55/17/7e10ff1267bfa950cc16f0a411d457cdff79678fbb77a6c73b73a5317904/black-25.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:f42c0ea7f59994490f4dccd64e6b2dd49ac57c7c84f38b8faab50f8759db245c", size = 1363869, upload-time = "2025-11-10T01:58:24.608Z" }, - { url = "https://files.pythonhosted.org/packages/67/c0/cc865ce594d09e4cd4dfca5e11994ebb51604328489f3ca3ae7bb38a7db5/black-25.11.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:35690a383f22dd3e468c85dc4b915217f87667ad9cce781d7b42678ce63c4170", size = 1771358, upload-time = "2025-11-10T02:03:33.331Z" }, - { url = "https://files.pythonhosted.org/packages/37/77/4297114d9e2fd2fc8ab0ab87192643cd49409eb059e2940391e7d2340e57/black-25.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:dae49ef7369c6caa1a1833fd5efb7c3024bb7e4499bf64833f65ad27791b1545", size = 1612902, upload-time = "2025-11-10T01:59:33.382Z" }, - { url = "https://files.pythonhosted.org/packages/de/63/d45ef97ada84111e330b2b2d45e1dd163e90bd116f00ac55927fb6bf8adb/black-25.11.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bd4a22a0b37401c8e492e994bce79e614f91b14d9ea911f44f36e262195fdda", size = 1680571, upload-time = "2025-11-10T01:57:04.239Z" }, - { url = "https://files.pythonhosted.org/packages/ff/4b/5604710d61cdff613584028b4cb4607e56e148801ed9b38ee7970799dab6/black-25.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:aa211411e94fdf86519996b7f5f05e71ba34835d8f0c0f03c00a26271da02664", size = 1382599, upload-time = "2025-11-10T01:57:57.427Z" }, - { url = "https://files.pythonhosted.org/packages/d5/9a/5b2c0e3215fe748fcf515c2dd34658973a1210bf610e24de5ba887e4f1c8/black-25.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3bb5ce32daa9ff0605d73b6f19da0b0e6c1f8f2d75594db539fdfed722f2b06", size = 1743063, upload-time = "2025-11-10T02:02:43.175Z" }, - { url = "https://files.pythonhosted.org/packages/a1/20/245164c6efc27333409c62ba54dcbfbe866c6d1957c9a6c0647786e950da/black-25.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9815ccee1e55717fe9a4b924cae1646ef7f54e0f990da39a34fc7b264fcf80a2", size = 1596867, upload-time = "2025-11-10T02:00:17.157Z" }, - { url = "https://files.pythonhosted.org/packages/ca/6f/1a3859a7da205f3d50cf3a8bec6bdc551a91c33ae77a045bb24c1f46ab54/black-25.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92285c37b93a1698dcbc34581867b480f1ba3a7b92acf1fe0467b04d7a4da0dc", size = 1655678, upload-time = "2025-11-10T01:57:09.028Z" }, - { url = "https://files.pythonhosted.org/packages/56/1a/6dec1aeb7be90753d4fcc273e69bc18bfd34b353223ed191da33f7519410/black-25.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:43945853a31099c7c0ff8dface53b4de56c41294fa6783c0441a8b1d9bf668bc", size = 1347452, upload-time = "2025-11-10T01:57:01.871Z" }, - { url = "https://files.pythonhosted.org/packages/00/5d/aed32636ed30a6e7f9efd6ad14e2a0b0d687ae7c8c7ec4e4a557174b895c/black-25.11.0-py3-none-any.whl", hash = "sha256:e3f562da087791e96cefcd9dda058380a442ab322a02e222add53736451f604b", size = 204918, upload-time = "2025-11-10T01:53:48.917Z" }, -] - [[package]] name = "black" version = "25.12.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "mypy-extensions", marker = "python_full_version >= '3.10'" }, - { name = "packaging", marker = "python_full_version >= '3.10'" }, - { name = "pathspec", marker = "python_full_version >= '3.10'" }, - { name = "platformdirs", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "pytokens", marker = "python_full_version >= '3.10'" }, - { name = "tomli", marker = "python_full_version == '3.10.*'" }, - { name = "typing-extensions", marker = "python_full_version == '3.10.*'" }, + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, + { name = "pytokens" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/c4/d9/07b458a3f1c525ac392b5edc6b191ff140b596f9d77092429417a54e249d/black-25.12.0.tar.gz", hash = "sha256:8d3dd9cea14bff7ddc0eb243c811cdb1a011ebb4800a5f0335a01a68654796a7", size = 659264, upload-time = "2025-12-08T01:40:52.501Z" } wheels = [ @@ -175,8 +122,7 @@ dependencies = [ { name = "cssselect2" }, { name = "defusedxml" }, { name = "pillow" }, - { name = "tinycss2", version = "1.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "tinycss2", version = "1.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "tinycss2" }, ] sdist = { url = "https://files.pythonhosted.org/packages/ab/b9/5106168bd43d7cd8b7cc2a2ee465b385f14b63f4c092bb89eee2d48c8e67/cairosvg-2.8.2.tar.gz", hash = "sha256:07cbf4e86317b27a92318a4cac2a4bb37a5e9c1b8a27355d06874b22f85bef9f", size = 8398590, upload-time = "2025-05-15T06:56:32.653Z" } wheels = [ @@ -272,39 +218,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, - { url = "https://files.pythonhosted.org/packages/c0/cc/08ed5a43f2996a16b462f64a7055c6e962803534924b9b2f1371d8c00b7b/cffi-2.0.0-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf", size = 184288, upload-time = "2025-09-08T23:23:48.404Z" }, - { url = "https://files.pythonhosted.org/packages/3d/de/38d9726324e127f727b4ecc376bc85e505bfe61ef130eaf3f290c6847dd4/cffi-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7", size = 180509, upload-time = "2025-09-08T23:23:49.73Z" }, - { url = "https://files.pythonhosted.org/packages/9b/13/c92e36358fbcc39cf0962e83223c9522154ee8630e1df7c0b3a39a8124e2/cffi-2.0.0-cp39-cp39-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c", size = 208813, upload-time = "2025-09-08T23:23:51.263Z" }, - { url = "https://files.pythonhosted.org/packages/15/12/a7a79bd0df4c3bff744b2d7e52cc1b68d5e7e427b384252c42366dc1ecbc/cffi-2.0.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165", size = 216498, upload-time = "2025-09-08T23:23:52.494Z" }, - { url = "https://files.pythonhosted.org/packages/a3/ad/5c51c1c7600bdd7ed9a24a203ec255dccdd0ebf4527f7b922a0bde2fb6ed/cffi-2.0.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534", size = 203243, upload-time = "2025-09-08T23:23:53.836Z" }, - { url = "https://files.pythonhosted.org/packages/32/f2/81b63e288295928739d715d00952c8c6034cb6c6a516b17d37e0c8be5600/cffi-2.0.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f", size = 203158, upload-time = "2025-09-08T23:23:55.169Z" }, - { url = "https://files.pythonhosted.org/packages/1f/74/cc4096ce66f5939042ae094e2e96f53426a979864aa1f96a621ad128be27/cffi-2.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63", size = 216548, upload-time = "2025-09-08T23:23:56.506Z" }, - { url = "https://files.pythonhosted.org/packages/e8/be/f6424d1dc46b1091ffcc8964fa7c0ab0cd36839dd2761b49c90481a6ba1b/cffi-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2", size = 218897, upload-time = "2025-09-08T23:23:57.825Z" }, - { url = "https://files.pythonhosted.org/packages/f7/e0/dda537c2309817edf60109e39265f24f24aa7f050767e22c98c53fe7f48b/cffi-2.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65", size = 211249, upload-time = "2025-09-08T23:23:59.139Z" }, - { url = "https://files.pythonhosted.org/packages/2b/e7/7c769804eb75e4c4b35e658dba01de1640a351a9653c3d49ca89d16ccc91/cffi-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322", size = 218041, upload-time = "2025-09-08T23:24:00.496Z" }, - { url = "https://files.pythonhosted.org/packages/aa/d9/6218d78f920dcd7507fc16a766b5ef8f3b913cc7aa938e7fc80b9978d089/cffi-2.0.0-cp39-cp39-win32.whl", hash = "sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a", size = 172138, upload-time = "2025-09-08T23:24:01.7Z" }, - { url = "https://files.pythonhosted.org/packages/54/8f/a1e836f82d8e32a97e6b29cc8f641779181ac7363734f12df27db803ebda/cffi-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9", size = 182794, upload-time = "2025-09-08T23:24:02.943Z" }, -] - -[[package]] -name = "cfgv" -version = "3.4.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114, upload-time = "2023-08-12T20:38:17.776Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" }, ] [[package]] name = "cfgv" version = "3.5.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/4e/b5/721b8799b04bf9afe054a3899c6cf4e880fcf8563cc71c15610242490a0c/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132", size = 7334, upload-time = "2025-11-19T20:55:51.612Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" }, @@ -396,49 +315,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" }, { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" }, { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" }, - { url = "https://files.pythonhosted.org/packages/46/7c/0c4760bccf082737ca7ab84a4c2034fcc06b1f21cf3032ea98bd6feb1725/charset_normalizer-3.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9", size = 209609, upload-time = "2025-10-14T04:42:10.922Z" }, - { url = "https://files.pythonhosted.org/packages/bb/a4/69719daef2f3d7f1819de60c9a6be981b8eeead7542d5ec4440f3c80e111/charset_normalizer-3.4.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d", size = 149029, upload-time = "2025-10-14T04:42:12.38Z" }, - { url = "https://files.pythonhosted.org/packages/e6/21/8d4e1d6c1e6070d3672908b8e4533a71b5b53e71d16828cc24d0efec564c/charset_normalizer-3.4.4-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608", size = 144580, upload-time = "2025-10-14T04:42:13.549Z" }, - { url = "https://files.pythonhosted.org/packages/a7/0a/a616d001b3f25647a9068e0b9199f697ce507ec898cacb06a0d5a1617c99/charset_normalizer-3.4.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc", size = 162340, upload-time = "2025-10-14T04:42:14.892Z" }, - { url = "https://files.pythonhosted.org/packages/85/93/060b52deb249a5450460e0585c88a904a83aec474ab8e7aba787f45e79f2/charset_normalizer-3.4.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e", size = 159619, upload-time = "2025-10-14T04:42:16.676Z" }, - { url = "https://files.pythonhosted.org/packages/dd/21/0274deb1cc0632cd587a9a0ec6b4674d9108e461cb4cd40d457adaeb0564/charset_normalizer-3.4.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1", size = 153980, upload-time = "2025-10-14T04:42:17.917Z" }, - { url = "https://files.pythonhosted.org/packages/28/2b/e3d7d982858dccc11b31906976323d790dded2017a0572f093ff982d692f/charset_normalizer-3.4.4-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3", size = 152174, upload-time = "2025-10-14T04:42:19.018Z" }, - { url = "https://files.pythonhosted.org/packages/6e/ff/4a269f8e35f1e58b2df52c131a1fa019acb7ef3f8697b7d464b07e9b492d/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6", size = 151666, upload-time = "2025-10-14T04:42:20.171Z" }, - { url = "https://files.pythonhosted.org/packages/da/c9/ec39870f0b330d58486001dd8e532c6b9a905f5765f58a6f8204926b4a93/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88", size = 145550, upload-time = "2025-10-14T04:42:21.324Z" }, - { url = "https://files.pythonhosted.org/packages/75/8f/d186ab99e40e0ed9f82f033d6e49001701c81244d01905dd4a6924191a30/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1", size = 163721, upload-time = "2025-10-14T04:42:22.46Z" }, - { url = "https://files.pythonhosted.org/packages/96/b1/6047663b9744df26a7e479ac1e77af7134b1fcf9026243bb48ee2d18810f/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf", size = 152127, upload-time = "2025-10-14T04:42:23.712Z" }, - { url = "https://files.pythonhosted.org/packages/59/78/e5a6eac9179f24f704d1be67d08704c3c6ab9f00963963524be27c18ed87/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318", size = 161175, upload-time = "2025-10-14T04:42:24.87Z" }, - { url = "https://files.pythonhosted.org/packages/e5/43/0e626e42d54dd2f8dd6fc5e1c5ff00f05fbca17cb699bedead2cae69c62f/charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c", size = 155375, upload-time = "2025-10-14T04:42:27.246Z" }, - { url = "https://files.pythonhosted.org/packages/e9/91/d9615bf2e06f35e4997616ff31248c3657ed649c5ab9d35ea12fce54e380/charset_normalizer-3.4.4-cp39-cp39-win32.whl", hash = "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505", size = 99692, upload-time = "2025-10-14T04:42:28.425Z" }, - { url = "https://files.pythonhosted.org/packages/d1/a9/6c040053909d9d1ef4fcab45fddec083aedc9052c10078339b47c8573ea8/charset_normalizer-3.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966", size = 107192, upload-time = "2025-10-14T04:42:29.482Z" }, - { url = "https://files.pythonhosted.org/packages/f0/c6/4fa536b2c0cd3edfb7ccf8469fa0f363ea67b7213a842b90909ca33dd851/charset_normalizer-3.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50", size = 100220, upload-time = "2025-10-14T04:42:30.632Z" }, { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, ] -[[package]] -name = "click" -version = "8.1.8" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "colorama", marker = "python_full_version < '3.10' and sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593, upload-time = "2024-12-21T18:38:44.339Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188, upload-time = "2024-12-21T18:38:41.666Z" }, -] - [[package]] name = "click" version = "8.3.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "colorama", marker = "python_full_version >= '3.10' and sys_platform == 'win32'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } wheels = [ @@ -454,132 +339,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] -[[package]] -name = "coverage" -version = "7.10.7" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/51/26/d22c300112504f5f9a9fd2297ce33c35f3d353e4aeb987c8419453b2a7c2/coverage-7.10.7.tar.gz", hash = "sha256:f4ab143ab113be368a3e9b795f9cd7906c5ef407d6173fe9675a902e1fffc239", size = 827704, upload-time = "2025-09-21T20:03:56.815Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e5/6c/3a3f7a46888e69d18abe3ccc6fe4cb16cccb1e6a2f99698931dafca489e6/coverage-7.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fc04cc7a3db33664e0c2d10eb8990ff6b3536f6842c9590ae8da4c614b9ed05a", size = 217987, upload-time = "2025-09-21T20:00:57.218Z" }, - { url = "https://files.pythonhosted.org/packages/03/94/952d30f180b1a916c11a56f5c22d3535e943aa22430e9e3322447e520e1c/coverage-7.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e201e015644e207139f7e2351980feb7040e6f4b2c2978892f3e3789d1c125e5", size = 218388, upload-time = "2025-09-21T20:01:00.081Z" }, - { url = "https://files.pythonhosted.org/packages/50/2b/9e0cf8ded1e114bcd8b2fd42792b57f1c4e9e4ea1824cde2af93a67305be/coverage-7.10.7-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:240af60539987ced2c399809bd34f7c78e8abe0736af91c3d7d0e795df633d17", size = 245148, upload-time = "2025-09-21T20:01:01.768Z" }, - { url = "https://files.pythonhosted.org/packages/19/20/d0384ac06a6f908783d9b6aa6135e41b093971499ec488e47279f5b846e6/coverage-7.10.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8421e088bc051361b01c4b3a50fd39a4b9133079a2229978d9d30511fd05231b", size = 246958, upload-time = "2025-09-21T20:01:03.355Z" }, - { url = "https://files.pythonhosted.org/packages/60/83/5c283cff3d41285f8eab897651585db908a909c572bdc014bcfaf8a8b6ae/coverage-7.10.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6be8ed3039ae7f7ac5ce058c308484787c86e8437e72b30bf5e88b8ea10f3c87", size = 248819, upload-time = "2025-09-21T20:01:04.968Z" }, - { url = "https://files.pythonhosted.org/packages/60/22/02eb98fdc5ff79f423e990d877693e5310ae1eab6cb20ae0b0b9ac45b23b/coverage-7.10.7-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e28299d9f2e889e6d51b1f043f58d5f997c373cc12e6403b90df95b8b047c13e", size = 245754, upload-time = "2025-09-21T20:01:06.321Z" }, - { url = "https://files.pythonhosted.org/packages/b4/bc/25c83bcf3ad141b32cd7dc45485ef3c01a776ca3aa8ef0a93e77e8b5bc43/coverage-7.10.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c4e16bd7761c5e454f4efd36f345286d6f7c5fa111623c355691e2755cae3b9e", size = 246860, upload-time = "2025-09-21T20:01:07.605Z" }, - { url = "https://files.pythonhosted.org/packages/3c/b7/95574702888b58c0928a6e982038c596f9c34d52c5e5107f1eef729399b5/coverage-7.10.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b1c81d0e5e160651879755c9c675b974276f135558cf4ba79fee7b8413a515df", size = 244877, upload-time = "2025-09-21T20:01:08.829Z" }, - { url = "https://files.pythonhosted.org/packages/47/b6/40095c185f235e085df0e0b158f6bd68cc6e1d80ba6c7721dc81d97ec318/coverage-7.10.7-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:606cc265adc9aaedcc84f1f064f0e8736bc45814f15a357e30fca7ecc01504e0", size = 245108, upload-time = "2025-09-21T20:01:10.527Z" }, - { url = "https://files.pythonhosted.org/packages/c8/50/4aea0556da7a4b93ec9168420d170b55e2eb50ae21b25062513d020c6861/coverage-7.10.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:10b24412692df990dbc34f8fb1b6b13d236ace9dfdd68df5b28c2e39cafbba13", size = 245752, upload-time = "2025-09-21T20:01:11.857Z" }, - { url = "https://files.pythonhosted.org/packages/6a/28/ea1a84a60828177ae3b100cb6723838523369a44ec5742313ed7db3da160/coverage-7.10.7-cp310-cp310-win32.whl", hash = "sha256:b51dcd060f18c19290d9b8a9dd1e0181538df2ce0717f562fff6cf74d9fc0b5b", size = 220497, upload-time = "2025-09-21T20:01:13.459Z" }, - { url = "https://files.pythonhosted.org/packages/fc/1a/a81d46bbeb3c3fd97b9602ebaa411e076219a150489bcc2c025f151bd52d/coverage-7.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:3a622ac801b17198020f09af3eaf45666b344a0d69fc2a6ffe2ea83aeef1d807", size = 221392, upload-time = "2025-09-21T20:01:14.722Z" }, - { url = "https://files.pythonhosted.org/packages/d2/5d/c1a17867b0456f2e9ce2d8d4708a4c3a089947d0bec9c66cdf60c9e7739f/coverage-7.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a609f9c93113be646f44c2a0256d6ea375ad047005d7f57a5c15f614dc1b2f59", size = 218102, upload-time = "2025-09-21T20:01:16.089Z" }, - { url = "https://files.pythonhosted.org/packages/54/f0/514dcf4b4e3698b9a9077f084429681bf3aad2b4a72578f89d7f643eb506/coverage-7.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:65646bb0359386e07639c367a22cf9b5bf6304e8630b565d0626e2bdf329227a", size = 218505, upload-time = "2025-09-21T20:01:17.788Z" }, - { url = "https://files.pythonhosted.org/packages/20/f6/9626b81d17e2a4b25c63ac1b425ff307ecdeef03d67c9a147673ae40dc36/coverage-7.10.7-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5f33166f0dfcce728191f520bd2692914ec70fac2713f6bf3ce59c3deacb4699", size = 248898, upload-time = "2025-09-21T20:01:19.488Z" }, - { url = "https://files.pythonhosted.org/packages/b0/ef/bd8e719c2f7417ba03239052e099b76ea1130ac0cbb183ee1fcaa58aaff3/coverage-7.10.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:35f5e3f9e455bb17831876048355dca0f758b6df22f49258cb5a91da23ef437d", size = 250831, upload-time = "2025-09-21T20:01:20.817Z" }, - { url = "https://files.pythonhosted.org/packages/a5/b6/bf054de41ec948b151ae2b79a55c107f5760979538f5fb80c195f2517718/coverage-7.10.7-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4da86b6d62a496e908ac2898243920c7992499c1712ff7c2b6d837cc69d9467e", size = 252937, upload-time = "2025-09-21T20:01:22.171Z" }, - { url = "https://files.pythonhosted.org/packages/0f/e5/3860756aa6f9318227443c6ce4ed7bf9e70bb7f1447a0353f45ac5c7974b/coverage-7.10.7-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6b8b09c1fad947c84bbbc95eca841350fad9cbfa5a2d7ca88ac9f8d836c92e23", size = 249021, upload-time = "2025-09-21T20:01:23.907Z" }, - { url = "https://files.pythonhosted.org/packages/26/0f/bd08bd042854f7fd07b45808927ebcce99a7ed0f2f412d11629883517ac2/coverage-7.10.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4376538f36b533b46f8971d3a3e63464f2c7905c9800db97361c43a2b14792ab", size = 250626, upload-time = "2025-09-21T20:01:25.721Z" }, - { url = "https://files.pythonhosted.org/packages/8e/a7/4777b14de4abcc2e80c6b1d430f5d51eb18ed1d75fca56cbce5f2db9b36e/coverage-7.10.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:121da30abb574f6ce6ae09840dae322bef734480ceafe410117627aa54f76d82", size = 248682, upload-time = "2025-09-21T20:01:27.105Z" }, - { url = "https://files.pythonhosted.org/packages/34/72/17d082b00b53cd45679bad682fac058b87f011fd8b9fe31d77f5f8d3a4e4/coverage-7.10.7-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:88127d40df529336a9836870436fc2751c339fbaed3a836d42c93f3e4bd1d0a2", size = 248402, upload-time = "2025-09-21T20:01:28.629Z" }, - { url = "https://files.pythonhosted.org/packages/81/7a/92367572eb5bdd6a84bfa278cc7e97db192f9f45b28c94a9ca1a921c3577/coverage-7.10.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ba58bbcd1b72f136080c0bccc2400d66cc6115f3f906c499013d065ac33a4b61", size = 249320, upload-time = "2025-09-21T20:01:30.004Z" }, - { url = "https://files.pythonhosted.org/packages/2f/88/a23cc185f6a805dfc4fdf14a94016835eeb85e22ac3a0e66d5e89acd6462/coverage-7.10.7-cp311-cp311-win32.whl", hash = "sha256:972b9e3a4094b053a4e46832b4bc829fc8a8d347160eb39d03f1690316a99c14", size = 220536, upload-time = "2025-09-21T20:01:32.184Z" }, - { url = "https://files.pythonhosted.org/packages/fe/ef/0b510a399dfca17cec7bc2f05ad8bd78cf55f15c8bc9a73ab20c5c913c2e/coverage-7.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:a7b55a944a7f43892e28ad4bc0561dfd5f0d73e605d1aa5c3c976b52aea121d2", size = 221425, upload-time = "2025-09-21T20:01:33.557Z" }, - { url = "https://files.pythonhosted.org/packages/51/7f/023657f301a276e4ba1850f82749bc136f5a7e8768060c2e5d9744a22951/coverage-7.10.7-cp311-cp311-win_arm64.whl", hash = "sha256:736f227fb490f03c6488f9b6d45855f8e0fd749c007f9303ad30efab0e73c05a", size = 220103, upload-time = "2025-09-21T20:01:34.929Z" }, - { url = "https://files.pythonhosted.org/packages/13/e4/eb12450f71b542a53972d19117ea5a5cea1cab3ac9e31b0b5d498df1bd5a/coverage-7.10.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7bb3b9ddb87ef7725056572368040c32775036472d5a033679d1fa6c8dc08417", size = 218290, upload-time = "2025-09-21T20:01:36.455Z" }, - { url = "https://files.pythonhosted.org/packages/37/66/593f9be12fc19fb36711f19a5371af79a718537204d16ea1d36f16bd78d2/coverage-7.10.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:18afb24843cbc175687225cab1138c95d262337f5473512010e46831aa0c2973", size = 218515, upload-time = "2025-09-21T20:01:37.982Z" }, - { url = "https://files.pythonhosted.org/packages/66/80/4c49f7ae09cafdacc73fbc30949ffe77359635c168f4e9ff33c9ebb07838/coverage-7.10.7-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:399a0b6347bcd3822be369392932884b8216d0944049ae22925631a9b3d4ba4c", size = 250020, upload-time = "2025-09-21T20:01:39.617Z" }, - { url = "https://files.pythonhosted.org/packages/a6/90/a64aaacab3b37a17aaedd83e8000142561a29eb262cede42d94a67f7556b/coverage-7.10.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:314f2c326ded3f4b09be11bc282eb2fc861184bc95748ae67b360ac962770be7", size = 252769, upload-time = "2025-09-21T20:01:41.341Z" }, - { url = "https://files.pythonhosted.org/packages/98/2e/2dda59afd6103b342e096f246ebc5f87a3363b5412609946c120f4e7750d/coverage-7.10.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c41e71c9cfb854789dee6fc51e46743a6d138b1803fab6cb860af43265b42ea6", size = 253901, upload-time = "2025-09-21T20:01:43.042Z" }, - { url = "https://files.pythonhosted.org/packages/53/dc/8d8119c9051d50f3119bb4a75f29f1e4a6ab9415cd1fa8bf22fcc3fb3b5f/coverage-7.10.7-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc01f57ca26269c2c706e838f6422e2a8788e41b3e3c65e2f41148212e57cd59", size = 250413, upload-time = "2025-09-21T20:01:44.469Z" }, - { url = "https://files.pythonhosted.org/packages/98/b3/edaff9c5d79ee4d4b6d3fe046f2b1d799850425695b789d491a64225d493/coverage-7.10.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a6442c59a8ac8b85812ce33bc4d05bde3fb22321fa8294e2a5b487c3505f611b", size = 251820, upload-time = "2025-09-21T20:01:45.915Z" }, - { url = "https://files.pythonhosted.org/packages/11/25/9a0728564bb05863f7e513e5a594fe5ffef091b325437f5430e8cfb0d530/coverage-7.10.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:78a384e49f46b80fb4c901d52d92abe098e78768ed829c673fbb53c498bef73a", size = 249941, upload-time = "2025-09-21T20:01:47.296Z" }, - { url = "https://files.pythonhosted.org/packages/e0/fd/ca2650443bfbef5b0e74373aac4df67b08180d2f184b482c41499668e258/coverage-7.10.7-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:5e1e9802121405ede4b0133aa4340ad8186a1d2526de5b7c3eca519db7bb89fb", size = 249519, upload-time = "2025-09-21T20:01:48.73Z" }, - { url = "https://files.pythonhosted.org/packages/24/79/f692f125fb4299b6f963b0745124998ebb8e73ecdfce4ceceb06a8c6bec5/coverage-7.10.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d41213ea25a86f69efd1575073d34ea11aabe075604ddf3d148ecfec9e1e96a1", size = 251375, upload-time = "2025-09-21T20:01:50.529Z" }, - { url = "https://files.pythonhosted.org/packages/5e/75/61b9bbd6c7d24d896bfeec57acba78e0f8deac68e6baf2d4804f7aae1f88/coverage-7.10.7-cp312-cp312-win32.whl", hash = "sha256:77eb4c747061a6af8d0f7bdb31f1e108d172762ef579166ec84542f711d90256", size = 220699, upload-time = "2025-09-21T20:01:51.941Z" }, - { url = "https://files.pythonhosted.org/packages/ca/f3/3bf7905288b45b075918d372498f1cf845b5b579b723c8fd17168018d5f5/coverage-7.10.7-cp312-cp312-win_amd64.whl", hash = "sha256:f51328ffe987aecf6d09f3cd9d979face89a617eacdaea43e7b3080777f647ba", size = 221512, upload-time = "2025-09-21T20:01:53.481Z" }, - { url = "https://files.pythonhosted.org/packages/5c/44/3e32dbe933979d05cf2dac5e697c8599cfe038aaf51223ab901e208d5a62/coverage-7.10.7-cp312-cp312-win_arm64.whl", hash = "sha256:bda5e34f8a75721c96085903c6f2197dc398c20ffd98df33f866a9c8fd95f4bf", size = 220147, upload-time = "2025-09-21T20:01:55.2Z" }, - { url = "https://files.pythonhosted.org/packages/9a/94/b765c1abcb613d103b64fcf10395f54d69b0ef8be6a0dd9c524384892cc7/coverage-7.10.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:981a651f543f2854abd3b5fcb3263aac581b18209be49863ba575de6edf4c14d", size = 218320, upload-time = "2025-09-21T20:01:56.629Z" }, - { url = "https://files.pythonhosted.org/packages/72/4f/732fff31c119bb73b35236dd333030f32c4bfe909f445b423e6c7594f9a2/coverage-7.10.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:73ab1601f84dc804f7812dc297e93cd99381162da39c47040a827d4e8dafe63b", size = 218575, upload-time = "2025-09-21T20:01:58.203Z" }, - { url = "https://files.pythonhosted.org/packages/87/02/ae7e0af4b674be47566707777db1aa375474f02a1d64b9323e5813a6cdd5/coverage-7.10.7-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a8b6f03672aa6734e700bbcd65ff050fd19cddfec4b031cc8cf1c6967de5a68e", size = 249568, upload-time = "2025-09-21T20:01:59.748Z" }, - { url = "https://files.pythonhosted.org/packages/a2/77/8c6d22bf61921a59bce5471c2f1f7ac30cd4ac50aadde72b8c48d5727902/coverage-7.10.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10b6ba00ab1132a0ce4428ff68cf50a25efd6840a42cdf4239c9b99aad83be8b", size = 252174, upload-time = "2025-09-21T20:02:01.192Z" }, - { url = "https://files.pythonhosted.org/packages/b1/20/b6ea4f69bbb52dac0aebd62157ba6a9dddbfe664f5af8122dac296c3ee15/coverage-7.10.7-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c79124f70465a150e89340de5963f936ee97097d2ef76c869708c4248c63ca49", size = 253447, upload-time = "2025-09-21T20:02:02.701Z" }, - { url = "https://files.pythonhosted.org/packages/f9/28/4831523ba483a7f90f7b259d2018fef02cb4d5b90bc7c1505d6e5a84883c/coverage-7.10.7-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:69212fbccdbd5b0e39eac4067e20a4a5256609e209547d86f740d68ad4f04911", size = 249779, upload-time = "2025-09-21T20:02:04.185Z" }, - { url = "https://files.pythonhosted.org/packages/a7/9f/4331142bc98c10ca6436d2d620c3e165f31e6c58d43479985afce6f3191c/coverage-7.10.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7ea7c6c9d0d286d04ed3541747e6597cbe4971f22648b68248f7ddcd329207f0", size = 251604, upload-time = "2025-09-21T20:02:06.034Z" }, - { url = "https://files.pythonhosted.org/packages/ce/60/bda83b96602036b77ecf34e6393a3836365481b69f7ed7079ab85048202b/coverage-7.10.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b9be91986841a75042b3e3243d0b3cb0b2434252b977baaf0cd56e960fe1e46f", size = 249497, upload-time = "2025-09-21T20:02:07.619Z" }, - { url = "https://files.pythonhosted.org/packages/5f/af/152633ff35b2af63977edd835d8e6430f0caef27d171edf2fc76c270ef31/coverage-7.10.7-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:b281d5eca50189325cfe1f365fafade89b14b4a78d9b40b05ddd1fc7d2a10a9c", size = 249350, upload-time = "2025-09-21T20:02:10.34Z" }, - { url = "https://files.pythonhosted.org/packages/9d/71/d92105d122bd21cebba877228990e1646d862e34a98bb3374d3fece5a794/coverage-7.10.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:99e4aa63097ab1118e75a848a28e40d68b08a5e19ce587891ab7fd04475e780f", size = 251111, upload-time = "2025-09-21T20:02:12.122Z" }, - { url = "https://files.pythonhosted.org/packages/a2/9e/9fdb08f4bf476c912f0c3ca292e019aab6712c93c9344a1653986c3fd305/coverage-7.10.7-cp313-cp313-win32.whl", hash = "sha256:dc7c389dce432500273eaf48f410b37886be9208b2dd5710aaf7c57fd442c698", size = 220746, upload-time = "2025-09-21T20:02:13.919Z" }, - { url = "https://files.pythonhosted.org/packages/b1/b1/a75fd25df44eab52d1931e89980d1ada46824c7a3210be0d3c88a44aaa99/coverage-7.10.7-cp313-cp313-win_amd64.whl", hash = "sha256:cac0fdca17b036af3881a9d2729a850b76553f3f716ccb0360ad4dbc06b3b843", size = 221541, upload-time = "2025-09-21T20:02:15.57Z" }, - { url = "https://files.pythonhosted.org/packages/14/3a/d720d7c989562a6e9a14b2c9f5f2876bdb38e9367126d118495b89c99c37/coverage-7.10.7-cp313-cp313-win_arm64.whl", hash = "sha256:4b6f236edf6e2f9ae8fcd1332da4e791c1b6ba0dc16a2dc94590ceccb482e546", size = 220170, upload-time = "2025-09-21T20:02:17.395Z" }, - { url = "https://files.pythonhosted.org/packages/bb/22/e04514bf2a735d8b0add31d2b4ab636fc02370730787c576bb995390d2d5/coverage-7.10.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a0ec07fd264d0745ee396b666d47cef20875f4ff2375d7c4f58235886cc1ef0c", size = 219029, upload-time = "2025-09-21T20:02:18.936Z" }, - { url = "https://files.pythonhosted.org/packages/11/0b/91128e099035ece15da3445d9015e4b4153a6059403452d324cbb0a575fa/coverage-7.10.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:dd5e856ebb7bfb7672b0086846db5afb4567a7b9714b8a0ebafd211ec7ce6a15", size = 219259, upload-time = "2025-09-21T20:02:20.44Z" }, - { url = "https://files.pythonhosted.org/packages/8b/51/66420081e72801536a091a0c8f8c1f88a5c4bf7b9b1bdc6222c7afe6dc9b/coverage-7.10.7-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f57b2a3c8353d3e04acf75b3fed57ba41f5c0646bbf1d10c7c282291c97936b4", size = 260592, upload-time = "2025-09-21T20:02:22.313Z" }, - { url = "https://files.pythonhosted.org/packages/5d/22/9b8d458c2881b22df3db5bb3e7369e63d527d986decb6c11a591ba2364f7/coverage-7.10.7-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1ef2319dd15a0b009667301a3f84452a4dc6fddfd06b0c5c53ea472d3989fbf0", size = 262768, upload-time = "2025-09-21T20:02:24.287Z" }, - { url = "https://files.pythonhosted.org/packages/f7/08/16bee2c433e60913c610ea200b276e8eeef084b0d200bdcff69920bd5828/coverage-7.10.7-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83082a57783239717ceb0ad584de3c69cf581b2a95ed6bf81ea66034f00401c0", size = 264995, upload-time = "2025-09-21T20:02:26.133Z" }, - { url = "https://files.pythonhosted.org/packages/20/9d/e53eb9771d154859b084b90201e5221bca7674ba449a17c101a5031d4054/coverage-7.10.7-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50aa94fb1fb9a397eaa19c0d5ec15a5edd03a47bf1a3a6111a16b36e190cff65", size = 259546, upload-time = "2025-09-21T20:02:27.716Z" }, - { url = "https://files.pythonhosted.org/packages/ad/b0/69bc7050f8d4e56a89fb550a1577d5d0d1db2278106f6f626464067b3817/coverage-7.10.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2120043f147bebb41c85b97ac45dd173595ff14f2a584f2963891cbcc3091541", size = 262544, upload-time = "2025-09-21T20:02:29.216Z" }, - { url = "https://files.pythonhosted.org/packages/ef/4b/2514b060dbd1bc0aaf23b852c14bb5818f244c664cb16517feff6bb3a5ab/coverage-7.10.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2fafd773231dd0378fdba66d339f84904a8e57a262f583530f4f156ab83863e6", size = 260308, upload-time = "2025-09-21T20:02:31.226Z" }, - { url = "https://files.pythonhosted.org/packages/54/78/7ba2175007c246d75e496f64c06e94122bdb914790a1285d627a918bd271/coverage-7.10.7-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:0b944ee8459f515f28b851728ad224fa2d068f1513ef6b7ff1efafeb2185f999", size = 258920, upload-time = "2025-09-21T20:02:32.823Z" }, - { url = "https://files.pythonhosted.org/packages/c0/b3/fac9f7abbc841409b9a410309d73bfa6cfb2e51c3fada738cb607ce174f8/coverage-7.10.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4b583b97ab2e3efe1b3e75248a9b333bd3f8b0b1b8e5b45578e05e5850dfb2c2", size = 261434, upload-time = "2025-09-21T20:02:34.86Z" }, - { url = "https://files.pythonhosted.org/packages/ee/51/a03bec00d37faaa891b3ff7387192cef20f01604e5283a5fabc95346befa/coverage-7.10.7-cp313-cp313t-win32.whl", hash = "sha256:2a78cd46550081a7909b3329e2266204d584866e8d97b898cd7fb5ac8d888b1a", size = 221403, upload-time = "2025-09-21T20:02:37.034Z" }, - { url = "https://files.pythonhosted.org/packages/53/22/3cf25d614e64bf6d8e59c7c669b20d6d940bb337bdee5900b9ca41c820bb/coverage-7.10.7-cp313-cp313t-win_amd64.whl", hash = "sha256:33a5e6396ab684cb43dc7befa386258acb2d7fae7f67330ebb85ba4ea27938eb", size = 222469, upload-time = "2025-09-21T20:02:39.011Z" }, - { url = "https://files.pythonhosted.org/packages/49/a1/00164f6d30d8a01c3c9c48418a7a5be394de5349b421b9ee019f380df2a0/coverage-7.10.7-cp313-cp313t-win_arm64.whl", hash = "sha256:86b0e7308289ddde73d863b7683f596d8d21c7d8664ce1dee061d0bcf3fbb4bb", size = 220731, upload-time = "2025-09-21T20:02:40.939Z" }, - { url = "https://files.pythonhosted.org/packages/23/9c/5844ab4ca6a4dd97a1850e030a15ec7d292b5c5cb93082979225126e35dd/coverage-7.10.7-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b06f260b16ead11643a5a9f955bd4b5fd76c1a4c6796aeade8520095b75de520", size = 218302, upload-time = "2025-09-21T20:02:42.527Z" }, - { url = "https://files.pythonhosted.org/packages/f0/89/673f6514b0961d1f0e20ddc242e9342f6da21eaba3489901b565c0689f34/coverage-7.10.7-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:212f8f2e0612778f09c55dd4872cb1f64a1f2b074393d139278ce902064d5b32", size = 218578, upload-time = "2025-09-21T20:02:44.468Z" }, - { url = "https://files.pythonhosted.org/packages/05/e8/261cae479e85232828fb17ad536765c88dd818c8470aca690b0ac6feeaa3/coverage-7.10.7-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3445258bcded7d4aa630ab8296dea4d3f15a255588dd535f980c193ab6b95f3f", size = 249629, upload-time = "2025-09-21T20:02:46.503Z" }, - { url = "https://files.pythonhosted.org/packages/82/62/14ed6546d0207e6eda876434e3e8475a3e9adbe32110ce896c9e0c06bb9a/coverage-7.10.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bb45474711ba385c46a0bfe696c695a929ae69ac636cda8f532be9e8c93d720a", size = 252162, upload-time = "2025-09-21T20:02:48.689Z" }, - { url = "https://files.pythonhosted.org/packages/ff/49/07f00db9ac6478e4358165a08fb41b469a1b053212e8a00cb02f0d27a05f/coverage-7.10.7-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:813922f35bd800dca9994c5971883cbc0d291128a5de6b167c7aa697fcf59360", size = 253517, upload-time = "2025-09-21T20:02:50.31Z" }, - { url = "https://files.pythonhosted.org/packages/a2/59/c5201c62dbf165dfbc91460f6dbbaa85a8b82cfa6131ac45d6c1bfb52deb/coverage-7.10.7-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:93c1b03552081b2a4423091d6fb3787265b8f86af404cff98d1b5342713bdd69", size = 249632, upload-time = "2025-09-21T20:02:51.971Z" }, - { url = "https://files.pythonhosted.org/packages/07/ae/5920097195291a51fb00b3a70b9bbd2edbfe3c84876a1762bd1ef1565ebc/coverage-7.10.7-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:cc87dd1b6eaf0b848eebb1c86469b9f72a1891cb42ac7adcfbce75eadb13dd14", size = 251520, upload-time = "2025-09-21T20:02:53.858Z" }, - { url = "https://files.pythonhosted.org/packages/b9/3c/a815dde77a2981f5743a60b63df31cb322c944843e57dbd579326625a413/coverage-7.10.7-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:39508ffda4f343c35f3236fe8d1a6634a51f4581226a1262769d7f970e73bffe", size = 249455, upload-time = "2025-09-21T20:02:55.807Z" }, - { url = "https://files.pythonhosted.org/packages/aa/99/f5cdd8421ea656abefb6c0ce92556709db2265c41e8f9fc6c8ae0f7824c9/coverage-7.10.7-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:925a1edf3d810537c5a3abe78ec5530160c5f9a26b1f4270b40e62cc79304a1e", size = 249287, upload-time = "2025-09-21T20:02:57.784Z" }, - { url = "https://files.pythonhosted.org/packages/c3/7a/e9a2da6a1fc5d007dd51fca083a663ab930a8c4d149c087732a5dbaa0029/coverage-7.10.7-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2c8b9a0636f94c43cd3576811e05b89aa9bc2d0a85137affc544ae5cb0e4bfbd", size = 250946, upload-time = "2025-09-21T20:02:59.431Z" }, - { url = "https://files.pythonhosted.org/packages/ef/5b/0b5799aa30380a949005a353715095d6d1da81927d6dbed5def2200a4e25/coverage-7.10.7-cp314-cp314-win32.whl", hash = "sha256:b7b8288eb7cdd268b0304632da8cb0bb93fadcfec2fe5712f7b9cc8f4d487be2", size = 221009, upload-time = "2025-09-21T20:03:01.324Z" }, - { url = "https://files.pythonhosted.org/packages/da/b0/e802fbb6eb746de006490abc9bb554b708918b6774b722bb3a0e6aa1b7de/coverage-7.10.7-cp314-cp314-win_amd64.whl", hash = "sha256:1ca6db7c8807fb9e755d0379ccc39017ce0a84dcd26d14b5a03b78563776f681", size = 221804, upload-time = "2025-09-21T20:03:03.4Z" }, - { url = "https://files.pythonhosted.org/packages/9e/e8/71d0c8e374e31f39e3389bb0bd19e527d46f00ea8571ec7ec8fd261d8b44/coverage-7.10.7-cp314-cp314-win_arm64.whl", hash = "sha256:097c1591f5af4496226d5783d036bf6fd6cd0cbc132e071b33861de756efb880", size = 220384, upload-time = "2025-09-21T20:03:05.111Z" }, - { url = "https://files.pythonhosted.org/packages/62/09/9a5608d319fa3eba7a2019addeacb8c746fb50872b57a724c9f79f146969/coverage-7.10.7-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:a62c6ef0d50e6de320c270ff91d9dd0a05e7250cac2a800b7784bae474506e63", size = 219047, upload-time = "2025-09-21T20:03:06.795Z" }, - { url = "https://files.pythonhosted.org/packages/f5/6f/f58d46f33db9f2e3647b2d0764704548c184e6f5e014bef528b7f979ef84/coverage-7.10.7-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:9fa6e4dd51fe15d8738708a973470f67a855ca50002294852e9571cdbd9433f2", size = 219266, upload-time = "2025-09-21T20:03:08.495Z" }, - { url = "https://files.pythonhosted.org/packages/74/5c/183ffc817ba68e0b443b8c934c8795553eb0c14573813415bd59941ee165/coverage-7.10.7-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8fb190658865565c549b6b4706856d6a7b09302c797eb2cf8e7fe9dabb043f0d", size = 260767, upload-time = "2025-09-21T20:03:10.172Z" }, - { url = "https://files.pythonhosted.org/packages/0f/48/71a8abe9c1ad7e97548835e3cc1adbf361e743e9d60310c5f75c9e7bf847/coverage-7.10.7-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:affef7c76a9ef259187ef31599a9260330e0335a3011732c4b9effa01e1cd6e0", size = 262931, upload-time = "2025-09-21T20:03:11.861Z" }, - { url = "https://files.pythonhosted.org/packages/84/fd/193a8fb132acfc0a901f72020e54be5e48021e1575bb327d8ee1097a28fd/coverage-7.10.7-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e16e07d85ca0cf8bafe5f5d23a0b850064e8e945d5677492b06bbe6f09cc699", size = 265186, upload-time = "2025-09-21T20:03:13.539Z" }, - { url = "https://files.pythonhosted.org/packages/b1/8f/74ecc30607dd95ad50e3034221113ccb1c6d4e8085cc761134782995daae/coverage-7.10.7-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:03ffc58aacdf65d2a82bbeb1ffe4d01ead4017a21bfd0454983b88ca73af94b9", size = 259470, upload-time = "2025-09-21T20:03:15.584Z" }, - { url = "https://files.pythonhosted.org/packages/0f/55/79ff53a769f20d71b07023ea115c9167c0bb56f281320520cf64c5298a96/coverage-7.10.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1b4fd784344d4e52647fd7857b2af5b3fbe6c239b0b5fa63e94eb67320770e0f", size = 262626, upload-time = "2025-09-21T20:03:17.673Z" }, - { url = "https://files.pythonhosted.org/packages/88/e2/dac66c140009b61ac3fc13af673a574b00c16efdf04f9b5c740703e953c0/coverage-7.10.7-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0ebbaddb2c19b71912c6f2518e791aa8b9f054985a0769bdb3a53ebbc765c6a1", size = 260386, upload-time = "2025-09-21T20:03:19.36Z" }, - { url = "https://files.pythonhosted.org/packages/a2/f1/f48f645e3f33bb9ca8a496bc4a9671b52f2f353146233ebd7c1df6160440/coverage-7.10.7-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:a2d9a3b260cc1d1dbdb1c582e63ddcf5363426a1a68faa0f5da28d8ee3c722a0", size = 258852, upload-time = "2025-09-21T20:03:21.007Z" }, - { url = "https://files.pythonhosted.org/packages/bb/3b/8442618972c51a7affeead957995cfa8323c0c9bcf8fa5a027421f720ff4/coverage-7.10.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a3cc8638b2480865eaa3926d192e64ce6c51e3d29c849e09d5b4ad95efae5399", size = 261534, upload-time = "2025-09-21T20:03:23.12Z" }, - { url = "https://files.pythonhosted.org/packages/b2/dc/101f3fa3a45146db0cb03f5b4376e24c0aac818309da23e2de0c75295a91/coverage-7.10.7-cp314-cp314t-win32.whl", hash = "sha256:67f8c5cbcd3deb7a60b3345dffc89a961a484ed0af1f6f73de91705cc6e31235", size = 221784, upload-time = "2025-09-21T20:03:24.769Z" }, - { url = "https://files.pythonhosted.org/packages/4c/a1/74c51803fc70a8a40d7346660379e144be772bab4ac7bb6e6b905152345c/coverage-7.10.7-cp314-cp314t-win_amd64.whl", hash = "sha256:e1ed71194ef6dea7ed2d5cb5f7243d4bcd334bfb63e59878519be558078f848d", size = 222905, upload-time = "2025-09-21T20:03:26.93Z" }, - { url = "https://files.pythonhosted.org/packages/12/65/f116a6d2127df30bcafbceef0302d8a64ba87488bf6f73a6d8eebf060873/coverage-7.10.7-cp314-cp314t-win_arm64.whl", hash = "sha256:7fe650342addd8524ca63d77b2362b02345e5f1a093266787d210c70a50b471a", size = 220922, upload-time = "2025-09-21T20:03:28.672Z" }, - { url = "https://files.pythonhosted.org/packages/a3/ad/d1c25053764b4c42eb294aae92ab617d2e4f803397f9c7c8295caa77a260/coverage-7.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fff7b9c3f19957020cac546c70025331113d2e61537f6e2441bc7657913de7d3", size = 217978, upload-time = "2025-09-21T20:03:30.362Z" }, - { url = "https://files.pythonhosted.org/packages/52/2f/b9f9daa39b80ece0b9548bbb723381e29bc664822d9a12c2135f8922c22b/coverage-7.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bc91b314cef27742da486d6839b677b3f2793dfe52b51bbbb7cf736d5c29281c", size = 218370, upload-time = "2025-09-21T20:03:32.147Z" }, - { url = "https://files.pythonhosted.org/packages/dd/6e/30d006c3b469e58449650642383dddf1c8fb63d44fdf92994bfd46570695/coverage-7.10.7-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:567f5c155eda8df1d3d439d40a45a6a5f029b429b06648235f1e7e51b522b396", size = 244802, upload-time = "2025-09-21T20:03:33.919Z" }, - { url = "https://files.pythonhosted.org/packages/b0/49/8a070782ce7e6b94ff6a0b6d7c65ba6bc3091d92a92cef4cd4eb0767965c/coverage-7.10.7-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2af88deffcc8a4d5974cf2d502251bc3b2db8461f0b66d80a449c33757aa9f40", size = 246625, upload-time = "2025-09-21T20:03:36.09Z" }, - { url = "https://files.pythonhosted.org/packages/6a/92/1c1c5a9e8677ce56d42b97bdaca337b2d4d9ebe703d8c174ede52dbabd5f/coverage-7.10.7-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7315339eae3b24c2d2fa1ed7d7a38654cba34a13ef19fbcb9425da46d3dc594", size = 248399, upload-time = "2025-09-21T20:03:38.342Z" }, - { url = "https://files.pythonhosted.org/packages/c0/54/b140edee7257e815de7426d5d9846b58505dffc29795fff2dfb7f8a1c5a0/coverage-7.10.7-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:912e6ebc7a6e4adfdbb1aec371ad04c68854cd3bf3608b3514e7ff9062931d8a", size = 245142, upload-time = "2025-09-21T20:03:40.591Z" }, - { url = "https://files.pythonhosted.org/packages/e4/9e/6d6b8295940b118e8b7083b29226c71f6154f7ff41e9ca431f03de2eac0d/coverage-7.10.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f49a05acd3dfe1ce9715b657e28d138578bc40126760efb962322c56e9ca344b", size = 246284, upload-time = "2025-09-21T20:03:42.355Z" }, - { url = "https://files.pythonhosted.org/packages/db/e5/5e957ca747d43dbe4d9714358375c7546cb3cb533007b6813fc20fce37ad/coverage-7.10.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cce2109b6219f22ece99db7644b9622f54a4e915dad65660ec435e89a3ea7cc3", size = 244353, upload-time = "2025-09-21T20:03:44.218Z" }, - { url = "https://files.pythonhosted.org/packages/9a/45/540fc5cc92536a1b783b7ef99450bd55a4b3af234aae35a18a339973ce30/coverage-7.10.7-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:f3c887f96407cea3916294046fc7dab611c2552beadbed4ea901cbc6a40cc7a0", size = 244430, upload-time = "2025-09-21T20:03:46.065Z" }, - { url = "https://files.pythonhosted.org/packages/75/0b/8287b2e5b38c8fe15d7e3398849bb58d382aedc0864ea0fa1820e8630491/coverage-7.10.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:635adb9a4507c9fd2ed65f39693fa31c9a3ee3a8e6dc64df033e8fdf52a7003f", size = 245311, upload-time = "2025-09-21T20:03:48.19Z" }, - { url = "https://files.pythonhosted.org/packages/0c/1d/29724999984740f0c86d03e6420b942439bf5bd7f54d4382cae386a9d1e9/coverage-7.10.7-cp39-cp39-win32.whl", hash = "sha256:5a02d5a850e2979b0a014c412573953995174743a3f7fa4ea5a6e9a3c5617431", size = 220500, upload-time = "2025-09-21T20:03:50.024Z" }, - { url = "https://files.pythonhosted.org/packages/43/11/4b1e6b129943f905ca54c339f343877b55b365ae2558806c1be4f7476ed5/coverage-7.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:c134869d5ffe34547d14e174c866fd8fe2254918cc0a95e99052903bc1543e07", size = 221408, upload-time = "2025-09-21T20:03:51.803Z" }, - { url = "https://files.pythonhosted.org/packages/ec/16/114df1c291c22cac3b0c127a73e0af5c12ed7bbb6558d310429a0ae24023/coverage-7.10.7-py3-none-any.whl", hash = "sha256:f7941f6f2fe6dd6807a1208737b8a0cbcf1cc6d7b07d24998ad2d63590868260", size = 209952, upload-time = "2025-09-21T20:03:53.918Z" }, -] - -[package.optional-dependencies] -toml = [ - { name = "tomli", marker = "python_full_version < '3.10'" }, -] - [[package]] name = "coverage" version = "7.13.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/b6/45/2c665ca77ec32ad67e25c77daf1cee28ee4558f3bc571cdbaf88a00b9f23/coverage-7.13.0.tar.gz", hash = "sha256:a394aa27f2d7ff9bc04cf703817773a59ad6dfbd577032e690f961d2460ee936", size = 820905, upload-time = "2025-12-08T13:14:38.055Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/db/08/bdd7ccca14096f7eb01412b87ac11e5d16e4cb54b6e328afc9dee8bdaec1/coverage-7.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:02d9fb9eccd48f6843c98a37bd6817462f130b86da8660461e8f5e54d4c06070", size = 217979, upload-time = "2025-12-08T13:12:14.505Z" }, @@ -677,7 +440,7 @@ wheels = [ [package.optional-dependencies] toml = [ - { name = "tomli", marker = "python_full_version >= '3.10' and python_full_version <= '3.11'" }, + { name = "tomli", marker = "python_full_version <= '3.11'" }, ] [[package]] @@ -750,8 +513,7 @@ name = "cssselect2" version = "0.8.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "tinycss2", version = "1.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "tinycss2", version = "1.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "tinycss2" }, { name = "webencodings" }, ] sdist = { url = "https://files.pythonhosted.org/packages/9f/86/fd7f58fc498b3166f3a7e8e0cddb6e620fe1da35b02248b1bd59e95dbaaa/cssselect2-0.8.0.tar.gz", hash = "sha256:7674ffb954a3b46162392aee2a3a0aedb2e14ecf99fcc28644900f4e6e3e9d3a", size = 35716, upload-time = "2025-03-05T14:46:07.988Z" } @@ -814,8 +576,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-doc" }, { name = "pydantic" }, - { name = "starlette", version = "0.49.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "starlette", version = "0.50.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "starlette" }, { name = "typing-extensions" }, { name = "typing-inspection" }, ] @@ -824,25 +585,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9f/37/37b07e276f8923c69a5df266bfcb5bac4ba8b55dfe4a126720f8c48681d1/fastapi-0.128.8-py3-none-any.whl", hash = "sha256:5618f492d0fe973a778f8fec97723f598aa9deee495040a8d51aaf3cf123ecf1", size = 103630, upload-time = "2026-02-11T15:19:35.209Z" }, ] -[[package]] -name = "filelock" -version = "3.19.1" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/40/bb/0ab3e58d22305b6f5440629d20683af28959bf793d98d11950e305c1c326/filelock-3.19.1.tar.gz", hash = "sha256:66eda1888b0171c998b35be2bcc0f6d75c388a7ce20c3f3f37aa8e96c2dddf58", size = 17687, upload-time = "2025-08-14T16:56:03.016Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/14/42b2651a2f46b022ccd948bca9f2d5af0fd8929c4eec235b8d6d844fbe67/filelock-3.19.1-py3-none-any.whl", hash = "sha256:d38e30481def20772f5baf097c122c3babc4fcdb7e14e57049eb9d88c6dc017d", size = 15988, upload-time = "2025-08-14T16:56:01.633Z" }, -] - [[package]] name = "filelock" version = "3.20.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/a7/23/ce7a1126827cedeb958fc043d61745754464eb56c5937c35bbf2b8e26f34/filelock-3.20.1.tar.gz", hash = "sha256:b8360948b351b80f420878d8516519a2204b07aefcdcfd24912a5d33127f188c", size = 19476, upload-time = "2025-12-15T23:54:28.027Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/e3/7f/a1a97644e39e7316d850784c642093c99df1290a460df4ede27659056834/filelock-3.20.1-py3-none-any.whl", hash = "sha256:15d9e9a67306188a44baa72f569d2bfd803076269365fdea0934385da4dc361a", size = 16666, upload-time = "2025-12-15T23:54:26.874Z" }, @@ -860,89 +606,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619", size = 11034, upload-time = "2022-05-02T15:47:14.552Z" }, ] -[[package]] -name = "greenlet" -version = "3.2.4" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz", hash = "sha256:0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d", size = 188260, upload-time = "2025-08-07T13:24:33.51Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7d/ed/6bfa4109fcb23a58819600392564fea69cdc6551ffd5e69ccf1d52a40cbc/greenlet-3.2.4-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:8c68325b0d0acf8d91dde4e6f930967dd52a5302cd4062932a6b2e7c2969f47c", size = 271061, upload-time = "2025-08-07T13:17:15.373Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fc/102ec1a2fc015b3a7652abab7acf3541d58c04d3d17a8d3d6a44adae1eb1/greenlet-3.2.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:94385f101946790ae13da500603491f04a76b6e4c059dab271b3ce2e283b2590", size = 629475, upload-time = "2025-08-07T13:42:54.009Z" }, - { url = "https://files.pythonhosted.org/packages/c5/26/80383131d55a4ac0fb08d71660fd77e7660b9db6bdb4e8884f46d9f2cc04/greenlet-3.2.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f10fd42b5ee276335863712fa3da6608e93f70629c631bf77145021600abc23c", size = 640802, upload-time = "2025-08-07T13:45:25.52Z" }, - { url = "https://files.pythonhosted.org/packages/9f/7c/e7833dbcd8f376f3326bd728c845d31dcde4c84268d3921afcae77d90d08/greenlet-3.2.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c8c9e331e58180d0d83c5b7999255721b725913ff6bc6cf39fa2a45841a4fd4b", size = 636703, upload-time = "2025-08-07T13:53:12.622Z" }, - { url = "https://files.pythonhosted.org/packages/e9/49/547b93b7c0428ede7b3f309bc965986874759f7d89e4e04aeddbc9699acb/greenlet-3.2.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:58b97143c9cc7b86fc458f215bd0932f1757ce649e05b640fea2e79b54cedb31", size = 635417, upload-time = "2025-08-07T13:18:25.189Z" }, - { url = "https://files.pythonhosted.org/packages/7f/91/ae2eb6b7979e2f9b035a9f612cf70f1bf54aad4e1d125129bef1eae96f19/greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d", size = 584358, upload-time = "2025-08-07T13:18:23.708Z" }, - { url = "https://files.pythonhosted.org/packages/f7/85/433de0c9c0252b22b16d413c9407e6cb3b41df7389afc366ca204dbc1393/greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5", size = 1113550, upload-time = "2025-08-07T13:42:37.467Z" }, - { url = "https://files.pythonhosted.org/packages/a1/8d/88f3ebd2bc96bf7747093696f4335a0a8a4c5acfcf1b757717c0d2474ba3/greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f", size = 1137126, upload-time = "2025-08-07T13:18:20.239Z" }, - { url = "https://files.pythonhosted.org/packages/f1/29/74242b7d72385e29bcc5563fba67dad94943d7cd03552bac320d597f29b2/greenlet-3.2.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f47617f698838ba98f4ff4189aef02e7343952df3a615f847bb575c3feb177a7", size = 1544904, upload-time = "2025-11-04T12:42:04.763Z" }, - { url = "https://files.pythonhosted.org/packages/c8/e2/1572b8eeab0f77df5f6729d6ab6b141e4a84ee8eb9bc8c1e7918f94eda6d/greenlet-3.2.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af41be48a4f60429d5cad9d22175217805098a9ef7c40bfef44f7669fb9d74d8", size = 1611228, upload-time = "2025-11-04T12:42:08.423Z" }, - { url = "https://files.pythonhosted.org/packages/d6/6f/b60b0291d9623c496638c582297ead61f43c4b72eef5e9c926ef4565ec13/greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c", size = 298654, upload-time = "2025-08-07T13:50:00.469Z" }, - { url = "https://files.pythonhosted.org/packages/a4/de/f28ced0a67749cac23fecb02b694f6473f47686dff6afaa211d186e2ef9c/greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2", size = 272305, upload-time = "2025-08-07T13:15:41.288Z" }, - { url = "https://files.pythonhosted.org/packages/09/16/2c3792cba130000bf2a31c5272999113f4764fd9d874fb257ff588ac779a/greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246", size = 632472, upload-time = "2025-08-07T13:42:55.044Z" }, - { url = "https://files.pythonhosted.org/packages/ae/8f/95d48d7e3d433e6dae5b1682e4292242a53f22df82e6d3dda81b1701a960/greenlet-3.2.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:94abf90142c2a18151632371140b3dba4dee031633fe614cb592dbb6c9e17bc3", size = 644646, upload-time = "2025-08-07T13:45:26.523Z" }, - { url = "https://files.pythonhosted.org/packages/d5/5e/405965351aef8c76b8ef7ad370e5da58d57ef6068df197548b015464001a/greenlet-3.2.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:4d1378601b85e2e5171b99be8d2dc85f594c79967599328f95c1dc1a40f1c633", size = 640519, upload-time = "2025-08-07T13:53:13.928Z" }, - { url = "https://files.pythonhosted.org/packages/25/5d/382753b52006ce0218297ec1b628e048c4e64b155379331f25a7316eb749/greenlet-3.2.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0db5594dce18db94f7d1650d7489909b57afde4c580806b8d9203b6e79cdc079", size = 639707, upload-time = "2025-08-07T13:18:27.146Z" }, - { url = "https://files.pythonhosted.org/packages/1f/8e/abdd3f14d735b2929290a018ecf133c901be4874b858dd1c604b9319f064/greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8", size = 587684, upload-time = "2025-08-07T13:18:25.164Z" }, - { url = "https://files.pythonhosted.org/packages/5d/65/deb2a69c3e5996439b0176f6651e0052542bb6c8f8ec2e3fba97c9768805/greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52", size = 1116647, upload-time = "2025-08-07T13:42:38.655Z" }, - { url = "https://files.pythonhosted.org/packages/3f/cc/b07000438a29ac5cfb2194bfc128151d52f333cee74dd7dfe3fb733fc16c/greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa", size = 1142073, upload-time = "2025-08-07T13:18:21.737Z" }, - { url = "https://files.pythonhosted.org/packages/67/24/28a5b2fa42d12b3d7e5614145f0bd89714c34c08be6aabe39c14dd52db34/greenlet-3.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9c6de1940a7d828635fbd254d69db79e54619f165ee7ce32fda763a9cb6a58c", size = 1548385, upload-time = "2025-11-04T12:42:11.067Z" }, - { url = "https://files.pythonhosted.org/packages/6a/05/03f2f0bdd0b0ff9a4f7b99333d57b53a7709c27723ec8123056b084e69cd/greenlet-3.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03c5136e7be905045160b1b9fdca93dd6727b180feeafda6818e6496434ed8c5", size = 1613329, upload-time = "2025-11-04T12:42:12.928Z" }, - { url = "https://files.pythonhosted.org/packages/d8/0f/30aef242fcab550b0b3520b8e3561156857c94288f0332a79928c31a52cf/greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9", size = 299100, upload-time = "2025-08-07T13:44:12.287Z" }, - { url = "https://files.pythonhosted.org/packages/44/69/9b804adb5fd0671f367781560eb5eb586c4d495277c93bde4307b9e28068/greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd", size = 274079, upload-time = "2025-08-07T13:15:45.033Z" }, - { url = "https://files.pythonhosted.org/packages/46/e9/d2a80c99f19a153eff70bc451ab78615583b8dac0754cfb942223d2c1a0d/greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb", size = 640997, upload-time = "2025-08-07T13:42:56.234Z" }, - { url = "https://files.pythonhosted.org/packages/3b/16/035dcfcc48715ccd345f3a93183267167cdd162ad123cd93067d86f27ce4/greenlet-3.2.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f28588772bb5fb869a8eb331374ec06f24a83a9c25bfa1f38b6993afe9c1e968", size = 655185, upload-time = "2025-08-07T13:45:27.624Z" }, - { url = "https://files.pythonhosted.org/packages/31/da/0386695eef69ffae1ad726881571dfe28b41970173947e7c558d9998de0f/greenlet-3.2.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:5c9320971821a7cb77cfab8d956fa8e39cd07ca44b6070db358ceb7f8797c8c9", size = 649926, upload-time = "2025-08-07T13:53:15.251Z" }, - { url = "https://files.pythonhosted.org/packages/68/88/69bf19fd4dc19981928ceacbc5fd4bb6bc2215d53199e367832e98d1d8fe/greenlet-3.2.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c60a6d84229b271d44b70fb6e5fa23781abb5d742af7b808ae3f6efd7c9c60f6", size = 651839, upload-time = "2025-08-07T13:18:30.281Z" }, - { url = "https://files.pythonhosted.org/packages/19/0d/6660d55f7373b2ff8152401a83e02084956da23ae58cddbfb0b330978fe9/greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0", size = 607586, upload-time = "2025-08-07T13:18:28.544Z" }, - { url = "https://files.pythonhosted.org/packages/8e/1a/c953fdedd22d81ee4629afbb38d2f9d71e37d23caace44775a3a969147d4/greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0", size = 1123281, upload-time = "2025-08-07T13:42:39.858Z" }, - { url = "https://files.pythonhosted.org/packages/3f/c7/12381b18e21aef2c6bd3a636da1088b888b97b7a0362fac2e4de92405f97/greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f", size = 1151142, upload-time = "2025-08-07T13:18:22.981Z" }, - { url = "https://files.pythonhosted.org/packages/27/45/80935968b53cfd3f33cf99ea5f08227f2646e044568c9b1555b58ffd61c2/greenlet-3.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee7a6ec486883397d70eec05059353b8e83eca9168b9f3f9a361971e77e0bcd0", size = 1564846, upload-time = "2025-11-04T12:42:15.191Z" }, - { url = "https://files.pythonhosted.org/packages/69/02/b7c30e5e04752cb4db6202a3858b149c0710e5453b71a3b2aec5d78a1aab/greenlet-3.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:326d234cbf337c9c3def0676412eb7040a35a768efc92504b947b3e9cfc7543d", size = 1633814, upload-time = "2025-11-04T12:42:17.175Z" }, - { url = "https://files.pythonhosted.org/packages/e9/08/b0814846b79399e585f974bbeebf5580fbe59e258ea7be64d9dfb253c84f/greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02", size = 299899, upload-time = "2025-08-07T13:38:53.448Z" }, - { url = "https://files.pythonhosted.org/packages/49/e8/58c7f85958bda41dafea50497cbd59738c5c43dbbea5ee83d651234398f4/greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31", size = 272814, upload-time = "2025-08-07T13:15:50.011Z" }, - { url = "https://files.pythonhosted.org/packages/62/dd/b9f59862e9e257a16e4e610480cfffd29e3fae018a68c2332090b53aac3d/greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945", size = 641073, upload-time = "2025-08-07T13:42:57.23Z" }, - { url = "https://files.pythonhosted.org/packages/f7/0b/bc13f787394920b23073ca3b6c4a7a21396301ed75a655bcb47196b50e6e/greenlet-3.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:710638eb93b1fa52823aa91bf75326f9ecdfd5e0466f00789246a5280f4ba0fc", size = 655191, upload-time = "2025-08-07T13:45:29.752Z" }, - { url = "https://files.pythonhosted.org/packages/f2/d6/6adde57d1345a8d0f14d31e4ab9c23cfe8e2cd39c3baf7674b4b0338d266/greenlet-3.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c5111ccdc9c88f423426df3fd1811bfc40ed66264d35aa373420a34377efc98a", size = 649516, upload-time = "2025-08-07T13:53:16.314Z" }, - { url = "https://files.pythonhosted.org/packages/7f/3b/3a3328a788d4a473889a2d403199932be55b1b0060f4ddd96ee7cdfcad10/greenlet-3.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d76383238584e9711e20ebe14db6c88ddcedc1829a9ad31a584389463b5aa504", size = 652169, upload-time = "2025-08-07T13:18:32.861Z" }, - { url = "https://files.pythonhosted.org/packages/ee/43/3cecdc0349359e1a527cbf2e3e28e5f8f06d3343aaf82ca13437a9aa290f/greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671", size = 610497, upload-time = "2025-08-07T13:18:31.636Z" }, - { url = "https://files.pythonhosted.org/packages/b8/19/06b6cf5d604e2c382a6f31cafafd6f33d5dea706f4db7bdab184bad2b21d/greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b", size = 1121662, upload-time = "2025-08-07T13:42:41.117Z" }, - { url = "https://files.pythonhosted.org/packages/a2/15/0d5e4e1a66fab130d98168fe984c509249c833c1a3c16806b90f253ce7b9/greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae", size = 1149210, upload-time = "2025-08-07T13:18:24.072Z" }, - { url = "https://files.pythonhosted.org/packages/1c/53/f9c440463b3057485b8594d7a638bed53ba531165ef0ca0e6c364b5cc807/greenlet-3.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e343822feb58ac4d0a1211bd9399de2b3a04963ddeec21530fc426cc121f19b", size = 1564759, upload-time = "2025-11-04T12:42:19.395Z" }, - { url = "https://files.pythonhosted.org/packages/47/e4/3bb4240abdd0a8d23f4f88adec746a3099f0d86bfedb623f063b2e3b4df0/greenlet-3.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca7f6f1f2649b89ce02f6f229d7c19f680a6238af656f61e0115b24857917929", size = 1634288, upload-time = "2025-11-04T12:42:21.174Z" }, - { url = "https://files.pythonhosted.org/packages/0b/55/2321e43595e6801e105fcfdee02b34c0f996eb71e6ddffca6b10b7e1d771/greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b", size = 299685, upload-time = "2025-08-07T13:24:38.824Z" }, - { url = "https://files.pythonhosted.org/packages/22/5c/85273fd7cc388285632b0498dbbab97596e04b154933dfe0f3e68156c68c/greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0", size = 273586, upload-time = "2025-08-07T13:16:08.004Z" }, - { url = "https://files.pythonhosted.org/packages/d1/75/10aeeaa3da9332c2e761e4c50d4c3556c21113ee3f0afa2cf5769946f7a3/greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f", size = 686346, upload-time = "2025-08-07T13:42:59.944Z" }, - { url = "https://files.pythonhosted.org/packages/c0/aa/687d6b12ffb505a4447567d1f3abea23bd20e73a5bed63871178e0831b7a/greenlet-3.2.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c17b6b34111ea72fc5a4e4beec9711d2226285f0386ea83477cbb97c30a3f3a5", size = 699218, upload-time = "2025-08-07T13:45:30.969Z" }, - { url = "https://files.pythonhosted.org/packages/dc/8b/29aae55436521f1d6f8ff4e12fb676f3400de7fcf27fccd1d4d17fd8fecd/greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1", size = 694659, upload-time = "2025-08-07T13:53:17.759Z" }, - { url = "https://files.pythonhosted.org/packages/92/2e/ea25914b1ebfde93b6fc4ff46d6864564fba59024e928bdc7de475affc25/greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735", size = 695355, upload-time = "2025-08-07T13:18:34.517Z" }, - { url = "https://files.pythonhosted.org/packages/72/60/fc56c62046ec17f6b0d3060564562c64c862948c9d4bc8aa807cf5bd74f4/greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337", size = 657512, upload-time = "2025-08-07T13:18:33.969Z" }, - { url = "https://files.pythonhosted.org/packages/23/6e/74407aed965a4ab6ddd93a7ded3180b730d281c77b765788419484cdfeef/greenlet-3.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2917bdf657f5859fbf3386b12d68ede4cf1f04c90c3a6bc1f013dd68a22e2269", size = 1612508, upload-time = "2025-11-04T12:42:23.427Z" }, - { url = "https://files.pythonhosted.org/packages/0d/da/343cd760ab2f92bac1845ca07ee3faea9fe52bee65f7bcb19f16ad7de08b/greenlet-3.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:015d48959d4add5d6c9f6c5210ee3803a830dce46356e3bc326d6776bde54681", size = 1680760, upload-time = "2025-11-04T12:42:25.341Z" }, - { url = "https://files.pythonhosted.org/packages/e3/a5/6ddab2b4c112be95601c13428db1d8b6608a8b6039816f2ba09c346c08fc/greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01", size = 303425, upload-time = "2025-08-07T13:32:27.59Z" }, - { url = "https://files.pythonhosted.org/packages/f7/c0/93885c4106d2626bf51fdec377d6aef740dfa5c4877461889a7cf8e565cc/greenlet-3.2.4-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:b6a7c19cf0d2742d0809a4c05975db036fdff50cd294a93632d6a310bf9ac02c", size = 269859, upload-time = "2025-08-07T13:16:16.003Z" }, - { url = "https://files.pythonhosted.org/packages/4d/f5/33f05dc3ba10a02dedb1485870cf81c109227d3d3aa280f0e48486cac248/greenlet-3.2.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27890167f55d2387576d1f41d9487ef171849ea0359ce1510ca6e06c8bece11d", size = 627610, upload-time = "2025-08-07T13:43:01.345Z" }, - { url = "https://files.pythonhosted.org/packages/b2/a7/9476decef51a0844195f99ed5dc611d212e9b3515512ecdf7321543a7225/greenlet-3.2.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:18d9260df2b5fbf41ae5139e1be4e796d99655f023a636cd0e11e6406cca7d58", size = 639417, upload-time = "2025-08-07T13:45:32.094Z" }, - { url = "https://files.pythonhosted.org/packages/bd/e0/849b9159cbb176f8c0af5caaff1faffdece7a8417fcc6fe1869770e33e21/greenlet-3.2.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:671df96c1f23c4a0d4077a325483c1503c96a1b7d9db26592ae770daa41233d4", size = 634751, upload-time = "2025-08-07T13:53:18.848Z" }, - { url = "https://files.pythonhosted.org/packages/5f/d3/844e714a9bbd39034144dca8b658dcd01839b72bb0ec7d8014e33e3705f0/greenlet-3.2.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:16458c245a38991aa19676900d48bd1a6f2ce3e16595051a4db9d012154e8433", size = 634020, upload-time = "2025-08-07T13:18:36.841Z" }, - { url = "https://files.pythonhosted.org/packages/6b/4c/f3de2a8de0e840ecb0253ad0dc7e2bb3747348e798ec7e397d783a3cb380/greenlet-3.2.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9913f1a30e4526f432991f89ae263459b1c64d1608c0d22a5c79c287b3c70df", size = 582817, upload-time = "2025-08-07T13:18:35.48Z" }, - { url = "https://files.pythonhosted.org/packages/89/80/7332915adc766035c8980b161c2e5d50b2f941f453af232c164cff5e0aeb/greenlet-3.2.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b90654e092f928f110e0007f572007c9727b5265f7632c2fa7415b4689351594", size = 1111985, upload-time = "2025-08-07T13:42:42.425Z" }, - { url = "https://files.pythonhosted.org/packages/66/71/1928e2c80197353bcb9b50aa19c4d8e26ee6d7a900c564907665cf4b9a41/greenlet-3.2.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81701fd84f26330f0d5f4944d4e92e61afe6319dcd9775e39396e39d7c3e5f98", size = 1136137, upload-time = "2025-08-07T13:18:26.168Z" }, - { url = "https://files.pythonhosted.org/packages/4b/bf/7bd33643e48ed45dcc0e22572f650767832bd4e1287f97434943cc402148/greenlet-3.2.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:28a3c6b7cd72a96f61b0e4b2a36f681025b60ae4779cc73c1535eb5f29560b10", size = 1542941, upload-time = "2025-11-04T12:42:27.427Z" }, - { url = "https://files.pythonhosted.org/packages/9b/74/4bc433f91d0d09a1c22954a371f9df928cb85e72640870158853a83415e5/greenlet-3.2.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:52206cd642670b0b320a1fd1cbfd95bca0e043179c1d8a045f2c6109dfe973be", size = 1609685, upload-time = "2025-11-04T12:42:29.242Z" }, - { url = "https://files.pythonhosted.org/packages/89/48/a5dc74dde38aeb2b15d418cec76ed50e1dd3d620ccda84d8199703248968/greenlet-3.2.4-cp39-cp39-win32.whl", hash = "sha256:65458b409c1ed459ea899e939f0e1cdb14f58dbc803f2f93c5eab5694d32671b", size = 281400, upload-time = "2025-08-07T14:02:20.263Z" }, - { url = "https://files.pythonhosted.org/packages/e5/44/342c4591db50db1076b8bda86ed0ad59240e3e1da17806a4cf10a6d0e447/greenlet-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2e685ade4dafd447ede19c31277a224a239a0a1a4eca4e6390efedf20260cfb", size = 298533, upload-time = "2025-08-07T13:56:34.168Z" }, -] - [[package]] name = "greenlet" version = "3.3.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/c7/e5/40dbda2736893e3e53d25838e0f19a2b417dfc122b9989c91918db30b5d3/greenlet-3.3.0.tar.gz", hash = "sha256:a82bb225a4e9e4d653dd2fb7b8b2d36e4fb25bc0165422a11e48b88e9e6f78fb", size = 190651, upload-time = "2025-12-04T14:49:44.05Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/32/6a/33d1702184d94106d3cdd7bfb788e19723206fce152e303473ca3b946c7b/greenlet-3.3.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:6f8496d434d5cb2dce025773ba5597f71f5410ae499d5dd9533e0653258cdb3d", size = 273658, upload-time = "2025-12-04T14:23:37.494Z" }, @@ -994,30 +661,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4f/dc/041be1dff9f23dac5f48a43323cd0789cb798342011c19a248d9c9335536/greenlet-3.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c10513330af5b8ae16f023e8ddbfb486ab355d04467c4679c5cfe4659975dd9", size = 1676034, upload-time = "2025-12-04T14:27:33.531Z" }, ] -[[package]] -name = "griffe" -version = "1.14.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "colorama", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ec/d7/6c09dd7ce4c7837e4cdb11dce980cb45ae3cd87677298dc3b781b6bce7d3/griffe-1.14.0.tar.gz", hash = "sha256:9d2a15c1eca966d68e00517de5d69dd1bc5c9f2335ef6c1775362ba5b8651a13", size = 424684, upload-time = "2025-09-05T15:02:29.167Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/b1/9ff6578d789a89812ff21e4e0f80ffae20a65d5dd84e7a17873fe3b365be/griffe-1.14.0-py3-none-any.whl", hash = "sha256:0e9d52832cccf0f7188cfe585ba962d2674b241c01916d780925df34873bceb0", size = 144439, upload-time = "2025-09-05T15:02:27.511Z" }, -] - [[package]] name = "griffe" version = "1.15.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "colorama", marker = "python_full_version >= '3.10'" }, + { name = "colorama" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0d/0c/3a471b6e31951dce2360477420d0a8d1e00dea6cf33b70f3e8c3ab6e28e1/griffe-1.15.0.tar.gz", hash = "sha256:7726e3afd6f298fbc3696e67958803e7ac843c1cfe59734b6251a40cdbfb5eea", size = 424112, upload-time = "2025-11-10T15:03:15.52Z" } wheels = [ @@ -1029,8 +678,7 @@ name = "griffe-typingdoc" version = "0.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "griffe", version = "1.14.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "griffe", version = "1.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "griffe" }, { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/be/77/d5e5fa0a8391bc2890ae45255847197299739833108dd76ee3c9b2ff0bba/griffe_typingdoc-0.3.0.tar.gz", hash = "sha256:59d9ef98d02caa7aed88d8df1119c9e48c02ed049ea50ce4018ace9331d20f8b", size = 33169, upload-time = "2025-10-23T12:01:39.037Z" } @@ -1043,8 +691,7 @@ name = "griffe-warnings-deprecated" version = "1.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "griffe", version = "1.14.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "griffe", version = "1.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "griffe" }, ] sdist = { url = "https://files.pythonhosted.org/packages/7e/0e/f034e1714eb2c694d6196c75f77a02f9c69d19f9961c4804a016397bf3e5/griffe_warnings_deprecated-1.1.0.tar.gz", hash = "sha256:7bf21de327d59c66c7ce08d0166aa4292ce0577ff113de5878f428d102b6f7c5", size = 33260, upload-time = "2024-12-10T21:02:18.395Z" } wheels = [ @@ -1115,37 +762,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, ] -[[package]] -name = "importlib-metadata" -version = "8.7.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "zipp", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f3/49/3b30cad09e7771a4982d9975a8cbf64f00d4a1ececb53297f1d9a7be1b10/importlib_metadata-8.7.1.tar.gz", hash = "sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb", size = 57107, upload-time = "2025-12-21T10:00:19.278Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fa/5e/f8e9a1d23b9c20a551a8a02ea3637b4642e22c2626e3a13a9a29cdea99eb/importlib_metadata-8.7.1-py3-none-any.whl", hash = "sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151", size = 27865, upload-time = "2025-12-21T10:00:18.329Z" }, -] - -[[package]] -name = "iniconfig" -version = "2.1.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, -] - [[package]] name = "iniconfig" version = "2.3.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, @@ -1234,40 +854,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/41/61/33063e271949787a2f8dd33c5260357e3d512a114fc82ca7890b65a76e2d/librt-0.7.7-cp314-cp314t-win32.whl", hash = "sha256:5e419e0db70991b6ba037b70c1d5bbe92b20ddf82f31ad01d77a347ed9781398", size = 40277, upload-time = "2026-01-01T23:52:07.625Z" }, { url = "https://files.pythonhosted.org/packages/06/21/1abd972349f83a696ea73159ac964e63e2d14086fdd9bc7ca878c25fced4/librt-0.7.7-cp314-cp314t-win_amd64.whl", hash = "sha256:d6b7d93657332c817b8d674ef6bf1ab7796b4f7ce05e420fd45bd258a72ac804", size = 46765, upload-time = "2026-01-01T23:52:08.647Z" }, { url = "https://files.pythonhosted.org/packages/51/0e/b756c7708143a63fca65a51ca07990fa647db2cc8fcd65177b9e96680255/librt-0.7.7-cp314-cp314t-win_arm64.whl", hash = "sha256:142c2cd91794b79fd0ce113bd658993b7ede0fe93057668c2f98a45ca00b7e91", size = 39724, upload-time = "2026-01-01T23:52:09.745Z" }, - { url = "https://files.pythonhosted.org/packages/e2/34/b88347b7bac496c1433e2f9bf124b0024733654b1bb4bcbf6ccf24d83e2e/librt-0.7.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c8ffe3431d98cc043a14e88b21288b5ec7ee12cb01260e94385887f285ef9389", size = 54841, upload-time = "2026-01-01T23:52:10.751Z" }, - { url = "https://files.pythonhosted.org/packages/01/fc/394ef13f4a9a407e43e76a8b0002042f53e22401014ee19544bab99ba2c9/librt-0.7.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e40d20ae1722d6b8ea6acf4597e789604649dcd9c295eb7361a28225bc2e9e12", size = 56804, upload-time = "2026-01-01T23:52:11.915Z" }, - { url = "https://files.pythonhosted.org/packages/88/53/0d49f17dd11495f0274d34318bd5d1c1aa183ce97c45a2dce8fda9b650af/librt-0.7.7-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f2cb63c49bc96847c3bb8dca350970e4dcd19936f391cfdfd057dcb37c4fa97e", size = 159682, upload-time = "2026-01-01T23:52:13.34Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8a/cce20900af63bbc22abacb197622287cf210cfdf2da352131fa48c3e490e/librt-0.7.7-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8f2f8dcf5ab9f80fb970c6fd780b398efb2f50c1962485eb8d3ab07788595a48", size = 168512, upload-time = "2026-01-01T23:52:14.52Z" }, - { url = "https://files.pythonhosted.org/packages/18/aa/4d5e0e98b47998297ec58e14561346f38bc4ad2d7c4d100e0a3baead06e8/librt-0.7.7-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a1f5cc41a570269d1be7a676655875e3a53de4992a9fa38efb7983e97cf73d7c", size = 182231, upload-time = "2026-01-01T23:52:15.656Z" }, - { url = "https://files.pythonhosted.org/packages/d7/76/6dbde6632fd959f4ffb1b9a6ee67ae096adce6222282c7b9cd131787ea16/librt-0.7.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ff1fb2dfef035549565a4124998fadcb7a3d4957131ddf004a56edeb029626b3", size = 178268, upload-time = "2026-01-01T23:52:16.851Z" }, - { url = "https://files.pythonhosted.org/packages/83/7d/a3ce1a98fa5a79c87e8d24a6595ba5beff40f500051d933f771975b81df9/librt-0.7.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ab2a2a9cd7d044e1a11ca64a86ad3361d318176924bbe5152fbc69f99be20b8c", size = 172569, upload-time = "2026-01-01T23:52:18.033Z" }, - { url = "https://files.pythonhosted.org/packages/d0/a7/01f6cbc77b0ccb22d9ad939ddcd1529a521d3e79c5b1eb3ed5b2c158e8dd/librt-0.7.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ad3fc2d859a709baf9dd9607bb72f599b1cfb8a39eafd41307d0c3c4766763cb", size = 192746, upload-time = "2026-01-01T23:52:19.235Z" }, - { url = "https://files.pythonhosted.org/packages/5b/83/9da96065a4f5a44eb1b7e6611c729544b84bb5dd6806acbf0c82ba3e3c27/librt-0.7.7-cp39-cp39-win32.whl", hash = "sha256:f83c971eb9d2358b6a18da51dc0ae00556ac7c73104dde16e9e14c15aaf685ca", size = 42550, upload-time = "2026-01-01T23:52:20.392Z" }, - { url = "https://files.pythonhosted.org/packages/34/b3/85aef151a052a40521f5b54005908a22c437dd4c952800d5e5efce99a47d/librt-0.7.7-cp39-cp39-win_amd64.whl", hash = "sha256:264720fc288c86039c091a4ad63419a5d7cabbf1c1c9933336a957ed2483e570", size = 48957, upload-time = "2026-01-01T23:52:21.43Z" }, -] - -[[package]] -name = "markdown" -version = "3.9" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "importlib-metadata", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz", hash = "sha256:d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a", size = 364585, upload-time = "2025-09-04T20:25:22.885Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/70/ae/44c4a6a4cbb496d93c6257954260fe3a6e91b7bed2240e5dad2a717f5111/markdown-3.9-py3-none-any.whl", hash = "sha256:9f4d91ed810864ea88a6f32c07ba8bee1346c0cc1f6b1f9f6c822f2a9667d280", size = 107441, upload-time = "2025-09-04T20:25:21.784Z" }, ] [[package]] name = "markdown" version = "3.10" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/7dd27d9d863b3376fcf23a5a13cb5d024aed1db46f963f1b5735ae43b3be/markdown-3.10.tar.gz", hash = "sha256:37062d4f2aa4b2b6b32aefb80faa300f82cc790cb949a35b8caede34f2b68c0e", size = 364931, upload-time = "2025-11-03T19:51:15.007Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/70/81/54e3ce63502cd085a0c556652a4e1b919c45a446bd1e5300e10c44c8c521/markdown-3.10-py3-none-any.whl", hash = "sha256:b5b99d6951e2e4948d939255596523444c0e677c669700b1d17aa4a8a464cb7c", size = 107678, upload-time = "2025-11-03T19:51:13.887Z" }, @@ -1278,38 +870,19 @@ name = "markdown-include-variants" version = "0.0.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, ] sdist = { url = "https://files.pythonhosted.org/packages/c5/47/ec9eae4a6d2f336d95681df43720e2b25b045dc3ed44ae6d30a5ce2f5dff/markdown_include_variants-0.0.8.tar.gz", hash = "sha256:46d812340c64dcd3646b1eaa356bafb31626dd7b4955d15c44ff8c48c6357227", size = 46882, upload-time = "2025-12-12T16:11:04.254Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/4e/0e/130958e7ec50d13f2ee7b6c142df5c352520a9251baf1652e41262703857/markdown_include_variants-0.0.8-py3-none-any.whl", hash = "sha256:425a300ae25fbcd598506cba67859a9dfa047333e869e0ff2e11a5e354b326dc", size = 8120, upload-time = "2025-12-12T16:11:02.881Z" }, ] -[[package]] -name = "markdown-it-py" -version = "3.0.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "mdurl", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596, upload-time = "2023-06-03T06:41:14.443Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528, upload-time = "2023-06-03T06:41:11.019Z" }, -] - [[package]] name = "markdown-it-py" version = "4.0.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "mdurl", marker = "python_full_version >= '3.10'" }, + { name = "mdurl" }, ] sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } wheels = [ @@ -1399,17 +972,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, - { url = "https://files.pythonhosted.org/packages/56/23/0d8c13a44bde9154821586520840643467aee574d8ce79a17da539ee7fed/markupsafe-3.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26", size = 11623, upload-time = "2025-09-27T18:37:29.296Z" }, - { url = "https://files.pythonhosted.org/packages/fd/23/07a2cb9a8045d5f3f0890a8c3bc0859d7a47bfd9a560b563899bec7b72ed/markupsafe-3.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc", size = 12049, upload-time = "2025-09-27T18:37:30.234Z" }, - { url = "https://files.pythonhosted.org/packages/bc/e4/6be85eb81503f8e11b61c0b6369b6e077dcf0a74adbd9ebf6b349937b4e9/markupsafe-3.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c", size = 21923, upload-time = "2025-09-27T18:37:31.177Z" }, - { url = "https://files.pythonhosted.org/packages/6f/bc/4dc914ead3fe6ddaef035341fee0fc956949bbd27335b611829292b89ee2/markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42", size = 20543, upload-time = "2025-09-27T18:37:32.168Z" }, - { url = "https://files.pythonhosted.org/packages/89/6e/5fe81fbcfba4aef4093d5f856e5c774ec2057946052d18d168219b7bd9f9/markupsafe-3.0.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b", size = 20585, upload-time = "2025-09-27T18:37:33.166Z" }, - { url = "https://files.pythonhosted.org/packages/f6/f6/e0e5a3d3ae9c4020f696cd055f940ef86b64fe88de26f3a0308b9d3d048c/markupsafe-3.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758", size = 21387, upload-time = "2025-09-27T18:37:34.185Z" }, - { url = "https://files.pythonhosted.org/packages/c8/25/651753ef4dea08ea790f4fbb65146a9a44a014986996ca40102e237aa49a/markupsafe-3.0.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2", size = 20133, upload-time = "2025-09-27T18:37:35.138Z" }, - { url = "https://files.pythonhosted.org/packages/dc/0a/c3cf2b4fef5f0426e8a6d7fce3cb966a17817c568ce59d76b92a233fdbec/markupsafe-3.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d", size = 20588, upload-time = "2025-09-27T18:37:36.096Z" }, - { url = "https://files.pythonhosted.org/packages/cd/1b/a7782984844bd519ad4ffdbebbba2671ec5d0ebbeac34736c15fb86399e8/markupsafe-3.0.3-cp39-cp39-win32.whl", hash = "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7", size = 14566, upload-time = "2025-09-27T18:37:37.09Z" }, - { url = "https://files.pythonhosted.org/packages/18/1f/8d9c20e1c9440e215a44be5ab64359e207fcb4f675543f1cf9a2a7f648d0/markupsafe-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e", size = 15053, upload-time = "2025-09-27T18:37:38.054Z" }, - { url = "https://files.pythonhosted.org/packages/4e/d3/fe08482b5cd995033556d45041a4f4e76e7f0521112a9c9991d40d39825f/markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8", size = 13928, upload-time = "2025-09-27T18:37:39.037Z" }, ] [[package]] @@ -1427,8 +989,7 @@ version = "1.4.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cyclic" }, - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "rcslice" }, ] sdist = { url = "https://files.pythonhosted.org/packages/bf/f0/f395a9cf164471d3c7bbe58cbd64d74289575a8b85a962b49a804ab7ed34/mdx_include-1.4.2.tar.gz", hash = "sha256:992f9fbc492b5cf43f7d8cb4b90b52a4e4c5fdd7fd04570290a83eea5c84f297", size = 15051, upload-time = "2022-07-26T05:46:14.129Z" } @@ -1450,14 +1011,11 @@ name = "mkdocs" version = "1.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "click" }, { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "ghp-import" }, - { name = "importlib-metadata", marker = "python_full_version < '3.10'" }, { name = "jinja2" }, - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "markupsafe" }, { name = "mergedeep" }, { name = "mkdocs-get-deps" }, @@ -1477,8 +1035,7 @@ name = "mkdocs-autorefs" version = "1.4.3" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "markupsafe" }, { name = "mkdocs" }, ] @@ -1492,10 +1049,8 @@ name = "mkdocs-get-deps" version = "0.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "importlib-metadata", marker = "python_full_version < '3.10'" }, { name = "mergedeep" }, - { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "platformdirs", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "platformdirs" }, { name = "pyyaml" }, ] sdist = { url = "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c", size = 10239, upload-time = "2023-11-20T17:51:09.981Z" } @@ -1517,8 +1072,7 @@ dependencies = [ { name = "pyyaml" }, { name = "requests" }, { name = "super-collections" }, - { name = "termcolor", version = "3.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "termcolor", version = "3.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "termcolor" }, ] sdist = { url = "https://files.pythonhosted.org/packages/92/15/e6a44839841ebc9c5872fa0e6fad1c3757424e4fe026093b68e9f386d136/mkdocs_macros_plugin-1.5.0.tar.gz", hash = "sha256:12aa45ce7ecb7a445c66b9f649f3dd05e9b92e8af6bc65e4acd91d26f878c01f", size = 37730, upload-time = "2025-11-13T08:08:55.545Z" } wheels = [ @@ -1534,8 +1088,7 @@ dependencies = [ { name = "backrefs" }, { name = "colorama" }, { name = "jinja2" }, - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "mkdocs" }, { name = "mkdocs-material-extensions" }, { name = "paginate" }, @@ -1574,10 +1127,8 @@ name = "mkdocstrings" version = "0.30.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "importlib-metadata", marker = "python_full_version < '3.10'" }, { name = "jinja2" }, - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "markupsafe" }, { name = "mkdocs" }, { name = "mkdocs-autorefs" }, @@ -1590,40 +1141,18 @@ wheels = [ [package.optional-dependencies] python = [ - { name = "mkdocstrings-python", version = "1.18.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "mkdocstrings-python", version = "2.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, -] - -[[package]] -name = "mkdocstrings-python" -version = "1.18.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "griffe", version = "1.14.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "mkdocs-autorefs", marker = "python_full_version < '3.10'" }, - { name = "mkdocstrings", marker = "python_full_version < '3.10'" }, - { name = "typing-extensions", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/95/ae/58ab2bfbee2792e92a98b97e872f7c003deb903071f75d8d83aa55db28fa/mkdocstrings_python-1.18.2.tar.gz", hash = "sha256:4ad536920a07b6336f50d4c6d5603316fafb1172c5c882370cbbc954770ad323", size = 207972, upload-time = "2025-08-28T16:11:19.847Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d5/8f/ce008599d9adebf33ed144e7736914385e8537f5fc686fdb7cceb8c22431/mkdocstrings_python-1.18.2-py3-none-any.whl", hash = "sha256:944fe6deb8f08f33fa936d538233c4036e9f53e840994f6146e8e94eb71b600d", size = 138215, upload-time = "2025-08-28T16:11:18.176Z" }, + { name = "mkdocstrings-python" }, ] [[package]] name = "mkdocstrings-python" version = "2.0.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "griffe", version = "1.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "mkdocs-autorefs", marker = "python_full_version >= '3.10'" }, - { name = "mkdocstrings", marker = "python_full_version >= '3.10'" }, - { name = "typing-extensions", marker = "python_full_version == '3.10.*'" }, + { name = "griffe" }, + { name = "mkdocs-autorefs" }, + { name = "mkdocstrings" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/24/75/d30af27a2906f00eb90143470272376d728521997800f5dce5b340ba35bc/mkdocstrings_python-2.0.1.tar.gz", hash = "sha256:843a562221e6a471fefdd4b45cc6c22d2607ccbad632879234fa9692e9cf7732", size = 199345, upload-time = "2025-12-03T14:26:11.755Z" } wheels = [ @@ -1673,12 +1202,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/32/2a/66ba933fe6c76bd40d1fe916a83f04fed253152f451a877520b3c4a5e41e/mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045", size = 13601998, upload-time = "2025-12-15T05:03:13.056Z" }, { url = "https://files.pythonhosted.org/packages/e3/da/5055c63e377c5c2418760411fd6a63ee2b96cf95397259038756c042574f/mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957", size = 13807476, upload-time = "2025-12-15T05:03:17.977Z" }, { url = "https://files.pythonhosted.org/packages/cd/09/4ebd873390a063176f06b0dbf1f7783dd87bd120eae7727fa4ae4179b685/mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f", size = 10281872, upload-time = "2025-12-15T05:03:05.549Z" }, - { url = "https://files.pythonhosted.org/packages/b5/f7/88436084550ca9af5e610fa45286be04c3b63374df3e021c762fe8c4369f/mypy-1.19.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7bcfc336a03a1aaa26dfce9fff3e287a3ba99872a157561cbfcebe67c13308e3", size = 13102606, upload-time = "2025-12-15T05:02:46.833Z" }, - { url = "https://files.pythonhosted.org/packages/ca/a5/43dfad311a734b48a752790571fd9e12d61893849a01bff346a54011957f/mypy-1.19.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b7951a701c07ea584c4fe327834b92a30825514c868b1f69c30445093fdd9d5a", size = 12164496, upload-time = "2025-12-15T05:03:41.947Z" }, - { url = "https://files.pythonhosted.org/packages/88/f0/efbfa391395cce2f2771f937e0620cfd185ec88f2b9cd88711028a768e96/mypy-1.19.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b13cfdd6c87fc3efb69ea4ec18ef79c74c3f98b4e5498ca9b85ab3b2c2329a67", size = 12772068, upload-time = "2025-12-15T05:02:53.689Z" }, - { url = "https://files.pythonhosted.org/packages/25/05/58b3ba28f5aed10479e899a12d2120d582ba9fa6288851b20bf1c32cbb4f/mypy-1.19.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f28f99c824ecebcdaa2e55d82953e38ff60ee5ec938476796636b86afa3956e", size = 13520385, upload-time = "2025-12-15T05:02:38.328Z" }, - { url = "https://files.pythonhosted.org/packages/c5/a0/c006ccaff50b31e542ae69b92fe7e2f55d99fba3a55e01067dd564325f85/mypy-1.19.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c608937067d2fc5a4dd1a5ce92fd9e1398691b8c5d012d66e1ddd430e9244376", size = 13796221, upload-time = "2025-12-15T05:03:22.147Z" }, - { url = "https://files.pythonhosted.org/packages/b2/ff/8bdb051cd710f01b880472241bd36b3f817a8e1c5d5540d0b761675b6de2/mypy-1.19.1-cp39-cp39-win_amd64.whl", hash = "sha256:409088884802d511ee52ca067707b90c883426bd95514e8cfda8281dc2effe24", size = 10055456, upload-time = "2025-12-15T05:03:35.169Z" }, { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" }, ] @@ -1813,17 +1336,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f0/77/bc6f92a3e8e6e46c0ca78abfffec0037845800ea38c73483760362804c41/pillow-11.3.0-cp314-cp314t-win32.whl", hash = "sha256:118ca10c0d60b06d006be10a501fd6bbdfef559251ed31b794668ed569c87e12", size = 6377370, upload-time = "2025-07-01T09:15:46.673Z" }, { url = "https://files.pythonhosted.org/packages/4a/82/3a721f7d69dca802befb8af08b7c79ebcab461007ce1c18bd91a5d5896f9/pillow-11.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:8924748b688aa210d79883357d102cd64690e56b923a186f35a82cbc10f997db", size = 7121500, upload-time = "2025-07-01T09:15:48.512Z" }, { url = "https://files.pythonhosted.org/packages/89/c7/5572fa4a3f45740eaab6ae86fcdf7195b55beac1371ac8c619d880cfe948/pillow-11.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:79ea0d14d3ebad43ec77ad5272e6ff9bba5b679ef73375ea760261207fa8e0aa", size = 2512835, upload-time = "2025-07-01T09:15:50.399Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8e/9c089f01677d1264ab8648352dcb7773f37da6ad002542760c80107da816/pillow-11.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:48d254f8a4c776de343051023eb61ffe818299eeac478da55227d96e241de53f", size = 5316478, upload-time = "2025-07-01T09:15:52.209Z" }, - { url = "https://files.pythonhosted.org/packages/b5/a9/5749930caf674695867eb56a581e78eb5f524b7583ff10b01b6e5048acb3/pillow-11.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7aee118e30a4cf54fdd873bd3a29de51e29105ab11f9aad8c32123f58c8f8081", size = 4686522, upload-time = "2025-07-01T09:15:54.162Z" }, - { url = "https://files.pythonhosted.org/packages/43/46/0b85b763eb292b691030795f9f6bb6fcaf8948c39413c81696a01c3577f7/pillow-11.3.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:23cff760a9049c502721bdb743a7cb3e03365fafcdfc2ef9784610714166e5a4", size = 5853376, upload-time = "2025-07-03T13:11:01.066Z" }, - { url = "https://files.pythonhosted.org/packages/5e/c6/1a230ec0067243cbd60bc2dad5dc3ab46a8a41e21c15f5c9b52b26873069/pillow-11.3.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6359a3bc43f57d5b375d1ad54a0074318a0844d11b76abccf478c37c986d3cfc", size = 7626020, upload-time = "2025-07-03T13:11:06.479Z" }, - { url = "https://files.pythonhosted.org/packages/63/dd/f296c27ffba447bfad76c6a0c44c1ea97a90cb9472b9304c94a732e8dbfb/pillow-11.3.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:092c80c76635f5ecb10f3f83d76716165c96f5229addbd1ec2bdbbda7d496e06", size = 5956732, upload-time = "2025-07-01T09:15:56.111Z" }, - { url = "https://files.pythonhosted.org/packages/a5/a0/98a3630f0b57f77bae67716562513d3032ae70414fcaf02750279c389a9e/pillow-11.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cadc9e0ea0a2431124cde7e1697106471fc4c1da01530e679b2391c37d3fbb3a", size = 6624404, upload-time = "2025-07-01T09:15:58.245Z" }, - { url = "https://files.pythonhosted.org/packages/de/e6/83dfba5646a290edd9a21964da07674409e410579c341fc5b8f7abd81620/pillow-11.3.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6a418691000f2a418c9135a7cf0d797c1bb7d9a485e61fe8e7722845b95ef978", size = 6067760, upload-time = "2025-07-01T09:16:00.003Z" }, - { url = "https://files.pythonhosted.org/packages/bc/41/15ab268fe6ee9a2bc7391e2bbb20a98d3974304ab1a406a992dcb297a370/pillow-11.3.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:97afb3a00b65cc0804d1c7abddbf090a81eaac02768af58cbdcaaa0a931e0b6d", size = 6700534, upload-time = "2025-07-01T09:16:02.29Z" }, - { url = "https://files.pythonhosted.org/packages/64/79/6d4f638b288300bed727ff29f2a3cb63db054b33518a95f27724915e3fbc/pillow-11.3.0-cp39-cp39-win32.whl", hash = "sha256:ea944117a7974ae78059fcc1800e5d3295172bb97035c0c1d9345fca1419da71", size = 6277091, upload-time = "2025-07-01T09:16:04.4Z" }, - { url = "https://files.pythonhosted.org/packages/46/05/4106422f45a05716fd34ed21763f8ec182e8ea00af6e9cb05b93a247361a/pillow-11.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:e5c5858ad8ec655450a7c7df532e9842cf8df7cc349df7225c60d5d348c8aada", size = 6986091, upload-time = "2025-07-01T09:16:06.342Z" }, - { url = "https://files.pythonhosted.org/packages/63/c6/287fd55c2c12761d0591549d48885187579b7c257bef0c6660755b0b59ae/pillow-11.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:6abdbfd3aea42be05702a8dd98832329c167ee84400a1d1f61ab11437f1717eb", size = 2422632, upload-time = "2025-07-01T09:16:08.142Z" }, { url = "https://files.pythonhosted.org/packages/6f/8b/209bd6b62ce8367f47e68a218bffac88888fdf2c9fcf1ecadc6c3ec1ebc7/pillow-11.3.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3cee80663f29e3843b68199b9d6f4f54bd1d4a6b59bdd91bceefc51238bcb967", size = 5270556, upload-time = "2025-07-01T09:16:09.961Z" }, { url = "https://files.pythonhosted.org/packages/2e/e6/231a0b76070c2cfd9e260a7a5b504fb72da0a95279410fa7afd99d9751d6/pillow-11.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b5f56c3f344f2ccaf0dd875d3e180f631dc60a51b314295a3e681fe8cf851fbe", size = 4654625, upload-time = "2025-07-01T09:16:11.913Z" }, { url = "https://files.pythonhosted.org/packages/13/f4/10cf94fda33cb12765f2397fc285fa6d8eb9c29de7f3185165b702fc7386/pillow-11.3.0-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e67d793d180c9df62f1f40aee3accca4829d3794c95098887edc18af4b8b780c", size = 4874207, upload-time = "2025-07-03T13:11:10.201Z" }, @@ -1840,25 +1352,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/34/e7/ae39f538fd6844e982063c3a5e4598b8ced43b9633baa3a85ef33af8c05c/pillow-11.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c84d689db21a1c397d001aa08241044aa2069e7587b398c8cc63020390b1c1b8", size = 6984598, upload-time = "2025-07-01T09:16:27.732Z" }, ] -[[package]] -name = "platformdirs" -version = "4.4.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz", hash = "sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf", size = 21634, upload-time = "2025-08-26T14:32:04.268Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/40/4b/2028861e724d3bd36227adfa20d3fd24c3fc6d52032f4a93c133be5d17ce/platformdirs-4.4.0-py3-none-any.whl", hash = "sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85", size = 18654, upload-time = "2025-08-26T14:32:02.735Z" }, -] - [[package]] name = "platformdirs" version = "4.5.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" }, @@ -1873,38 +1370,16 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] -[[package]] -name = "pre-commit" -version = "4.3.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "cfgv", version = "3.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "identify", marker = "python_full_version < '3.10'" }, - { name = "nodeenv", marker = "python_full_version < '3.10'" }, - { name = "pyyaml", marker = "python_full_version < '3.10'" }, - { name = "virtualenv", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ff/29/7cf5bbc236333876e4b41f56e06857a87937ce4bf91e117a6991a2dbb02a/pre_commit-4.3.0.tar.gz", hash = "sha256:499fe450cc9d42e9d58e606262795ecb64dd05438943c62b66f6a8673da30b16", size = 193792, upload-time = "2025-08-09T18:56:14.651Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/a5/987a405322d78a73b66e39e4a90e4ef156fd7141bf71df987e50717c321b/pre_commit-4.3.0-py2.py3-none-any.whl", hash = "sha256:2b0747ad7e6e967169136edffee14c16e148a778a54e4f967921aa1ebf2308d8", size = 220965, upload-time = "2025-08-09T18:56:13.192Z" }, -] - [[package]] name = "pre-commit" version = "4.5.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "cfgv", version = "3.5.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "identify", marker = "python_full_version >= '3.10'" }, - { name = "nodeenv", marker = "python_full_version >= '3.10'" }, - { name = "pyyaml", marker = "python_full_version >= '3.10'" }, - { name = "virtualenv", marker = "python_full_version >= '3.10'" }, + { name = "cfgv" }, + { name = "identify" }, + { name = "nodeenv" }, + { name = "pyyaml" }, + { name = "virtualenv" }, ] sdist = { url = "https://files.pythonhosted.org/packages/40/f1/6d86a29246dfd2e9b6237f0b5823717f60cad94d47ddc26afa916d21f525/pre_commit-4.5.1.tar.gz", hash = "sha256:eb545fcff725875197837263e977ea257a402056661f09dae08e4b149b030a61", size = 198232, upload-time = "2025-12-16T21:14:33.552Z" } wheels = [ @@ -2051,19 +1526,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, - { url = "https://files.pythonhosted.org/packages/54/db/160dffb57ed9a3705c4cbcbff0ac03bdae45f1ca7d58ab74645550df3fbd/pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf", size = 2107999, upload-time = "2025-11-04T13:42:03.885Z" }, - { url = "https://files.pythonhosted.org/packages/a3/7d/88e7de946f60d9263cc84819f32513520b85c0f8322f9b8f6e4afc938383/pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5", size = 1929745, upload-time = "2025-11-04T13:42:06.075Z" }, - { url = "https://files.pythonhosted.org/packages/d5/c2/aef51e5b283780e85e99ff19db0f05842d2d4a8a8cd15e63b0280029b08f/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d", size = 1920220, upload-time = "2025-11-04T13:42:08.457Z" }, - { url = "https://files.pythonhosted.org/packages/c7/97/492ab10f9ac8695cd76b2fdb24e9e61f394051df71594e9bcc891c9f586e/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60", size = 2067296, upload-time = "2025-11-04T13:42:10.817Z" }, - { url = "https://files.pythonhosted.org/packages/ec/23/984149650e5269c59a2a4c41d234a9570adc68ab29981825cfaf4cfad8f4/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82", size = 2231548, upload-time = "2025-11-04T13:42:13.843Z" }, - { url = "https://files.pythonhosted.org/packages/71/0c/85bcbb885b9732c28bec67a222dbed5ed2d77baee1f8bba2002e8cd00c5c/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5", size = 2362571, upload-time = "2025-11-04T13:42:16.208Z" }, - { url = "https://files.pythonhosted.org/packages/c0/4a/412d2048be12c334003e9b823a3fa3d038e46cc2d64dd8aab50b31b65499/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3", size = 2068175, upload-time = "2025-11-04T13:42:18.911Z" }, - { url = "https://files.pythonhosted.org/packages/73/f4/c58b6a776b502d0a5540ad02e232514285513572060f0d78f7832ca3c98b/pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425", size = 2177203, upload-time = "2025-11-04T13:42:22.578Z" }, - { url = "https://files.pythonhosted.org/packages/ed/ae/f06ea4c7e7a9eead3d165e7623cd2ea0cb788e277e4f935af63fc98fa4e6/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504", size = 2148191, upload-time = "2025-11-04T13:42:24.89Z" }, - { url = "https://files.pythonhosted.org/packages/c1/57/25a11dcdc656bf5f8b05902c3c2934ac3ea296257cc4a3f79a6319e61856/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5", size = 2343907, upload-time = "2025-11-04T13:42:27.683Z" }, - { url = "https://files.pythonhosted.org/packages/96/82/e33d5f4933d7a03327c0c43c65d575e5919d4974ffc026bc917a5f7b9f61/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3", size = 2322174, upload-time = "2025-11-04T13:42:30.776Z" }, - { url = "https://files.pythonhosted.org/packages/81/45/4091be67ce9f469e81656f880f3506f6a5624121ec5eb3eab37d7581897d/pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460", size = 1990353, upload-time = "2025-11-04T13:42:33.111Z" }, - { url = "https://files.pythonhosted.org/packages/44/8a/a98aede18db6e9cd5d66bcacd8a409fcf8134204cdede2e7de35c5a2c5ef/pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b", size = 2015698, upload-time = "2025-11-04T13:42:35.484Z" }, { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, @@ -2090,34 +1552,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, ] -[[package]] -name = "pydantic-settings" -version = "2.11.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "pydantic", marker = "python_full_version < '3.10'" }, - { name = "python-dotenv", marker = "python_full_version < '3.10'" }, - { name = "typing-inspection", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz", hash = "sha256:d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180", size = 188394, upload-time = "2025-09-24T14:19:11.764Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/83/d6/887a1ff844e64aa823fb4905978d882a633cfe295c32eacad582b78a7d8b/pydantic_settings-2.11.0-py3-none-any.whl", hash = "sha256:fe2cea3413b9530d10f3a5875adffb17ada5c1e1bab0b2885546d7310415207c", size = 48608, upload-time = "2025-09-24T14:19:10.015Z" }, -] - [[package]] name = "pydantic-settings" version = "2.12.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "pydantic", marker = "python_full_version >= '3.10'" }, - { name = "python-dotenv", marker = "python_full_version >= '3.10'" }, - { name = "typing-inspection", marker = "python_full_version >= '3.10'" }, + { name = "pydantic" }, + { name = "python-dotenv" }, + { name = "typing-inspection" }, ] sdist = { url = "https://files.pythonhosted.org/packages/43/4b/ac7e0aae12027748076d72a8764ff1c9d82ca75a7a52622e67ed3f765c54/pydantic_settings-2.12.0.tar.gz", hash = "sha256:005538ef951e3c2a68e1c08b292b5f2e71490def8589d4221b95dab00dafcfd0", size = 194184, upload-time = "2025-11-10T14:25:47.013Z" } wheels = [ @@ -2168,8 +1610,7 @@ name = "pymdown-extensions" version = "10.19.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markdown", version = "3.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown", version = "3.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown" }, { name = "pyyaml" }, ] sdist = { url = "https://files.pythonhosted.org/packages/72/2d/9f30cee56d4d6d222430d401e85b0a6a1ae229819362f5786943d1a8c03b/pymdown_extensions-10.19.1.tar.gz", hash = "sha256:4969c691009a389fb1f9712dd8e7bd70dcc418d15a0faf70acb5117d022f7de8", size = 847839, upload-time = "2025-12-14T17:25:24.42Z" } @@ -2221,8 +1662,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, - { name = "iniconfig", version = "2.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "iniconfig", version = "2.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "iniconfig" }, { name = "packaging" }, { name = "pluggy" }, { name = "pygments" }, @@ -2325,15 +1765,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, - { url = "https://files.pythonhosted.org/packages/9f/62/67fc8e68a75f738c9200422bf65693fb79a4cd0dc5b23310e5202e978090/pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da", size = 184450, upload-time = "2025-09-25T21:33:00.618Z" }, - { url = "https://files.pythonhosted.org/packages/ae/92/861f152ce87c452b11b9d0977952259aa7df792d71c1053365cc7b09cc08/pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917", size = 174319, upload-time = "2025-09-25T21:33:02.086Z" }, - { url = "https://files.pythonhosted.org/packages/d0/cd/f0cfc8c74f8a030017a2b9c771b7f47e5dd702c3e28e5b2071374bda2948/pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9", size = 737631, upload-time = "2025-09-25T21:33:03.25Z" }, - { url = "https://files.pythonhosted.org/packages/ef/b2/18f2bd28cd2055a79a46c9b0895c0b3d987ce40ee471cecf58a1a0199805/pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5", size = 836795, upload-time = "2025-09-25T21:33:05.014Z" }, - { url = "https://files.pythonhosted.org/packages/73/b9/793686b2d54b531203c160ef12bec60228a0109c79bae6c1277961026770/pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a", size = 750767, upload-time = "2025-09-25T21:33:06.398Z" }, - { url = "https://files.pythonhosted.org/packages/a9/86/a137b39a611def2ed78b0e66ce2fe13ee701a07c07aebe55c340ed2a050e/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926", size = 727982, upload-time = "2025-09-25T21:33:08.708Z" }, - { url = "https://files.pythonhosted.org/packages/dd/62/71c27c94f457cf4418ef8ccc71735324c549f7e3ea9d34aba50874563561/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7", size = 755677, upload-time = "2025-09-25T21:33:09.876Z" }, - { url = "https://files.pythonhosted.org/packages/29/3d/6f5e0d58bd924fb0d06c3a6bad00effbdae2de5adb5cda5648006ffbd8d3/pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0", size = 142592, upload-time = "2025-09-25T21:33:10.983Z" }, - { url = "https://files.pythonhosted.org/packages/f0/0c/25113e0b5e103d7f1490c0e947e303fe4a696c10b501dea7a9f49d4e876c/pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007", size = 158777, upload-time = "2025-09-25T21:33:15.55Z" }, ] [[package]] @@ -2377,8 +1808,7 @@ name = "rich" version = "14.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markdown-it-py", version = "3.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown-it-py", version = "4.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown-it-py" }, { name = "pygments" }, ] sdist = { url = "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz", hash = "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", size = 219990, upload-time = "2025-10-09T14:16:53.064Z" } @@ -2447,8 +1877,7 @@ name = "sqlalchemy" version = "2.0.46" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "greenlet", version = "3.2.4", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.10' and platform_machine == 'AMD64') or (python_full_version < '3.10' and platform_machine == 'WIN32') or (python_full_version < '3.10' and platform_machine == 'aarch64') or (python_full_version < '3.10' and platform_machine == 'amd64') or (python_full_version < '3.10' and platform_machine == 'ppc64le') or (python_full_version < '3.10' and platform_machine == 'win32') or (python_full_version < '3.10' and platform_machine == 'x86_64')" }, - { name = "greenlet", version = "3.3.0", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.10' and platform_machine == 'AMD64') or (python_full_version >= '3.10' and platform_machine == 'WIN32') or (python_full_version >= '3.10' and platform_machine == 'aarch64') or (python_full_version >= '3.10' and platform_machine == 'amd64') or (python_full_version >= '3.10' and platform_machine == 'ppc64le') or (python_full_version >= '3.10' and platform_machine == 'win32') or (python_full_version >= '3.10' and platform_machine == 'x86_64')" }, + { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" }, { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/06/aa/9ce0f3e7a9829ead5c8ce549392f33a12c4555a6c0609bb27d882e9c7ddf/sqlalchemy-2.0.46.tar.gz", hash = "sha256:cf36851ee7219c170bb0793dbc3da3e80c582e04a5437bc601bfe8c85c9216d7", size = 9865393, upload-time = "2026-01-21T18:03:45.119Z" } @@ -2496,13 +1925,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d7/53/3b37dda0a5b137f21ef608d8dfc77b08477bab0fe2ac9d3e0a66eaeab6fc/sqlalchemy-2.0.46-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42a1643dc5427b69aca967dae540a90b0fbf57eaf248f13a90ea5930e0966863", size = 3526296, upload-time = "2026-01-21T18:45:12.657Z" }, { url = "https://files.pythonhosted.org/packages/33/75/f28622ba6dde79cd545055ea7bd4062dc934e0621f7b3be2891f8563f8de/sqlalchemy-2.0.46-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ff33c6e6ad006bbc0f34f5faf941cfc62c45841c64c0a058ac38c799f15b5ede", size = 3470008, upload-time = "2026-01-21T18:33:11.725Z" }, { url = "https://files.pythonhosted.org/packages/a9/42/4afecbbc38d5e99b18acef446453c76eec6fbd03db0a457a12a056836e22/sqlalchemy-2.0.46-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:82ec52100ec1e6ec671563bbd02d7c7c8d0b9e71a0723c72f22ecf52d1755330", size = 3476137, upload-time = "2026-01-21T18:45:15.001Z" }, - { url = "https://files.pythonhosted.org/packages/9a/06/a29b51a577cc5746712ed8a2870794659a6bf405264b32dd5ccc380844d1/sqlalchemy-2.0.46-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:90bde6c6b1827565a95fde597da001212ab436f1b2e0c2dcc7246e14db26e2a3", size = 2158097, upload-time = "2026-01-21T18:24:45.892Z" }, - { url = "https://files.pythonhosted.org/packages/be/55/44689ed21b5a82708502243310878cfc76e0f326ed16103f4336f605055b/sqlalchemy-2.0.46-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94b1e5f3a5f1ff4f42d5daab047428cd45a3380e51e191360a35cef71c9a7a2a", size = 3233722, upload-time = "2026-01-21T18:30:56.334Z" }, - { url = "https://files.pythonhosted.org/packages/be/11/1d6024d9cdd2108d500b399bdc77a1738119789aa70c83d68e1012d32596/sqlalchemy-2.0.46-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93bb0aae40b52c57fd74ef9c6933c08c040ba98daf23ad33c3f9893494b8d3ce", size = 3233038, upload-time = "2026-01-21T18:32:26.945Z" }, - { url = "https://files.pythonhosted.org/packages/38/6d/f813e3204baea710f2d82a61821bdf7b39cebda6dbba7cdeb976b0552239/sqlalchemy-2.0.46-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c4e2cc868b7b5208aec6c960950b7bb821f82c2fe66446c92ee0a571765e91a5", size = 3183163, upload-time = "2026-01-21T18:30:58.647Z" }, - { url = "https://files.pythonhosted.org/packages/8d/5d/32b70643ef73c1bb3723a98316b89182cad2b9a6744d5335f1d69fcdb3f2/sqlalchemy-2.0.46-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:965c62be8256d10c11f8907e7a8d3e18127a4c527a5919d85fa87fd9ecc2cfdc", size = 3205174, upload-time = "2026-01-21T18:32:28.684Z" }, - { url = "https://files.pythonhosted.org/packages/99/a9/b9f7bd299b7550925e1e7d71d634e1eee23c035abed7de125fda7c74b0c8/sqlalchemy-2.0.46-cp39-cp39-win32.whl", hash = "sha256:9397b381dcee8a2d6b99447ae85ea2530dcac82ca494d1db877087a13e38926d", size = 2117095, upload-time = "2026-01-21T18:34:02.596Z" }, - { url = "https://files.pythonhosted.org/packages/04/0b/2e376b34a7c2f3d9d40811c3412fdc65cd35c6da2d660c283ad24bd9bab1/sqlalchemy-2.0.46-cp39-cp39-win_amd64.whl", hash = "sha256:4396c948d8217e83e2c202fbdcc0389cf8c93d2c1c5e60fa5c5a955eae0e64be", size = 2140517, upload-time = "2026-01-21T18:34:03.958Z" }, { url = "https://files.pythonhosted.org/packages/fc/a1/9c4efa03300926601c19c18582531b45aededfb961ab3c3585f1e24f120b/sqlalchemy-2.0.46-py3-none-any.whl", hash = "sha256:f9c11766e7e7c0a2767dda5acb006a118640c9fc0a4104214b96269bfb78399e", size = 1937882, upload-time = "2026-01-21T18:22:10.456Z" }, ] @@ -2516,11 +1938,9 @@ dependencies = [ [package.dev-dependencies] dev = [ - { name = "black", version = "25.11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "black", version = "25.12.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "black" }, { name = "cairosvg" }, - { name = "coverage", version = "7.10.7", source = { registry = "https://pypi.org/simple" }, extra = ["toml"], marker = "python_full_version < '3.10'" }, - { name = "coverage", version = "7.13.0", source = { registry = "https://pypi.org/simple" }, extra = ["toml"], marker = "python_full_version >= '3.10'" }, + { name = "coverage", extra = ["toml"] }, { name = "dirty-equals" }, { name = "fastapi" }, { name = "griffe-typingdoc" }, @@ -2535,8 +1955,7 @@ dev = [ { name = "mkdocstrings", extra = ["python"] }, { name = "mypy" }, { name = "pillow" }, - { name = "pre-commit", version = "4.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pre-commit", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "pre-commit" }, { name = "prek" }, { name = "pytest" }, { name = "pyyaml" }, @@ -2545,8 +1964,7 @@ dev = [ { name = "typing-extensions" }, ] docs = [ - { name = "black", version = "25.11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "black", version = "25.12.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "black" }, { name = "cairosvg" }, { name = "griffe-typingdoc" }, { name = "griffe-warnings-deprecated" }, @@ -2563,23 +1981,19 @@ docs = [ github-actions = [ { name = "httpx" }, { name = "pydantic" }, - { name = "pydantic-settings", version = "2.11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pydantic-settings", version = "2.12.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "pydantic-settings" }, { name = "pygithub" }, { name = "smokeshow" }, ] tests = [ - { name = "black", version = "25.11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "black", version = "25.12.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "coverage", version = "7.10.7", source = { registry = "https://pypi.org/simple" }, extra = ["toml"], marker = "python_full_version < '3.10'" }, - { name = "coverage", version = "7.13.0", source = { registry = "https://pypi.org/simple" }, extra = ["toml"], marker = "python_full_version >= '3.10'" }, + { name = "black" }, + { name = "coverage", extra = ["toml"] }, { name = "dirty-equals" }, { name = "fastapi" }, { name = "httpx" }, { name = "jinja2" }, { name = "mypy" }, - { name = "pre-commit", version = "4.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pre-commit", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "pre-commit" }, { name = "pytest" }, { name = "ruff" }, { name = "typing-extensions" }, @@ -2654,32 +2068,13 @@ tests = [ { name = "typing-extensions", specifier = "==4.15.0" }, ] -[[package]] -name = "starlette" -version = "0.49.3" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "anyio", marker = "python_full_version < '3.10'" }, - { name = "typing-extensions", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/de/1a/608df0b10b53b0beb96a37854ee05864d182ddd4b1156a22f1ad3860425a/starlette-0.49.3.tar.gz", hash = "sha256:1c14546f299b5901a1ea0e34410575bc33bbd741377a10484a54445588d00284", size = 2655031, upload-time = "2025-11-01T15:12:26.13Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a3/e0/021c772d6a662f43b63044ab481dc6ac7592447605b5b35a957785363122/starlette-0.49.3-py3-none-any.whl", hash = "sha256:b579b99715fdc2980cf88c8ec96d3bf1ce16f5a8051a7c2b84ef9b1cdecaea2f", size = 74340, upload-time = "2025-11-01T15:12:24.387Z" }, -] - [[package]] name = "starlette" version = "0.50.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "anyio", marker = "python_full_version >= '3.10'" }, - { name = "typing-extensions", marker = "python_full_version >= '3.10' and python_full_version < '3.13'" }, + { name = "anyio" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/ba/b8/73a0e6a6e079a9d9cfa64113d771e421640b6f679a52eeb9b32f72d871a1/starlette-0.50.0.tar.gz", hash = "sha256:a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca", size = 2646985, upload-time = "2025-11-01T15:25:27.516Z" } wheels = [ @@ -2698,54 +2093,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/17/43/47c7cf84b3bd74a8631b02d47db356656bb8dff6f2e61a4c749963814d0d/super_collections-0.6.2-py3-none-any.whl", hash = "sha256:291b74d26299e9051d69ad9d89e61b07b6646f86a57a2f5ab3063d206eee9c56", size = 16173, upload-time = "2025-09-30T00:37:07.104Z" }, ] -[[package]] -name = "termcolor" -version = "3.1.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz", hash = "sha256:6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970", size = 14324, upload-time = "2025-04-30T11:37:53.791Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4f/bd/de8d508070629b6d84a30d01d57e4a65c69aa7f5abe7560b8fad3b50ea59/termcolor-3.1.0-py3-none-any.whl", hash = "sha256:591dd26b5c2ce03b9e43f391264626557873ce1d379019786f99b0c2bee140aa", size = 7684, upload-time = "2025-04-30T11:37:52.382Z" }, -] - [[package]] name = "termcolor" version = "3.2.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] sdist = { url = "https://files.pythonhosted.org/packages/87/56/ab275c2b56a5e2342568838f0d5e3e66a32354adcc159b495e374cda43f5/termcolor-3.2.0.tar.gz", hash = "sha256:610e6456feec42c4bcd28934a8c87a06c3fa28b01561d46aa09a9881b8622c58", size = 14423, upload-time = "2025-10-25T19:11:42.586Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/f9/d5/141f53d7c1eb2a80e6d3e9a390228c3222c27705cbe7f048d3623053f3ca/termcolor-3.2.0-py3-none-any.whl", hash = "sha256:a10343879eba4da819353c55cb8049b0933890c2ebf9ad5d3ecd2bb32ea96ea6", size = 7698, upload-time = "2025-10-25T19:11:41.536Z" }, ] -[[package]] -name = "tinycss2" -version = "1.4.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "webencodings", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz", hash = "sha256:10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7", size = 87085, upload-time = "2024-10-24T14:58:29.895Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e6/34/ebdc18bae6aa14fbee1a08b63c015c72b64868ff7dae68808ab500c492e2/tinycss2-1.4.0-py3-none-any.whl", hash = "sha256:3a49cf47b7675da0b15d0c6e1df8df4ebd96e9394bb905a5775adb0d884c5289", size = 26610, upload-time = "2024-10-24T14:58:28.029Z" }, -] - [[package]] name = "tinycss2" version = "1.5.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", -] dependencies = [ - { name = "webencodings", marker = "python_full_version >= '3.10'" }, + { name = "webencodings" }, ] sdist = { url = "https://files.pythonhosted.org/packages/a3/ae/2ca4913e5c0f09781d75482874c3a95db9105462a92ddd303c7d285d3df2/tinycss2-1.5.1.tar.gz", hash = "sha256:d339d2b616ba90ccce58da8495a78f46e55d4d25f9fd71dfd526f07e7d53f957", size = 88195, upload-time = "2025-11-23T10:29:10.082Z" } wheels = [ @@ -2807,8 +2169,7 @@ version = "0.23.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-doc" }, - { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "click" }, { name = "rich" }, { name = "shellingham" }, ] @@ -2853,10 +2214,8 @@ version = "20.35.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, - { name = "filelock", version = "3.19.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "filelock", version = "3.20.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "platformdirs", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "filelock" }, + { name = "platformdirs" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz", hash = "sha256:643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c", size = 6028799, upload-time = "2025-10-29T06:57:40.511Z" } @@ -2882,13 +2241,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, - { url = "https://files.pythonhosted.org/packages/05/52/7223011bb760fce8ddc53416beb65b83a3ea6d7d13738dde75eeb2c89679/watchdog-6.0.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8", size = 96390, upload-time = "2024-11-01T14:06:49.325Z" }, - { url = "https://files.pythonhosted.org/packages/9c/62/d2b21bc4e706d3a9d467561f487c2938cbd881c69f3808c43ac1ec242391/watchdog-6.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a", size = 88386, upload-time = "2024-11-01T14:06:50.536Z" }, - { url = "https://files.pythonhosted.org/packages/ea/22/1c90b20eda9f4132e4603a26296108728a8bfe9584b006bd05dd94548853/watchdog-6.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c", size = 89017, upload-time = "2024-11-01T14:06:51.717Z" }, { url = "https://files.pythonhosted.org/packages/30/ad/d17b5d42e28a8b91f8ed01cb949da092827afb9995d4559fd448d0472763/watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881", size = 87902, upload-time = "2024-11-01T14:06:53.119Z" }, { url = "https://files.pythonhosted.org/packages/5c/ca/c3649991d140ff6ab67bfc85ab42b165ead119c9e12211e08089d763ece5/watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11", size = 88380, upload-time = "2024-11-01T14:06:55.19Z" }, - { url = "https://files.pythonhosted.org/packages/5b/79/69f2b0e8d3f2afd462029031baafb1b75d11bb62703f0e1022b2e54d49ee/watchdog-6.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa", size = 87903, upload-time = "2024-11-01T14:06:57.052Z" }, - { url = "https://files.pythonhosted.org/packages/e2/2b/dc048dd71c2e5f0f7ebc04dd7912981ec45793a03c0dc462438e0591ba5d/watchdog-6.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e", size = 88381, upload-time = "2024-11-01T14:06:58.193Z" }, { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" }, @@ -2909,12 +2263,3 @@ sdist = { url = "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda5308 wheels = [ { url = "https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", size = 11774, upload-time = "2017-04-05T20:21:32.581Z" }, ] - -[[package]] -name = "zipp" -version = "3.23.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" }, -]