-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore(server/deps): Upgrade to pydantic ^2.4.2 [TCTC-7241] #1891
Conversation
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Your Render PR Server URL is https://weaverbird-playground-pr-1891.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-ck08jrnhdsdc73dcv920. |
Signed-off-by: Luka Peschke <[email protected]>
depends on ToucanToco/toucan-connectors#1272 |
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mini remarque mais LGTM dans l'ensemble !
J'aurais bien rajouté qqes TUs pour les endroits où t'as changé du code pour faire du damage control. Pas 100% confiant qu'on laisse pas passer des trucs
server/pyproject.toml
Outdated
@@ -27,14 +27,16 @@ Quart-CORS = {version = ">=0.5,<0.7", optional = true} | |||
hypercorn = {version = ">=0.13,<0.15", optional = true} | |||
pymongo = {version = ">=4.2.0", optional = true, extras = ["srv", "tls"]} | |||
psycopg = {optional = true, version = "^3.0.15"} | |||
toucan-connectors = {version = "^4.5.1", optional = true, extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena", "mysql"]} | |||
# toucan-connectors = {version = "^4.5.1", optional = true, extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena", "mysql"]} | |||
toucan-connectors = {git = "https://github.com/ToucanToco/toucan-connectors", branch = "upgrade-pydantic", optional = true, extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena", "mysql"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi c'est une double dep ? (prod et dev)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En prod c'est pour le playground, uniquement via l'extra playground
. En dev c'est pour tirer les dépendances de connecteurs nativesql et pour avoir accès à nosql_apply_parameters_to_query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right j'avais pas vu le playground merci
server/pyproject.toml
Outdated
@@ -13,7 +13,7 @@ readme = "README.md" | |||
|
|||
[tool.poetry.dependencies] | |||
python = ">=3.10, <3.12" | |||
pydantic = "^1.9.1" | |||
pydantic = "^2.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on peut mettre 2.4.1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# FIXME: pydantic v2 is stricter with typing, and requires this to be | ||
# list[dict] | str | PipelineStep. However it would result in a circular import. | ||
# In python 3.11, importing the PipelineStep only when TYPE_CHECKING is True works, | ||
# but seems a bit hacky. So this ensures that the input can only be a dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not ca me derangeait pas le truc avant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça pète en python 3.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arf
relative_date.date | ||
if isinstance(relative_date.date, datetime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pq ca marchait avant ? Ca coercait de base un str
en datetime
vu qu'on avait datetime | str
alors que mtt non car la v2 est plus stricte ?
Si oui on voudrait pas plutôt changer dans RelativeDate
et mettre que le type datetime
avec un validator ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes c'est ça. Si ça ferait plus de sens mais je voulais être le plus conservateur possible dans le comportement. Mais tu as raison, quitte a faire un breaking change, autant faire la modif maintenant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
…[PipelineStep] Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
Last commit includes a workaround for pydantic/pydantic#7487 in case of nested |
Signed-off-by: Luka Peschke <[email protected]>
@@ -17,8 +17,56 @@ def __hash__(self): | |||
return hash(f"__ref__{self.uid}") | |||
|
|||
|
|||
# FIXME: Required because of https://github.com/pydantic/pydantic/issues/7487. | |||
# Repro case: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 vraiment cool d'avoir mis aussi le MRE
Signed-off-by: Luka Peschke <[email protected]>
No description provided.