commit: 6a8684f0573ca026bb618102eb835f90761d0740 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Jan 24 16:29:44 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Jan 24 16:30:19 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a8684f0
dev-python/moto: Backport 32-bit time_t test fix Closes: https://bugs.gentoo.org/910504 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/moto/files/moto-4.2.12-32bit-time.patch | 46 ++++++++++++++++++++++ dev-python/moto/moto-4.2.12.ebuild | 5 +++ dev-python/moto/moto-4.2.13.ebuild | 5 +++ 3 files changed, 56 insertions(+) diff --git a/dev-python/moto/files/moto-4.2.12-32bit-time.patch b/dev-python/moto/files/moto-4.2.12-32bit-time.patch new file mode 100644 index 000000000000..fc9470c1ecab --- /dev/null +++ b/dev-python/moto/files/moto-4.2.12-32bit-time.patch @@ -0,0 +1,46 @@ +From 7afd91fd23ad73550fcc621422e04a3734dc890d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]> +Date: Thu, 18 Jan 2024 13:32:07 +0100 +Subject: [PATCH] Fix more test failures on platforms with 32-bit time_t + (#7222) + +--- + tests/test_acm/test_acm.py | 5 ++++- + tests/test_sagemaker/test_sagemaker_pipeline.py | 5 ++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/test_acm/test_acm.py b/tests/test_acm/test_acm.py +index d0c46d20c..d2943d801 100644 +--- a/tests/test_acm/test_acm.py ++++ b/tests/test_acm/test_acm.py +@@ -92,7 +92,10 @@ def test_list_certificates(): + issued_arn = _import_cert(client) + pending_arn = client.request_certificate(DomainName="google.com")["CertificateArn"] + +- certs = client.list_certificates()["CertificateSummaryList"] ++ try: ++ certs = client.list_certificates()["CertificateSummaryList"] ++ except OverflowError: ++ pytest.skip("This test requires 64-bit time_t") + assert issued_arn in [c["CertificateArn"] for c in certs] + assert pending_arn in [c["CertificateArn"] for c in certs] + for cert in certs: +diff --git a/tests/test_sagemaker/test_sagemaker_pipeline.py b/tests/test_sagemaker/test_sagemaker_pipeline.py +index 8323eb29b..31443b26b 100644 +--- a/tests/test_sagemaker/test_sagemaker_pipeline.py ++++ b/tests/test_sagemaker/test_sagemaker_pipeline.py +@@ -515,7 +515,10 @@ def test_list_pipelines_created_after(sagemaker_client): + _ = create_sagemaker_pipelines(sagemaker_client, pipelines) + + created_after_str = "2099-12-31 23:59:59" +- response = sagemaker_client.list_pipelines(CreatedAfter=created_after_str) ++ try: ++ response = sagemaker_client.list_pipelines(CreatedAfter=created_after_str) ++ except OverflowError: ++ pytest.skip("This test requires 64-bit time_t") + assert not response["PipelineSummaries"] + + created_after_datetime = datetime.strptime(created_after_str, "%Y-%m-%d %H:%M:%S") +-- +2.43.0 + diff --git a/dev-python/moto/moto-4.2.12.ebuild b/dev-python/moto/moto-4.2.12.ebuild index d196e07a2b94..c0356463511e 100644 --- a/dev-python/moto/moto-4.2.12.ebuild +++ b/dev-python/moto/moto-4.2.12.ebuild @@ -58,6 +58,11 @@ BDEPEND=" EPYTEST_XDIST=1 distutils_enable_tests pytest +PATCHES=( + # https://github.com/getmoto/moto/pull/7222 + "${FILESDIR}/${PN}-4.2.12-32bit-time.patch" +) + python_test() { local EPYTEST_DESELECT=( # TODO diff --git a/dev-python/moto/moto-4.2.13.ebuild b/dev-python/moto/moto-4.2.13.ebuild index ca7ea930b934..cf91ea1bdb22 100644 --- a/dev-python/moto/moto-4.2.13.ebuild +++ b/dev-python/moto/moto-4.2.13.ebuild @@ -58,6 +58,11 @@ BDEPEND=" EPYTEST_XDIST=1 distutils_enable_tests pytest +PATCHES=( + # https://github.com/getmoto/moto/pull/7222 + "${FILESDIR}/${PN}-4.2.12-32bit-time.patch" +) + python_test() { local EPYTEST_DESELECT=( # TODO
