Skip to content

Commit

Permalink
Apply NEP-29: Pint now requires Python 3.9+ and NumPy 1.21+
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Apr 29, 2023
1 parent f3f2158 commit 1208b3d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/getting/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions pint/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1208b3d

Please sign in to comment.