Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add support for Pydantic v2 (while keeping support for v1 if v2 is not available), including initial work by AntonDeMeester #722

Merged
merged 109 commits into from
Dec 4, 2023

Commits on Nov 13, 2023

  1. migration to sqlalchemy 2.0

    farahats9 authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    d0ae3e8 View commit details
    Browse the repository at this point in the history
  2. fix some linting errors

    farahats9 authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    8a27655 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a2b3c14 View commit details
    Browse the repository at this point in the history
  4. Update sqlmodel/sql/expression.py

    Co-authored-by: Stefan Borer <stefan.borer@gmail.com>
    2 people authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    4760dbd View commit details
    Browse the repository at this point in the history
  5. resolving @sbor23 comments

    farahats9 authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    ad76a88 View commit details
    Browse the repository at this point in the history
  6. add the new Subquery class

    farahats9 authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    96e44e5 View commit details
    Browse the repository at this point in the history
  7. fix jinja2 template

    farahats9 authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    9e72750 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b19a709 View commit details
    Browse the repository at this point in the history
  9. Remove unused type ignore

    peterlandry authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    ae369ed View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2ff42db View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b6bd94f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1dbce4d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c2d310e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    05a1352 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    bd00a2b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c65f018 View commit details
    Browse the repository at this point in the history
  17. Fix signature for Session.get

    peterlandry authored and AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    4e29e00 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    fd85d02 View commit details
    Browse the repository at this point in the history
  19. Upgrade to Pydantic 2

    Change imports
    Undefined => PydanticUndefined
    Update SQLModelMetaclass and SQLModel __init__ and __new__ functions
    Update SQL Alchemy type inference
    AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    d556059 View commit details
    Browse the repository at this point in the history
  20. Formatting

    AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    e92a52e View commit details
    Browse the repository at this point in the history
  21. Linting

    AntonDeMeester committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    61d5d8d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cb494b7 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    f590548 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7ecbc38 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. Configuration menu
    Copy the full SHA
    c21ff69 View commit details
    Browse the repository at this point in the history
  2. Liniting

    AntonDeMeester committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    254fb13 View commit details
    Browse the repository at this point in the history
  3. Linter

    AntonDeMeester committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    ab07514 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a4161a View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Make most tests succeed

    Only need to fix OPEN API things I think
    AntonDeMeester committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    e2d4d1f View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Configuration menu
    Copy the full SHA
    725c6ac View commit details
    Browse the repository at this point in the history
  2. 💡 Add TODO comments

    tiangolo committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    4c358b2 View commit details
    Browse the repository at this point in the history
  3. 👷 Update CI from main

    tiangolo committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    0029193 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a13945 View commit details
    Browse the repository at this point in the history
  5. ⏪️ Revert changing model order in examples to account for previous la…

    …ck of support for forward references in SQLAlchemy (from a previous PR this was based of)
    tiangolo committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    bebd5d8 View commit details
    Browse the repository at this point in the history
  6. ⏪️ Revert example changing the order of models to account for the lac…

    …k of support for forward references in SQLAlchemy in a previous PR this was based of
    tiangolo committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    d229a87 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    29e372b View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Configuration menu
    Copy the full SHA
    665902c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5460f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9bafa3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e29b22 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    835cbc8 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2023

  1. Configuration menu
    Copy the full SHA
    dbaef53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dcbc084 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c836ec1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c6b7a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c7390e1 View commit details
    Browse the repository at this point in the history
  6. 🔥 Remove unused imports

    tiangolo committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    3e45276 View commit details
    Browse the repository at this point in the history
  7. 🔥 Remove unused utils

    tiangolo committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    eadf5bc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d35989a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ef8bbc6 View commit details
    Browse the repository at this point in the history
  10. 🔥 Remove unused import

    tiangolo committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    9ba2e59 View commit details
    Browse the repository at this point in the history
  11. 🔥 Remove unused type

    tiangolo committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    63a55a8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f754390 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4a3fea8 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b763668 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    fb11285 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    aeabcf2 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    d6de622 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    1ee0482 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cb02fb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0460f05 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0187c36 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9249021 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    d400fd7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bb29aa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    edb051e View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2023

  1. Configuration menu
    Copy the full SHA
    65d6b3e View commit details
    Browse the repository at this point in the history
  2. 🚚 Rename test

    tiangolo committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    f879c77 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    baf8f47 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c603f1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f388f1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8d763da View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    553a3c5 View commit details
    Browse the repository at this point in the history
  8. ♻️ Refactor main and compat, restructure, simplify, and fix implement…

    …ation, supporting table models without defaults, SQLAlchemy __init__ overrides
    tiangolo committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    f0d088c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2806b38 View commit details
    Browse the repository at this point in the history
  10. ♻️ Refactor imports

    tiangolo committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    08bd1ef View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e07ada1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    349a374 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    577ebb9 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f39bd8f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4c38fb0 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5eb99a3 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b7f27aa View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    224e4ef View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3070a1e View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8ac7804 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ad5eb08 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0e74c50 View commit details
    Browse the repository at this point in the history
  23. 🐛 Fix implementation of sqlmodel_validate for Pydantic v1 with deprec…

    …ated parse_obj with a dict
    tiangolo committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    cac622a View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9d883f5 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Configuration menu
    Copy the full SHA
    f28109f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cac349c View commit details
    Browse the repository at this point in the history
  3. 🎨 Fix type annotations

    tiangolo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    8d5e62b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d03c233 View commit details
    Browse the repository at this point in the history
  5. ✨ Add override for .dict() only to deprecate it and help people migra…

    …te to model_dump, even (if) before they migrate to Pydantic v2
    tiangolo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    be49ad5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    10e4356 View commit details
    Browse the repository at this point in the history
  7. ✅ Update tests

    tiangolo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    30dbd40 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    47d473d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fca1101 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f1ab6a6 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f68e93e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3b2f955 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5f4d502 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b995766 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b3fcaf0 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    7ab2fdc View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    43fba36 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    115d439 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f121b00 View commit details
    Browse the repository at this point in the history