diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 841f7a9d..2b6e6eb8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,6 +16,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" test-suite: - cli - client diff --git a/requirements-dev.txt b/requirements-dev.txt index d88bdd9c..d32477c8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ pre-commit>=2.5.2,<3 pylint==2.9.6 pymongo==3.12.3 pyspark -pytest==7.2.1 +pytest>=7.2.1 scikit-learn>=0.23.2 setuptools>=47.3.1 twine>=3.2.0,<4.0.0 diff --git a/setup.py b/setup.py index 01dd00f5..0d50e865 100644 --- a/setup.py +++ b/setup.py @@ -8,11 +8,11 @@ from setuptools import find_packages, setup -if sys.version_info < (3, 6): +if sys.version_info[0] == 3 and sys.version_info[1] < 7: warnings.warn( ( - "Python versions lower than 3.6 are no longer supported. Please upgrade to" - " Python 3.6 or newer or use an older version of the sigopt-python client." + "Python versions lower than 3.7 are no longer supported. Please upgrade to" + " Python 3.7 or newer or use an older version of the sigopt-python client." ), DeprecationWarning, ) diff --git a/test/runs/test_set_project.py b/test/runs/test_set_project.py index 01b54379..3d1bd602 100644 --- a/test/runs/test_set_project.py +++ b/test/runs/test_set_project.py @@ -1,6 +1,8 @@ # Copyright © 2022 Intel Corporation # # SPDX-License-Identifier: MIT +import warnings + import mock import pytest @@ -16,7 +18,7 @@ def test_set_project_with_global_run(): def test_set_project_without_run(): with mock.patch("sigopt.get_run_id", mock.Mock(return_value=None)): - with pytest.warns(None) as warnings: + with warnings.catch_warnings(): + warnings.simplefilter("error") set_project("test-123") - assert len(warnings) == 0 assert _global_factory.project == "test-123"