Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: drop Python 3.8 support due to EOL #143

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 0 additions & 245 deletions .constraints/py3.8.txt

This file was deleted.

15 changes: 7 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
"ampform_dpd.decay.StateIDTemplate": ("obj", "ampform_dpd.decay.StateID"),
"ampform_dpd.io.serialization.dynamics.T": "typing.TypeVar",
"DecayNode": ("obj", "ampform_dpd.decay.DecayNode"),
"EdgeType": "typing.TypeVar",
"FinalState": ("obj", "ampform_dpd.decay.FinalState"),
"FinalStateID": ("obj", "ampform_dpd.decay.FinalStateID"),
"FrozenTransition": "qrules.topology.FrozenTransition",
"InitialStateID": ("obj", "ampform_dpd.decay.InitialStateID"),
"Literal[-1, 1]": "typing.Literal",
"Literal[(-1, 1)]": "typing.Literal",
"Node": ("obj", "ampform_dpd.io.serialization.format.Node"),
"NodeType": "typing.TypeVar",
"ParameterValue": ("obj", "tensorwaves.interface.ParameterValue"),
"ParametrizedBackendFunction": "tensorwaves.function.ParametrizedBackendFunction",
"PoolSum": "ampform.sympy.PoolSum",
Expand Down Expand Up @@ -172,7 +174,7 @@
html_title = REPO_TITLE
intersphinx_mapping = {
"IPython": (f"https://ipython.readthedocs.io/en/{pin('IPython')}", None),
"ampform": (f"https://ampform.readthedocs.io/en/{pin('ampform')}", None),
"ampform": (f"https://ampform.readthedocs.io/{pin('ampform')}", None),
"attrs": (f"https://www.attrs.org/en/{pin('attrs')}", None),
"compwa": ("https://compwa.github.io", None),
"graphviz": ("https://graphviz.readthedocs.io/en/stable", None),
Expand All @@ -181,17 +183,14 @@
"matplotlib": (f"https://matplotlib.org/{pin('matplotlib')}", None),
"numpy": (f"https://numpy.org/doc/{pin_minor('numpy')}", None),
"python": ("https://docs.python.org/3", None),
"qrules": (f"https://qrules.readthedocs.io/en/{pin('qrules')}", None),
"qrules": (f"https://qrules.readthedocs.io/{pin('qrules')}", None),
"sympy": ("https://docs.sympy.org/latest", None),
"tensorwaves": (
f"https://tensorwaves.readthedocs.io/en/{pin('tensorwaves')}",
None,
),
"tensorwaves": (f"https://tensorwaves.readthedocs.io/{pin('tensorwaves')}", None),
}
linkcheck_anchors = False
linkcheck_ignore = [
"https://github.com/ComPWA/polarimetry",
"https://journals.aps.org/prd/pdf/10.1103/PhysRevD.101.034033#page=9",
"https://doi.org/10.1103",
"https://journals.aps.org/prd",
]
myst_enable_extensions = [
"amsmath",
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Physics",
Expand All @@ -38,7 +37,7 @@ description = "Symbolic expressions for Dalitz-Plot Decomposition"
dynamic = ["version"]
license = {file = "LICENSE"}
name = "ampform-dpd"
requires-python = ">=3.8"
requires-python = ">=3.9"

[project.optional-dependencies]
dev = [
Expand Down
6 changes: 3 additions & 3 deletions src/ampform_dpd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from collections import abc
from functools import lru_cache
from functools import cache
from itertools import product
from typing import Any, Literal, Protocol
from warnings import warn
Expand Down Expand Up @@ -289,7 +289,7 @@ def _create_coupling_symbol(
return H[resonance, interaction.L, interaction.S]


@lru_cache(maxsize=None)
@cache
def _get_coupling_base(
helicity_coupling: bool, typ: Literal["production", "decay"]
) -> sp.IndexedBase:
Expand Down Expand Up @@ -331,7 +331,7 @@ def _formulate_clebsch_gordan_factors(
return sqrt_factor * cg_ll * cg_ss


@lru_cache(maxsize=None)
@cache
def _generate_amplitude_index_bases() -> dict[FinalStateID, sp.IndexedBase]:
return dict(enumerate(sp.symbols(R"A^(1:4)", cls=sp.IndexedBase), 1)) # type:ignore[arg-type]

Expand Down
4 changes: 3 additions & 1 deletion src/ampform_dpd/_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Iterable, SupportsFloat
from typing import TYPE_CHECKING, SupportsFloat

import sympy as sp

if TYPE_CHECKING:
from collections.abc import Iterable

from attrs import Attribute

from ampform_dpd.decay import LSCoupling, ThreeBodyDecayChain
Expand Down
2 changes: 1 addition & 1 deletion src/ampform_dpd/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _get_python_hash_seed() -> int | None:
return None


@functools.lru_cache(maxsize=None) # warn once
@functools.cache # warn once
def _warn_about_unsafe_hash() -> None:
message = """
PYTHONHASHSEED has not been set. For faster and safer hashing of SymPy expressions,
Expand Down
5 changes: 4 additions & 1 deletion src/ampform_dpd/adapter/qrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections import abc, defaultdict
from functools import singledispatch
from pathlib import Path
from typing import Any, Iterable, NoReturn, TypeVar, overload
from typing import TYPE_CHECKING, Any, NoReturn, TypeVar, overload

import attrs
import qrules
Expand All @@ -24,6 +24,9 @@
ThreeBodyDecayChain,
)

if TYPE_CHECKING:
from collections.abc import Iterable

_LOGGER = logging.getLogger(__name__)


Expand Down
Loading
Loading