Skip to content

Commit

Permalink
Change improper AirflowProviderDeprecationWarning ignore to Deprecati…
Browse files Browse the repository at this point in the history
…onWarning ignore for 3.12 tests (apache#46612)
  • Loading branch information
insomnes authored Feb 11, 2025
1 parent c490605 commit 4b65163
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from botocore.exceptions import WaiterError
from moto import mock_aws

from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
from airflow.exceptions import AirflowException
from airflow.providers.amazon.aws.hooks.emr import EmrHook


Expand Down Expand Up @@ -174,9 +174,7 @@ def test_create_job_flow_extra_args(self):
warnings.simplefilter("error")
if sys.version_info >= (3, 12):
# Botocore generates deprecation warning on Python 3.12 connected with utcnow use
warnings.filterwarnings(
"ignore", message=r".*datetime.utcnow.*", category=AirflowProviderDeprecationWarning
)
warnings.filterwarnings("ignore", message=r".*datetime.utcnow.*", category=DeprecationWarning)
cluster = hook.create_job_flow(
{"Name": "test_cluster", "ReleaseLabel": "", "AmiVersion": "3.2", "Instances": {}}
)
Expand Down

0 comments on commit 4b65163

Please sign in to comment.