diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 774323b6..8e070737 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,12 +16,9 @@ jobs:
strategy:
matrix:
os: [Ubuntu]
- python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
sphinx-version:
["sphinx==6.0", "sphinx==6.2", "sphinx==7.0", "'sphinx>=7.2,<7.3'"]
- exclude:
- - python-version: "3.8"
- sphinx-version: "'sphinx>=7.2,<7.3'"
steps:
- uses: actions/checkout@v4
diff --git a/README.rst b/README.rst
index a5af9a00..87661b6f 100644
--- a/README.rst
+++ b/README.rst
@@ -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.8+ and sphinx 5+.
+numpydoc requires Python 3.9+ and sphinx 6+.
For usage information, please refer to the `documentation
`_.
diff --git a/doc/install.rst b/doc/install.rst
index 480bd59a..6282ffed 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -5,7 +5,7 @@ Getting started
Installation
============
-This extension requires Python 3.8+, sphinx 5+ and is available from:
+This extension requires Python 3.9+, sphinx 6+ and is available from:
* `numpydoc on PyPI `_
* `numpydoc on GitHub `_
diff --git a/numpydoc/tests/test_validate.py b/numpydoc/tests/test_validate.py
index eb00f896..c66f9ee9 100644
--- a/numpydoc/tests/test_validate.py
+++ b/numpydoc/tests/test_validate.py
@@ -1,5 +1,4 @@
import pytest
-import sys
import warnings
from contextlib import nullcontext
from functools import cached_property, partial, wraps
@@ -1638,15 +1637,12 @@ def test_raises_for_invalid_attribute_name(self, invalid_name):
with pytest.raises(AttributeError, match=msg):
numpydoc.validate.Validator._load_obj(invalid_name)
- # inspect.getsourcelines does not return class decorators for Python 3.8. This was
- # fixed starting with 3.9: https://github.com/python/cpython/issues/60060.
@pytest.mark.parametrize(
["decorated_obj", "def_line"],
[
[
"numpydoc.tests.test_validate.DecoratorClass",
- getsourcelines(DecoratorClass)[-1]
- + (2 if sys.version_info.minor > 8 else 0),
+ getsourcelines(DecoratorClass)[-1] + 2,
],
[
"numpydoc.tests.test_validate.DecoratorClass.test_no_decorator",
diff --git a/pyproject.toml b/pyproject.toml
index c76d2192..f7543f3a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ requires = ['setuptools>=61.2']
name = 'numpydoc'
description = 'Sphinx extension to support docstrings in Numpy format'
readme = 'README.rst'
-requires-python = '>=3.8'
+requires-python = '>=3.9'
dynamic = ['version']
keywords = [
'sphinx',
@@ -19,7 +19,6 @@ classifiers = [
'Topic :: Documentation',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',