Skip to content

Commit 92ed36d

Browse files
committed
Dropped Python 3.5 support
1 parent 6ba0ad8 commit 92ed36d

File tree

10 files changed

+32
-92
lines changed

10 files changed

+32
-92
lines changed

.github/workflows/codeqa-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
os: [ubuntu-latest]
32-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
32+
python-version: [3.6, 3.7, 3.8, 3.9]
3333
runs-on: ${{ matrix.os }}
3434
steps:
3535
- uses: actions/checkout@v2

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**UNRELEASED**
2+
3+
- Dropped Python 3.5 support
4+
15
**1.11.1**
26

37
- Changed formatting of ``None`` to point to the Python stdlib docs (PR by Dominic Davis-Foster)

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ classifiers =
1818
Topic :: Documentation :: Sphinx
1919
Programming Language :: Python
2020
Programming Language :: Python :: 3
21-
Programming Language :: Python :: 3.5
2221
Programming Language :: Python :: 3.6
2322
Programming Language :: Python :: 3.7
2423
Programming Language :: Python :: 3.8
2524
Programming Language :: Python :: 3.9
2625

2726
[options]
2827
py_modules = sphinx_autodoc_typehints
29-
python_requires = >=3.5.2
28+
python_requires = >=3.6
3029
install_requires = Sphinx >= 3.0
3130

3231
[options.extras_require]

tests/roots/test-dataclass/conf.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/roots/test-dataclass/dataclass_module.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/roots/test-dataclass/index.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/roots/test-dummy/dummy_module.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import typing
2+
from dataclasses import dataclass
23
from mailbox import Mailbox
34
from typing import Callable, Union
45

5-
try:
6-
from dataclasses import dataclass
7-
except ImportError:
8-
def dataclass(cls):
9-
return cls
10-
116

127
def get_local_function():
138
def wrapper(self) -> str:
@@ -235,6 +230,13 @@ def undocumented_function(x: int) -> str:
235230
return str(x)
236231

237232

233+
@dataclass
234+
class DataClass:
235+
"""Class docstring."""
236+
237+
x: int
238+
239+
238240
class Decorator:
239241
"""
240242
Initializer docstring.

tests/test_dataclass_py36.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/test_sphinx_autodoc_typehints.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,14 @@ def test_sphinx_output(app, status, warning, always_document_param_types):
248248
assert 'Cannot resolve forward reference in type annotations of ' in warnings, warnings
249249

250250
format_args = {}
251-
if always_document_param_types:
252-
format_args['undoc_params'] = '\n\n Parameters:\n **x** ("int") --'
253-
else:
254-
format_args['undoc_params'] = ''
251+
for indentation_level in range(2):
252+
key = f'undoc_params_{indentation_level}'
253+
if always_document_param_types:
254+
format_args[key] = textwrap.indent(
255+
'\n\n Parameters:\n **x** ("int") --', ' ' * indentation_level
256+
)
257+
else:
258+
format_args[key] = ''
255259

256260
text_path = pathlib.Path(app.srcdir) / '_build' / 'text' / 'index.txt'
257261
with text_path.open('r') as f:
@@ -494,11 +498,19 @@ class dummy_module.ClassWithTypehintsNotInline(x=None)
494498
495499
dummy_module.undocumented_function(x)
496500
497-
Hi{undoc_params}
501+
Hi{undoc_params_0}
498502
499503
Return type:
500504
"str"
501505
506+
class dummy_module.DataClass(x)
507+
508+
Class docstring.{undoc_params_0}
509+
510+
__init__(x)
511+
512+
Initialize self. See help(type(self)) for accurate signature.{undoc_params_1}
513+
502514
@dummy_module.Decorator(func)
503515
504516
Initializer docstring.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.3.0
3-
envlist = py35, py36, py37, py38, py39, flake8
3+
envlist = py36, py37, py38, py39, flake8
44
skip_missing_interpreters = true
55
isolated_build = true
66

0 commit comments

Comments
 (0)