Skip to content

Commit a9e25e1

Browse files
authored
Merge pull request #3589 from effigies/mnt/py311
CI: Test on Python 3.11
2 parents a3f8ecd + 53a2880 commit a9e25e1

File tree

3 files changed

+7
-28
lines changed

3 files changed

+7
-28
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ jobs:
9090
runs-on: ${{ matrix.os }}
9191
strategy:
9292
matrix:
93-
os: ['ubuntu-20.04']
94-
python-version: [3.8, 3.9, "3.10"]
93+
os: ['ubuntu-22.04']
94+
python-version: ['3.8', '3.9', '3.10', '3.11']
9595
check: ['test']
9696
pip-flags: ['']
9797
depends: ['REQUIREMENTS']
9898
deb-depends: [false]
9999
nipype-extras: ['doc,tests,profiler']
100100
include:
101-
- os: ubuntu-20.04
102-
python-version: 3.8
101+
- os: ubuntu-22.04
102+
python-version: '3.8'
103103
check: test
104104
pip-flags: ''
105105
depends: REQUIREMENTS

nipype/info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def get_nipype_gitversion():
5757
"Programming Language :: Python :: 3.8",
5858
"Programming Language :: Python :: 3.9",
5959
"Programming Language :: Python :: 3.10",
60+
"Programming Language :: Python :: 3.11",
6061
"Topic :: Scientific/Engineering",
6162
]
6263
PYTHON_REQUIRES = ">= 3.8"

nipype/utils/filemanip.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,8 @@
2828
related_filetype_sets = [(".hdr", ".img", ".mat"), (".nii", ".mat"), (".BRIK", ".HEAD")]
2929

3030

31-
def _resolve_with_filenotfound(path, **kwargs):
32-
"""Raise FileNotFoundError instead of OSError"""
33-
try:
34-
return path.resolve(**kwargs)
35-
except OSError as e:
36-
if isinstance(e, FileNotFoundError):
37-
raise
38-
raise FileNotFoundError(str(path))
39-
40-
41-
def path_resolve(path, strict=False):
42-
try:
43-
return _resolve_with_filenotfound(path, strict=strict)
44-
except TypeError: # PY35
45-
pass
46-
47-
path = path.absolute()
48-
if strict or path.exists():
49-
return _resolve_with_filenotfound(path)
50-
51-
# This is a hacky shortcut, using path.absolute() unmodified
52-
# In cases where the existing part of the path contains a
53-
# symlink, different results will be produced
54-
return path
31+
# Previously a patch, not worth deprecating
32+
path_resolve = Path.resolve
5533

5634

5735
def split_filename(fname):

0 commit comments

Comments
 (0)