From b3f28acc57c1f2a726adf0ad16b6157e6ded576c Mon Sep 17 00:00:00 2001 From: yut23 Date: Tue, 9 Jan 2024 19:06:37 -0500 Subject: [PATCH] Drop Python 3.8 support --- pyproject.toml | 9 ++++----- tests/test_fp.py | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa129e8..de62382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "yut23-utils" dynamic = ["version"] description = 'Common code I find myself reaching for from multiple different repositories.' readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = "BSD-3-Clause" keywords = [] authors = [ @@ -16,7 +16,6 @@ authors = [ classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -53,7 +52,7 @@ cov = [ ] [[tool.hatch.envs.all.matrix]] -python = ["3.8", "3.9", "3.10", "3.11", "3.12"] +python = ["3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true @@ -80,12 +79,12 @@ all = [ ] [tool.black] -target-version = ["py38"] +target-version = ["py39"] line-length = 88 skip-string-normalization = false [tool.ruff] -target-version = "py38" +target-version = "py39" line-length = 88 select = [ "A", diff --git a/tests/test_fp.py b/tests/test_fp.py index a0cd173..6201710 100644 --- a/tests/test_fp.py +++ b/tests/test_fp.py @@ -4,7 +4,6 @@ import math import sys -from typing import Tuple import pytest from hypothesis import assume, example, given, note @@ -38,7 +37,7 @@ def test_int_to_float(x_int: int) -> None: @st.composite -def float_pairs(draw: st.DrawFn, max_ulps: int) -> Tuple[float, float, int]: +def float_pairs(draw: st.DrawFn, max_ulps: int) -> tuple[float, float, int]: a = draw(st.floats(allow_nan=False, allow_infinity=False)) ulps = draw(st.integers(min_value=-max_ulps, max_value=max_ulps)) @@ -57,7 +56,7 @@ def float_pairs(draw: st.DrawFn, max_ulps: int) -> Tuple[float, float, int]: @example((5e-324, 0.0, -1)) @example((5e-324, -0.0, -1)) @example((-5e-324, 5e-324, 2)) -def test_ulp_diff(args: Tuple[float, float, int]) -> None: +def test_ulp_diff(args: tuple[float, float, int]) -> None: a, b, ulps = args assert ulp_diff(a, b) == ulps @@ -81,7 +80,7 @@ def test_ulp_diff_errors(a: float, b: float) -> None: @given(float_pairs(max_ulps=100)) @example((-5e-324, 5e-324, 2)) -def test_compare_ulp(args: Tuple[float, float, int]) -> None: +def test_compare_ulp(args: tuple[float, float, int]) -> None: a, b, ulps = args assert compare_ulp(a, b, abs(ulps)) if abs(ulps) > 0: