Skip to content

Commit

Permalink
Fix regex for var allowed_deserialization_classes (#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro authored Mar 6, 2024
1 parent 82093fc commit 02f7a89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python-sdk/example_dags/example_dataframe_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def find_worst_covid_month(dfs: List[pd.DataFrame]):
"""
res = {}
for covid_month_data in dfs:
if ALLOWED_DESERIALIZATION_CLASSES == "airflow\\.* astro\\.*":
if ALLOWED_DESERIALIZATION_CLASSES == "airflow.* astro.*":
covid_month = datetime.fromtimestamp(covid_month_data.Date_YMD.iloc[0] / 1e3).strftime("%Y-%m")
else:
covid_month = covid_month_data.Date_YMD.iloc[0].__format__("%Y-%m")
Expand Down
4 changes: 2 additions & 2 deletions python-sdk/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test(session: nox.Session, airflow) -> None:
"""Run both unit and integration tests."""
env = {
"AIRFLOW_HOME": f"~/airflow-{airflow}-python-{session.python}",
"AIRFLOW__CORE__ALLOWED_DESERIALIZATION_CLASSES": "airflow\\.* astro\\.*",
"AIRFLOW__CORE__ALLOWED_DESERIALIZATION_CLASSES": "airflow.* astro.*",
}

session.install(f"apache-airflow~={airflow}")
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_examples_by_dependency(session: nox.Session, extras):

env = {
"AIRFLOW_HOME": "~/airflow-latest-python-latest",
"AIRFLOW__CORE__ALLOWED_DESERIALIZATION_CLASSES": "airflow\\.* astro\\.*",
"AIRFLOW__CORE__ALLOWED_DESERIALIZATION_CLASSES": "airflow.* astro.*",
}

session.install("-e", f".[{pypi_deps}]")
Expand Down
14 changes: 7 additions & 7 deletions python-sdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"pandas<2.2.0", # Versions 2.2.0 seems to be breaking our tests, so pin it to this version temporarily.
"pyarrow",
"python-frontmatter",
"smart-open",
"smart-open<7.0.0",
"SQLAlchemy>=1.3.18",
"Flask-Session<0.6.0" # This release breaking our tests, let's pin it as a temporary workaround
]
Expand Down Expand Up @@ -57,7 +57,7 @@ google = [
"protobuf",
"apache-airflow-providers-google>=6.4.0",
"sqlalchemy-bigquery>=1.3.0",
"smart-open[gcs]>=5.2.1"
"smart-open[gcs]>=5.2.1,<7.0.0"
]
snowflake = [
"apache-airflow-providers-snowflake",
Expand All @@ -70,20 +70,20 @@ postgres = [
amazon = [
"apache-airflow-providers-amazon>=5.0.0",
"s3fs",
"smart-open[s3]>=5.2.1",
"smart-open[s3]>=5.2.1,<7.0.0",
]
azure = [
"apache-airflow-providers-microsoft-azure",
"azure-storage-blob",
"smart-open[azure]>=5.2.1",
"smart-open[azure]>=5.2.1,<7.0.0",
]
sftp = [
"apache-airflow-providers-sftp>=4.0.0",
"smart-open[ssh]>=5.2.1",
"smart-open[ssh]>=5.2.1,<7.0.0",
]
ftp = [
"apache-airflow-providers-ftp>=3.0.0",
"smart-open>=5.2.1",
"smart-open>=5.2.1,<7.0.0",
]
openlineage = [
"apache-airflow-providers-openlineage>=1.4.0",
Expand Down Expand Up @@ -115,7 +115,7 @@ all = [
"apache-airflow-providers-postgres",
"apache-airflow-providers-snowflake",
"apache-airflow-providers-sftp",
"smart-open[all]>=5.2.1",
"smart-open[all]>=5.2.1,<7.0.0",
"snowflake-connector-python[pandas]",
"snowflake-sqlalchemy>=1.2.0",
"sqlalchemy-bigquery>=1.3.0",
Expand Down

0 comments on commit 02f7a89

Please sign in to comment.