From 774f96b39efe28e91bbe5f6b176bd0e1ed964094 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 29 Apr 2023 01:25:46 -0700 Subject: [PATCH] =?UTF-8?q?Bump=20minimal=20Python=20to=20=E2=89=A53.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/nox.yml | 2 +- adaptive/learner/balancing_learner.py | 5 +---- adaptive/learner/learnerND.py | 2 +- adaptive/runner.py | 7 +------ benchmarks/asv.conf.json | 2 +- noxfile.py | 2 +- pyproject.toml | 7 +++---- 7 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nox.yml b/.github/workflows/nox.yml index b57973e88..041498649 100644 --- a/.github/workflows/nox.yml +++ b/.github/workflows/nox.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 diff --git a/adaptive/learner/balancing_learner.py b/adaptive/learner/balancing_learner.py index a009722a1..dbef07c6a 100644 --- a/adaptive/learner/balancing_learner.py +++ b/adaptive/learner/balancing_learner.py @@ -21,10 +21,7 @@ else: from typing_extensions import TypeAlias -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal +from typing import Literal try: import pandas diff --git a/adaptive/learner/learnerND.py b/adaptive/learner/learnerND.py index 2c8a73e57..edc839d8d 100644 --- a/adaptive/learner/learnerND.py +++ b/adaptive/learner/learnerND.py @@ -1111,7 +1111,7 @@ def _get_iso(self, level=0.0, which="surface"): vertices = [] # index -> (x,y,z) faces_or_lines = [] # tuple of indices of the corner points - @functools.lru_cache() + @functools.lru_cache def _get_vertex_index(a, b): vertex_a = self.tri.vertices[a] vertex_b = self.tri.vertices[b] diff --git a/adaptive/runner.py b/adaptive/runner.py index d8529113f..d1f39e1e2 100644 --- a/adaptive/runner.py +++ b/adaptive/runner.py @@ -15,7 +15,7 @@ from contextlib import suppress from datetime import datetime, timedelta from importlib.util import find_spec -from typing import TYPE_CHECKING, Any, Callable, Optional, Union +from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Union import loky @@ -46,11 +46,6 @@ else: from typing_extensions import TypeAlias -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - with_ipyparallel = find_spec("ipyparallel") is not None with_distributed = find_spec("distributed") is not None diff --git a/benchmarks/asv.conf.json b/benchmarks/asv.conf.json index 3231a9915..c5f4c8fdd 100644 --- a/benchmarks/asv.conf.json +++ b/benchmarks/asv.conf.json @@ -7,7 +7,7 @@ "environment_type": "conda", "install_timeout": 600, "show_commit_url": "https://github.com/python-adaptive/adaptive/commits/", - "pythons": ["3.7"], + "pythons": ["3.8"], "conda_channels": ["conda-forge"], "matrix": { "numpy": ["1.13"], diff --git a/noxfile.py b/noxfile.py index 73f8a769e..bdbeaf9e3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,7 @@ import nox -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"]) +@nox.session(python=["3.8", "3.9", "3.10", "3.11"]) @nox.parametrize("all_deps", [True, False]) def pytest(session, all_deps): session.install(".[testing,other]" if all_deps else ".[testing]") diff --git a/pyproject.toml b/pyproject.toml index 1bb5569d3..f307f1b3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,12 +8,11 @@ dynamic = ["version"] description = "Parallel active learning of mathematical functions" maintainers = [{ name = "Adaptive authors" }] license = { text = "BSD" } -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -96,11 +95,11 @@ output = ".coverage.xml" [tool.mypy] ignore_missing_imports = true -python_version = "3.7" +python_version = "3.8" [tool.ruff] line-length = 150 -target-version = "py37" +target-version = "py38" select = ["B", "C", "E", "F", "W", "T", "B9", "I", "UP"] ignore = [ "T20", # flake8-print