Skip to content

Commit

Permalink
Drop Python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Jan 10, 2024
1 parent 26eab1c commit b3f28ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand All @@ -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",
Expand Down
7 changes: 3 additions & 4 deletions tests/test_fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import math
import sys
from typing import Tuple

import pytest
from hypothesis import assume, example, given, note
Expand Down Expand Up @@ -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))

Expand All @@ -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

Expand All @@ -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:
Expand Down

0 comments on commit b3f28ac

Please sign in to comment.