Skip to content

Commit

Permalink
drop support for python-3.8 (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski authored Aug 1, 2024
1 parent b95c39b commit cbd136b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
arch: [auto, aarch64]
py: [cp38, cp39, cp310, cp311, cp312]
py: [cp39, cp310, cp311, cp312]
exclude:
- os: windows-latest
arch: aarch64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
python-version: "3.11"
installs: "numpy>=2.0.0rc1"
- os: macos-14
python-version: "3.8"
python-version: "3.9"
installs: "numpy==1.21.0 scipy matplotlib"
- os: ubuntu-latest
python-version: "pypy-3.8"
python-version: "pypy-3.9"
- os: ubuntu-latest
python-version: "3.12"
installs: "'numpy>=2.0.0rc1' scipy matplotlib"
Expand Down
18 changes: 14 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"COVERAGE_CORE": "sysmon", # faster coverage on Python 3.12
}

nox.options.sessions = ["test", "mintest", "maxtest"]


@nox.session(reuse_venv=True)
def test(session: nox.Session) -> None:
Expand All @@ -23,21 +25,29 @@ def test(session: nox.Session) -> None:
session.run("pytest", *session.posargs, env=ENV)


@nox.session(reuse_venv=True)
def np2test(session: nox.Session) -> None:
@nox.session(python="3.12", reuse_venv=True)
def maxtest(session: nox.Session) -> None:
"""Run the unit and regular tests."""
session.install("-e.", "scipy", "pytest", "--pre")
session.install("-e.", "scipy", "matplotlib", "pytest", "--pre")
session.run("pytest", *session.posargs, env=ENV)


@nox.session(venv_backend="uv")
@nox.session(python="3.9", venv_backend="uv")
def mintest(session: nox.Session) -> None:
"""Run the unit and regular tests."""
session.install("-e.", "--resolution=lowest-direct")
session.install("pytest")
session.run("pytest", *session.posargs)


@nox.session(python="pypy3.9", venv_backend="uv")
def pypy(session: nox.Session) -> None:
"""Run the unit and regular tests."""
session.install("-e.")
session.install("pytest")
session.run("pytest", *session.posargs)


# Python-3.12 provides coverage info faster
@nox.session(python="3.12", reuse_venv=True)
def cov(session: nox.Session) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maintainers = [
{ email = "[email protected]" },
]
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
5 changes: 4 additions & 1 deletion tests/test_issue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import numpy as np
import warnings


def test_issue_424():
Expand Down Expand Up @@ -152,7 +153,9 @@ def model(x, sig_n, sig_mu, sig_sigma, bkg_n, bkg_tau):

m = Minuit(nll, sig_n=33, sig_mu=ymu, sig_sigma=ysigma, bkg_n=66, bkg_tau=ytau)
# with Simplex the fit never yields NaN, which is good but not what we want here
m.migrad(use_simplex=False)
with warnings.catch_warnings():
warnings.simplefilter("ignore", RuntimeWarning)
m.migrad(use_simplex=False)

if np.isnan(m.fmin.edm):
assert not m.valid
Expand Down

0 comments on commit cbd136b

Please sign in to comment.