Skip to content

Commit

Permalink
Drop Python 3.7 (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Jun 9, 2023
1 parent 4a06aaf commit 0cacbf9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 28 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
sphinx-version:
[
"sphinx==5.0",
Expand All @@ -25,16 +25,6 @@ jobs:
"sphinx==6.2",
"sphinx>=7.0",
]
exclude:
- os: Ubuntu
python-version: "3.7"
sphinx-version: "sphinx==6.0"
- os: ubuntu
python-version: "3.7"
sphinx-version: "sphinx==6.2"
- os: ubuntu
python-version: "3.7"
sphinx-version: "sphinx>=7.0"
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docstrings formatted according to the NumPy documentation format.
The extension also adds the code description directives
``np:function``, ``np-c:function``, etc.

numpydoc requires Python 3.7+ and sphinx 5+.
numpydoc requires Python 3.8+ and sphinx 5+.

For usage information, please refer to the `documentation
<https://numpydoc.readthedocs.io/>`_.
Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Getting started
Installation
============

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

* `numpydoc on PyPI <http://pypi.python.org/pypi/numpydoc>`_
* `numpydoc on GitHub <https://github.com/numpy/numpydoc/>`_
Expand Down
7 changes: 1 addition & 6 deletions numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
import copy
import sys


# TODO: Remove try-except when support for Python 3.7 is dropped
try:
from functools import cached_property
except ImportError: # cached_property added in Python 3.8
cached_property = property
from functools import cached_property


def strip_blank_lines(l):
Expand Down
4 changes: 0 additions & 4 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections import namedtuple
from copy import deepcopy
import re
import sys
import textwrap
import warnings

Expand Down Expand Up @@ -1624,9 +1623,6 @@ def __call__(self):
nds._error_location(msg=msg)


@pytest.mark.skipif(
sys.version_info < (3, 8), reason="cached_property was added in 3.8"
)
def test_class_docstring_cached_property():
"""Ensure that properties marked with the `cached_property` decorator
are listed in the Methods section. See gh-432."""
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
if version is None:
raise RuntimeError("Could not determine version")

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


def read(fname):
Expand Down Expand Up @@ -42,7 +42,6 @@ def read(fname):
"Topic :: Documentation",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -54,7 +53,7 @@ def read(fname):
url="https://numpydoc.readthedocs.io",
license="BSD",
install_requires=["sphinx>=5", "Jinja2>=2.10"],
python_requires=">=3.7",
python_requires=">=3.8",
extras_require={
"testing": [
req
Expand Down

0 comments on commit 0cacbf9

Please sign in to comment.