From ba70ddc9b456bfa84ce929ce1dbbaa7f3b6913bf Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:21:19 +0100 Subject: [PATCH] BREAK!: drop Python 3.7 support --- .constraints/py3.7.txt | 250 ----------------------------------- .pre-commit-config.yaml | 4 +- docs/conf.py | 9 +- pyproject.toml | 10 +- tests/function/test_sympy.py | 7 +- 5 files changed, 7 insertions(+), 273 deletions(-) delete mode 100644 .constraints/py3.7.txt diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt deleted file mode 100644 index 2c4534f3..00000000 --- a/.constraints/py3.7.txt +++ /dev/null @@ -1,250 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.7 -# by the following command: -# -# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.7.txt --resolver=backtracking --strip-extras --unsafe-package=pip --unsafe-package=setuptools --unsafe-package=tensorwaves -# -absl-py==2.0.0 -accessible-pygments==0.0.4 -aiofiles==22.1.0 -aiosqlite==0.19.0 -alabaster==0.7.13 -ampform==0.14.6 -anyio==3.7.1 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.2.3 -astunparse==1.6.3 -attrs==23.1.0 -babel==2.13.0 -backcall==0.2.0 -beautifulsoup4==4.12.2 -black==23.3.0 -bleach==6.0.0 -cached-property==1.5.2 -cachetools==5.3.1 -certifi==2023.7.22 -cffi==1.15.1 -cfgv==3.3.1 -chardet==5.2.0 -charset-normalizer==3.3.0 -click==8.1.7 -cloudpickle==2.2.1 -colorama==0.4.6 -comm==0.1.4 -coverage==7.2.7 -cycler==0.11.0 -debugpy==1.7.0 -decorator==5.1.1 -defusedxml==0.7.1 -deprecated==1.2.14 -distlib==0.3.7 -dm-tree==0.1.8 -docstring-to-markdown==0.12 -docutils==0.19 -entrypoints==0.4 -exceptiongroup==1.1.3 -execnet==2.0.2 -fastjsonschema==2.18.1 -filelock==3.12.2 -flatbuffers==23.5.26 -fonttools==4.38.0 -fqdn==1.5.1 -gast==0.4.0 -google-auth==2.23.2 -google-auth-oauthlib==0.4.6 -google-pasta==0.2.0 -graphviz==0.20.1 -greenlet==3.0.0 -grpcio==1.59.0 -h5py==3.8.0 -hepunits==2.3.2 -identify==2.5.24 -idna==3.4 -imagesize==1.4.1 -iminuit==2.18.0 -importlib-metadata==6.7.0 -importlib-resources==5.12.0 -iniconfig==2.0.0 -ipykernel==6.16.2 -ipympl==0.9.3 -ipython==7.34.0 -ipython-genutils==0.2.0 -ipywidgets==8.1.1 -isoduration==20.11.0 -jax==0.3.25 -jaxlib==0.3.25 -jedi==0.18.2 -jinja2==3.1.2 -json5==0.9.14 -jsonpointer==2.4 -jsonschema==4.17.3 -jupyter==1.0.0 -jupyter-cache==0.5.0 -jupyter-client==7.4.9 -jupyter-console==6.6.3 -jupyter-core==4.12.0 -jupyter-events==0.6.3 -jupyter-lsp==1.5.1 -jupyter-server==1.24.0 -jupyter-server-fileid==0.9.0 -jupyter-server-ydoc==0.8.0 -jupyter-ydoc==0.2.4 -jupyterlab==3.6.6 -jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==3.10.2 -jupyterlab-myst==1.2.0 -jupyterlab-pygments==0.2.2 -jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.9 -keras==2.11.0 -kiwisolver==1.4.5 -libclang==16.0.6 -livereload==2.6.3 -llvmlite==0.39.1 -markdown==3.4.4 -markdown-it-py==2.2.0 -markupsafe==2.1.3 -matplotlib==3.5.3 -matplotlib-inline==0.1.6 -mdit-py-plugins==0.3.5 -mdurl==0.1.2 -mistune==3.0.2 -mpmath==1.3.0 -mypy==1.4.1 -mypy-extensions==1.0.0 -myst-nb==0.17.2 -myst-parser==0.18.1 -nbclassic==1.0.0 -nbclient==0.5.13 -nbconvert==7.6.0 -nbformat==5.8.0 -nbmake==1.2.1 -nest-asyncio==1.5.8 -nodeenv==1.8.0 -notebook==6.5.6 -notebook-shim==0.2.3 -numba==0.56.4 -numpy==1.21.6 -oauthlib==3.2.2 -opt-einsum==3.3.0 -packaging==23.2 -pandas==1.3.5 -pandocfilters==1.5.0 -parso==0.8.3 -particle==0.23.0 -pathspec==0.11.2 -pexpect==4.8.0 -phasespace==1.8.0 -pickleshare==0.7.5 -pillow==9.5.0 -pkgutil-resolve-name==1.3.10 -platformdirs==3.11.0 -pluggy==1.2.0 -pre-commit==2.21.0 -prometheus-client==0.17.1 -prompt-toolkit==3.0.39 -protobuf==3.19.6 -psutil==5.9.5 -ptyprocess==0.7.0 -py-cpuinfo==9.0.0 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -pycparser==2.21 -pydantic==1.10.13 -pydata-sphinx-theme==0.13.3 -pygments==2.16.1 -pyparsing==3.1.1 -pyproject-api==1.5.3 -pyrsistent==0.19.3 -pytest==7.4.2 -pytest-benchmark==4.0.0 -pytest-cov==4.1.0 -pytest-mock==3.11.1 -pytest-xdist==3.3.1 -python-constraint==1.4.0 -python-dateutil==2.8.2 -python-json-logger==2.0.7 -python-lsp-jsonrpc==1.0.0 -python-lsp-server==1.7.4 -pytoolconfig==1.2.5 -pytz==2023.3.post1 -pyyaml==6.0.1 -pyzmq==24.0.1 -qrules==0.9.8 -qtconsole==5.4.4 -qtpy==2.4.0 -requests==2.31.0 -requests-oauthlib==1.3.1 -rfc3339-validator==0.1.4 -rfc3986-validator==0.1.1 -rope==1.9.0 -rsa==4.9 -ruff==0.0.292 -scipy==1.7.3 -send2trash==1.8.2 -singledispatchmethod==1.0 -six==1.16.0 -sniffio==1.3.0 -snowballstemmer==2.2.0 -soupsieve==2.4.1 -sphinx==5.3.0 -sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.0.1 -sphinx-codeautolink==0.15.0 -sphinx-comments==0.0.3 -sphinx-copybutton==0.5.2 -sphinx-design==0.4.1 -sphinx-thebe==0.2.1 -sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -sphobjinv==2.3.1 -sqlalchemy==1.4.49 -sympy==1.10.1 -tabulate==0.9.0 -tensorboard==2.11.2 -tensorboard-data-server==0.6.1 -tensorboard-plugin-wit==1.8.1 -tensorflow==2.11.0 -tensorflow-estimator==2.11.0 -tensorflow-io-gcs-filesystem==0.34.0 -tensorflow-probability==0.18.0 -termcolor==2.3.0 -terminado==0.17.1 -tinycss2==1.2.1 -tomli==2.0.1 -tornado==6.2 -tox==4.8.0 -tqdm==4.66.1 -traitlets==5.9.0 -typed-ast==1.5.5 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 -types-setuptools==68.2.0.0 -typing-extensions==4.7.1 -ujson==5.7.0 -uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 -webcolors==1.13 -webencodings==0.5.1 -websocket-client==1.6.1 -werkzeug==2.2.3 -wheel==0.41.2 -widgetsnbextension==4.0.9 -wrapt==1.15.0 -y-py==0.5.9 -ypy-websocket==0.8.2 -zipp==3.15.0 - -# The following packages are considered to be unsafe in a requirements file: -# setuptools -# tensorwaves diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 707dbbe8..4d0d3e5a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,7 +64,7 @@ repos: hooks: - id: nbqa-pyupgrade args: - - --py37-plus + - --py38-plus - id: nbqa-ruff args: - --fix @@ -161,7 +161,7 @@ repos: hooks: - id: pyupgrade args: - - --py37-plus + - --py38-plus - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.0.292 diff --git a/docs/conf.py b/docs/conf.py index 2ac78979..fbcb2f64 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,13 +12,8 @@ import sys import requests - -if sys.version_info < (3, 8): - from importlib_metadata import PackageNotFoundError - from importlib_metadata import version as get_package_version -else: - from importlib.metadata import PackageNotFoundError - from importlib.metadata import version as get_package_version +from importlib_metadata import PackageNotFoundError +from importlib_metadata import version as get_package_version # -- Project information ----------------------------------------------------- project = "TensorWaves" diff --git a/pyproject.toml b/pyproject.toml index 3c9c6e37..96b3d857 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python", @@ -47,7 +46,7 @@ keywords = [ license = {text = "GPLv3 or later"} maintainers = [{email = "compwa-admin@ep1.rub.de"}] name = "tensorwaves" -requires-python = ">=3.7" +requires-python = ">=3.8" [project.optional-dependencies] all = [ @@ -84,7 +83,6 @@ doc = [ "sphinx-togglebutton", "sphobjinv", "tensorwaves[all]", - 'importlib-metadata; python_version <"3.8.0"', ] format = [ "black", @@ -100,7 +98,6 @@ jupyter = [ "jupyterlab-myst", "python-lsp-server[rope]", "tensorwaves[doc]", - 'ypy-websocket <0.8.3; python_version <"3.8.0"', ] lint = [ "ruff", @@ -126,7 +123,6 @@ phasespace = [ phsp = [ "phasespace[tf] >=1.7.0", "tensorwaves[tensorflow]", - 'phasespace <1.9.0; python_version <"3.8.0"', ] pwa = [ "ampform >=0.12.0", # https://github.com/ComPWA/ampform/pull/177 @@ -150,7 +146,6 @@ test = [ "pytest-cov", "pytest-xdist", "tensorwaves[test-types]", - 'nbmake <1.3; python_version <"3.8.0"', ] test-types = [ "ipython", # test _repr_pretty_ @@ -207,7 +202,6 @@ preview = true target-version = [ "py310", "py311", - "py37", "py38", "py39", ] @@ -399,7 +393,7 @@ src = [ "src", "tests", ] -target-version = "py37" +target-version = "py38" task-tags = ["cspell"] [tool.ruff.per-file-ignores] diff --git a/tests/function/test_sympy.py b/tests/function/test_sympy.py index b61c7756..86dc2be0 100644 --- a/tests/function/test_sympy.py +++ b/tests/function/test_sympy.py @@ -1,7 +1,6 @@ from __future__ import annotations import logging -import sys from typing import TYPE_CHECKING import numpy as np @@ -117,11 +116,7 @@ def test_fast_lambdify(backend: str, max_complexity: int, use_cse: bool): # cspell:ignore lambdifygenerated repr_start = "