From a2d212ced030dd93d20aece634607da8e562cf8e Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Tue, 2 Apr 2024 15:05:59 -0400 Subject: [PATCH] Add Python 3.12 support and remove 3.7 support (#405) Co-authored-by: Alex Streed --- .github/workflows/tests.yml | 1 + setup.py | 5 +++-- tests/test_client_waiter.py | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7a7acea..d79d4860 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/setup.py b/setup.py index b8d7dd55..669a0b5e 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), packages=find_packages(exclude=("tests", "docs")), - python_requires=">=3.7", + python_requires=">=3.8", install_requires=install_requires, entry_points={ "prefect.collections": [ @@ -38,10 +38,11 @@ "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries", ], ) diff --git a/tests/test_client_waiter.py b/tests/test_client_waiter.py index 0c3d27e2..1a764e42 100644 --- a/tests/test_client_waiter.py +++ b/tests/test_client_waiter.py @@ -9,7 +9,7 @@ @pytest.fixture def mock_waiter(monkeypatch): - waiter = MagicMock() + waiter = MagicMock(name="mock_waiter") monkeypatch.setattr( "prefect_aws.client_waiter.create_waiter_with_client", waiter, @@ -44,7 +44,7 @@ def test_flow(): return waiter test_flow() - assert mock_waiter.wait.called_once_with("JobExists") + mock_waiter().wait.assert_called_once_with() @mock_ec2 @@ -66,4 +66,4 @@ def test_flow(): return waiter test_flow() - assert mock_waiter.wait.called_once_with("instance_exists") + mock_waiter.wait.assert_called_once_with()