Skip to content

Commit 0cacbf9

Browse files
Drop Python 3.7 (#462)
1 parent 4a06aaf commit 0cacbf9

File tree

7 files changed

+8
-28
lines changed

7 files changed

+8
-28
lines changed

.github/workflows/test.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [Ubuntu]
19-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2020
sphinx-version:
2121
[
2222
"sphinx==5.0",
@@ -25,16 +25,6 @@ jobs:
2525
"sphinx==6.2",
2626
"sphinx>=7.0",
2727
]
28-
exclude:
29-
- os: Ubuntu
30-
python-version: "3.7"
31-
sphinx-version: "sphinx==6.0"
32-
- os: ubuntu
33-
python-version: "3.7"
34-
sphinx-version: "sphinx==6.2"
35-
- os: ubuntu
36-
python-version: "3.7"
37-
sphinx-version: "sphinx>=7.0"
3828
steps:
3929
- uses: actions/checkout@v3
4030

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ repos:
3737
rev: v3.3.1
3838
hooks:
3939
- id: pyupgrade
40-
args: [--py37-plus]
40+
args: [--py38-plus]

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ docstrings formatted according to the NumPy documentation format.
1818
The extension also adds the code description directives
1919
``np:function``, ``np-c:function``, etc.
2020

21-
numpydoc requires Python 3.7+ and sphinx 5+.
21+
numpydoc requires Python 3.8+ and sphinx 5+.
2222

2323
For usage information, please refer to the `documentation
2424
<https://numpydoc.readthedocs.io/>`_.

doc/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Getting started
55
Installation
66
============
77

8-
This extension requires Python 3.7+, sphinx 5+ and is available from:
8+
This extension requires Python 3.8+, sphinx 5+ and is available from:
99

1010
* `numpydoc on PyPI <http://pypi.python.org/pypi/numpydoc>`_
1111
* `numpydoc on GitHub <https://github.com/numpy/numpydoc/>`_

numpydoc/docscrape.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@
1111
import copy
1212
import sys
1313

14-
15-
# TODO: Remove try-except when support for Python 3.7 is dropped
16-
try:
17-
from functools import cached_property
18-
except ImportError: # cached_property added in Python 3.8
19-
cached_property = property
14+
from functools import cached_property
2015

2116

2217
def strip_blank_lines(l):

numpydoc/tests/test_docscrape.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections import namedtuple
22
from copy import deepcopy
33
import re
4-
import sys
54
import textwrap
65
import warnings
76

@@ -1624,9 +1623,6 @@ def __call__(self):
16241623
nds._error_location(msg=msg)
16251624

16261625

1627-
@pytest.mark.skipif(
1628-
sys.version_info < (3, 8), reason="cached_property was added in 3.8"
1629-
)
16301626
def test_class_docstring_cached_property():
16311627
"""Ensure that properties marked with the `cached_property` decorator
16321628
are listed in the Methods section. See gh-432."""

setup.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
if version is None:
1414
raise RuntimeError("Could not determine version")
1515

16-
if sys.version_info < (3, 7):
17-
raise RuntimeError("Python version >= 3.7 required.")
16+
if sys.version_info < (3, 8):
17+
raise RuntimeError("Python version >= 3.8 required.")
1818

1919

2020
def read(fname):
@@ -42,7 +42,6 @@ def read(fname):
4242
"Topic :: Documentation",
4343
"Programming Language :: Python",
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.7",
4645
"Programming Language :: Python :: 3.8",
4746
"Programming Language :: Python :: 3.9",
4847
"Programming Language :: Python :: 3.10",
@@ -54,7 +53,7 @@ def read(fname):
5453
url="https://numpydoc.readthedocs.io",
5554
license="BSD",
5655
install_requires=["sphinx>=5", "Jinja2>=2.10"],
57-
python_requires=">=3.7",
56+
python_requires=">=3.8",
5857
extras_require={
5958
"testing": [
6059
req

0 commit comments

Comments
 (0)