summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHernan Grecco <hgrecco@gmail.com>2023-04-29 19:10:38 -0300
committerHernan Grecco <hgrecco@gmail.com>2023-04-29 19:20:18 -0300
commit1208b3d503913eabe8ac96db18ee2ad14af1bdd6 (patch)
treebca861cc05cfd773dbeb4d248dde5d04f0e74c5d
parentf3f2158ac7600e26a32141ec5da7cc69dfb461d7 (diff)
downloadpint-1208b3d503913eabe8ac96db18ee2ad14af1bdd6.tar.gz
Apply NEP-29: Pint now requires Python 3.9+ and NumPy 1.21+
-rw-r--r--.github/workflows/ci.yml16
-rw-r--r--.github/workflows/docs.yml4
-rw-r--r--.readthedocs.yaml2
-rw-r--r--README.rst2
-rw-r--r--docs/getting/index.rst2
-rw-r--r--docs/getting/overview.rst2
-rw-r--r--pint/util.py4
-rw-r--r--pyproject.toml3
8 files changed, 16 insertions, 19 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 369b9b9..e73a8c8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,15 +7,15 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.8, 3.9, "3.10", "3.11"]
- numpy: [null, "numpy>=1.19,<2.0.0"]
+ python-version: [3.9, "3.10", "3.11"]
+ numpy: [null, "numpy>=1.21,<2.0.0"]
uncertainties: [null, "uncertainties==3.1.6", "uncertainties>=3.1.6,<4.0.0"]
extras: [null]
include:
- - python-version: 3.8 # Minimal versions
+ - python-version: 3.9 # Minimal versions
numpy: "numpy"
extras: matplotlib==2.2.5
- - python-version: 3.8
+ - python-version: 3.9
numpy: "numpy"
uncertainties: "uncertainties"
extras: "sparse xarray netCDF4 dask[complete]==2023.4.0 graphviz babel==2.8"
@@ -92,8 +92,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.8, 3.9, "3.10", "3.11"]
- numpy: [ "numpy>=1.19,<2.0.0" ]
+ python-version: [3.9, "3.10", "3.11"]
+ numpy: [ "numpy>=1.21,<2.0.0" ]
runs-on: windows-latest
env:
@@ -153,8 +153,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.8, 3.9, "3.10", "3.11"]
- numpy: [null, "numpy>=1.19,<2.0.0" ]
+ python-version: [3.9, "3.10", "3.11"]
+ numpy: [null, "numpy>=1.21,<2.0.0" ]
runs-on: macos-latest
env:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 2340683..0a26da8 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -14,10 +14,10 @@ jobs:
- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- - name: Set up Python 3.8
+ - name: Set up minimal Python version
uses: actions/setup-python@v2
with:
- python-version: 3.8
+ python-version: 3.9
- name: Get pip cache dir
id: pip-cache
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index 2bda3d4..830a8c2 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -5,7 +5,7 @@ sphinx:
configuration: docs/conf.py
fail_on_warning: false
python:
- version: 3.8
+ version: 3.9
install:
- requirements: requirements_docs.txt
- method: pip
diff --git a/README.rst b/README.rst
index 32879d9..89f19f4 100644
--- a/README.rst
+++ b/README.rst
@@ -43,7 +43,7 @@ and constants. Due to its modular design, you can extend (or even rewrite!)
the complete list without changing the source code. It supports a lot of
numpy mathematical operations **without monkey patching or wrapping numpy**.
-It has a complete test coverage. It runs in Python 3.8+ with no other dependency.
+It has a complete test coverage. It runs in Python 3.9+ with no other dependency.
It is licensed under BSD.
It is extremely easy and natural to use:
diff --git a/docs/getting/index.rst b/docs/getting/index.rst
index 9907aeb..41ffaf9 100644
--- a/docs/getting/index.rst
+++ b/docs/getting/index.rst
@@ -8,7 +8,7 @@ The getting started guide aims to get you using pint productively as quickly as
Installation
------------
-Pint has no dependencies except Python itself. In runs on Python 3.8+.
+Pint has no dependencies except Python itself. In runs on Python 3.9+.
.. grid:: 2
diff --git a/docs/getting/overview.rst b/docs/getting/overview.rst
index cd639aa..61dfc14 100644
--- a/docs/getting/overview.rst
+++ b/docs/getting/overview.rst
@@ -14,7 +14,7 @@ Due to its modular design, you can extend (or even rewrite!) the complete list
without changing the source code. It supports a lot of numpy mathematical
operations **without monkey patching or wrapping numpy**.
-It has a complete test coverage. It runs in Python 3.8+ with no other
+It has a complete test coverage. It runs in Python 3.9+ with no other
dependencies. It is licensed under a `BSD 3-clause style license`_.
It is extremely easy and natural to use:
diff --git a/pint/util.py b/pint/util.py
index d5f3aab..8b62009 100644
--- a/pint/util.py
+++ b/pint/util.py
@@ -1020,9 +1020,7 @@ def sized(y) -> bool:
return True
-@functools.lru_cache(
- maxsize=None
-) # TODO: replace with cache when Python 3.8 is dropped.
+@functools.cache
def _build_type(class_name: str, bases):
return type(class_name, bases, dict())
diff --git a/pyproject.toml b/pyproject.toml
index 72b6560..e231412 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,12 +22,11 @@ classifiers = [
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
-requires-python = ">=3.8"
+requires-python = ">=3.9"
dynamic = ["version"]
[tool.setuptools.package-data]