Skip to content

Commit

Permalink
BREAK!: drop Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Nov 8, 2023
1 parent aa36e66 commit 934014e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 272 deletions.
250 changes: 0 additions & 250 deletions .constraints/py3.7.txt

This file was deleted.

4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ repos:
hooks:
- id: nbqa-pyupgrade
args:
- --py37-plus
- --py38-plus
- id: nbqa-ruff
args:
- --fix
Expand Down Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -84,7 +83,6 @@ doc = [
"sphinx-togglebutton",
"sphobjinv",
"tensorwaves[all]",
'importlib-metadata; python_version <"3.8.0"',
]
format = [
"black",
Expand All @@ -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",
Expand All @@ -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
Expand All @@ -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_
Expand Down Expand Up @@ -207,7 +202,6 @@ preview = true
target-version = [
"py310",
"py311",
"py37",
"py38",
"py39",
]
Expand Down Expand Up @@ -399,7 +393,7 @@ src = [
"src",
"tests",
]
target-version = "py37"
target-version = "py38"
task-tags = ["cspell"]

[tool.ruff.per-file-ignores]
Expand Down
6 changes: 1 addition & 5 deletions tests/function/test_sympy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import logging
import sys
from typing import TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -117,10 +116,7 @@ def test_fast_lambdify(backend: str, max_complexity: int, use_cse: bool):
# cspell:ignore lambdifygenerated
repr_start = "<function _lambdifygenerated"
if backend == "jax":
if sys.version_info < (3, 8):
repr_start = "<CompiledFunction of " + repr_start
else:
repr_start = "<PjitFunction of " + repr_start
repr_start = "<PjitFunction of " + repr_start
# cspell:ignore Pjit
assert func_repr.startswith(repr_start)

Expand Down

0 comments on commit 934014e

Please sign in to comment.