Skip to content

Commit 87d04ae

Browse files
authored
Merge pull request #3438 from effigies/mnt/python_310
MNT: Test on Python 3.10
2 parents 96c50f2 + 9ae5c67 commit 87d04ae

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: ['ubuntu-18.04']
30-
python-version: [3.6, 3.7, 3.8, 3.9]
29+
os: ['ubuntu-latest']
30+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
3131
check: ['test']
3232
pip-flags: ['']
3333
depends: ['REQUIREMENTS']

nipype/info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def get_nipype_gitversion():
5757
"Programming Language :: Python :: 3.6",
5858
"Programming Language :: Python :: 3.7",
5959
"Programming Language :: Python :: 3.8",
60+
"Programming Language :: Python :: 3.9",
61+
"Programming Language :: Python :: 3.10",
6062
"Topic :: Scientific/Engineering",
6163
]
6264
PYTHON_REQUIRES = ">= 3.6"
@@ -169,7 +171,6 @@ def get_nipype_gitversion():
169171
"sphinx-argparse",
170172
"sphinx>=2.1.2",
171173
"sphinxcontrib-apidoc",
172-
"sphinxcontrib-napoleon",
173174
],
174175
"duecredit": ["duecredit"],
175176
"nipy": ["nitime", "nilearn", "dipy", "nipy", "matplotlib"],

nipype/sphinxext/apidoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
"""Settings for sphinxext.interfaces and connection to sphinx-apidoc."""
44
import re
5-
from sphinxcontrib.napoleon import (
5+
from sphinx.ext.napoleon import (
66
Config as NapoleonConfig,
77
_patch_python_domain,
88
_skip_member as _napoleon_skip_member,

nipype/sphinxext/apidoc/docstring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
"""Reformat interface docstrings."""
44
import re
5-
from sphinxcontrib.napoleon._upstream import _
6-
from sphinxcontrib.napoleon.docstring import NumpyDocstring
5+
from sphinx.locale import _
6+
from sphinx.ext.napoleon.docstring import NumpyDocstring
77

88

99
class NipypeDocstring(NumpyDocstring):
@@ -34,7 +34,7 @@ class InterfaceDocstring(NipypeDocstring):
3434
docstring : :obj:`str` or :obj:`list` of :obj:`str`
3535
The docstring to parse, given either as a string or split into
3636
individual lines.
37-
config: :obj:`sphinxcontrib.napoleon.Config` or :obj:`sphinx.config.Config`
37+
config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
3838
The configuration settings to use. If not given, defaults to the
3939
config object on `app`; or if `app` is not given defaults to the
4040
a new :class:`nipype.sphinxext.apidoc.Config` object.

nipype/utils/tests/test_cmd.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ def test_main_returns_0_on_help(self):
4545
assert exit_exception.code == 0
4646

4747
assert stderr.getvalue() == ""
48+
if sys.version_info >= (3, 10):
49+
options = "options"
50+
else:
51+
options = "optional arguments"
4852
assert (
4953
stdout.getvalue()
50-
== """usage: nipype_cmd [-h] module interface
54+
== f"""usage: nipype_cmd [-h] module interface
5155
5256
Nipype interface runner
5357
5458
positional arguments:
5559
module Module name
5660
interface Interface name
5761
58-
optional arguments:
62+
{options}:
5963
-h, --help show this help message and exit
6064
"""
6165
)

0 commit comments

Comments
 (0)