-
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
Changes from 9 commits
c9d040a
2a607f8
8bfc83a
b68e22f
fdd5af8
f48d92e
a5fac15
9f370be
85e3560
0908533
9e0875b
9a2ac9d
3210283
1b1f9f0
186a0bb
6a62bf1
c0665f5
2582ed4
c358026
052b713
31a799b
69e8d9e
afe7a05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ readme = "README.md" | |
|
||
[tool.poetry.dependencies] | ||
python = ">=3.10, <3.12" | ||
pydantic = "^1.9.1" | ||
pydantic = "^2.3.0" | ||
|
||
# Dependencies for extras | ||
## Pandas | ||
|
@@ -27,14 +27,17 @@ Quart-CORS = {version = ">=0.5,<0.8", 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. En prod c'est pour le playground, uniquement via l'extra There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right j'avais pas vu le playground merci |
||
pytest-asyncio = "^0.21.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest-cov = "^4.1.0" | ||
pytest-mock = "^3.11.1" | ||
pytest-asyncio = "^0.21.0" | ||
# required so we can use nosql_apply_parameters_to_query during tests | ||
toucan-connectors = { version = "^4.5.1", extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena"] } | ||
# toucan-connectors = { version = "^4.5.1", extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena"] } | ||
toucan-connectors = {git = "https://github.com/ToucanToco/toucan-connectors", branch = "upgrade-pydantic", extras = ["google_big_query", "mongo", "Redshift", "snowflake", "awsathena", "mysql"]} | ||
pytest-benchmark = "^4.0.0" | ||
snowflake-sqlalchemy = "^1.5.0" | ||
types-python-dateutil = "^2.8.19" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import operator | ||
from datetime import datetime | ||
|
||
from dateutil.parser import parse as parse_dt | ||
from dateutil.relativedelta import relativedelta | ||
|
||
from weaverbird.pipeline.dates import RelativeDate | ||
|
@@ -24,7 +25,9 @@ def evaluate_relative_date(relative_date: RelativeDate) -> datetime: | |
quantity = relative_date.quantity | ||
duration = relative_date.duration + "s" | ||
|
||
return operation( | ||
relative_date.date, | ||
relativedelta(**{duration: quantity}), # type: ignore | ||
as_dt = ( | ||
relative_date.date | ||
if isinstance(relative_date.date, datetime) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pq ca marchait avant ? Ca coercait de base un There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
else parse_dt(relative_date.date) | ||
) | ||
return operation(as_dt, relativedelta(**{duration: quantity})) |
This file was deleted.
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.
0908533