From b3c99880ce4a83a265ba9a907bd27d478ee71662 Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Mon, 28 Sep 2026 14:26:19 +0530 Subject: [PATCH 1/3] Ignore lint --- moto/glue/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/glue/utils.py b/moto/glue/utils.py index 31e023c88bd8..a4b6a795e112 100644 --- a/moto/glue/utils.py +++ b/moto/glue/utils.py @@ -515,7 +515,7 @@ def __init__(self) -> None: ).set_name("cond") # conditions can be joined using 2-ary AND and/or OR - expr = infix_notation( + expr = infix_notation( # type: ignore[no-untyped-call] cond, [ (and_, 2, OpAssoc.LEFT, _BoolAnd), From ad051cac3eb91fce53b9e3925d44bb35cef09583 Mon Sep 17 00:00:00 2001 From: Brian Pandola Date: Fri, 11 Sep 2026 19:04:40 -0700 Subject: [PATCH 2/3] Admin: fix test asserts after Botocore behavior change (#10259) --- tests/test_scheduler/__init__.py | 10 +++------- tests/test_scheduler/test_scheduler.py | 8 +++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_scheduler/__init__.py b/tests/test_scheduler/__init__.py index b245208d13ee..025e4f62d17d 100644 --- a/tests/test_scheduler/__init__.py +++ b/tests/test_scheduler/__init__.py @@ -3,18 +3,14 @@ from moto.core.utils import utcnow -def pytest_parametrize_test_create_get_schedule__with_start_date() -> list[ - tuple[datetime, datetime] -]: +def pytest_parametrize_test_create_get_schedule__with_start_date() -> list[datetime]: now = utcnow() timedelta_kwargs = {"days": 1, "hours": 1, "weeks": 1} return_ = [] for k, v in timedelta_kwargs.items(): - to_append = now + timedelta(**{k: v}) - return_.append((to_append, to_append.replace(microsecond=0))) + return_.append(now + timedelta(**{k: v})) else: - to_append = now.replace(year=now.year + 1) - return_.append((to_append, to_append.replace(microsecond=0))) + return_.append(now.replace(year=now.year + 1)) return return_ diff --git a/tests/test_scheduler/test_scheduler.py b/tests/test_scheduler/test_scheduler.py index 2616d38892a1..bed92d2db327 100644 --- a/tests/test_scheduler/test_scheduler.py +++ b/tests/test_scheduler/test_scheduler.py @@ -238,10 +238,10 @@ def test_delete_schedule_for_none_existing_schedule(): @mock_aws @pytest.mark.parametrize( - "start_date,expected_start_date", + "start_date", pytest_parametrize_test_create_get_schedule__with_start_date(), ) -def test_create_get_schedule__with_start_date(start_date, expected_start_date): +def test_create_get_schedule__with_start_date(start_date): # Act client = boto3.client("scheduler", region_name="eu-west-1") client.create_schedule( @@ -263,7 +263,9 @@ def test_create_get_schedule__with_start_date(start_date, expected_start_date): start_date_as_utc = datetime.astimezone(resp["StartDate"], timezone.utc).replace( tzinfo=None ) - assert start_date_as_utc == expected_start_date + # Older versions of botocore truncate sub-second precision when sending + # unix timestamps, newer versions send the microseconds as-is + assert start_date_as_utc in [start_date, start_date.replace(microsecond=0)] @mock_aws From 876778c33782063d69b8e82ab36ccf1de260fce3 Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Mon, 28 Sep 2026 15:23:56 +0530 Subject: [PATCH 3/3] Support milisecond-precision timestamps --- moto/sagemaker/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/sagemaker/utils.py b/moto/sagemaker/utils.py index f1132a8ce042..481fbb911ae4 100644 --- a/moto/sagemaker/utils.py +++ b/moto/sagemaker/utils.py @@ -92,7 +92,7 @@ def filter_model_cards( filtered_versions = versions if creation_time_after: - if isinstance(creation_time_after, int): + if isinstance(creation_time_after, (int, float)): creation_time_after = datetime.fromtimestamp( creation_time_after, tz=timezone.utc ) @@ -103,7 +103,7 @@ def filter_model_cards( ] if creation_time_before: - if isinstance(creation_time_before, int): + if isinstance(creation_time_before, (int, float)): creation_time_before = datetime.fromtimestamp( creation_time_before, tz=timezone.utc )