diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9be75f045b..de5d70dac4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,16 +90,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ['ubuntu-20.04'] - python-version: [3.8, 3.9, "3.10"] + os: ['ubuntu-22.04'] + python-version: ['3.8', '3.9', '3.10', '3.11'] check: ['test'] pip-flags: [''] depends: ['REQUIREMENTS'] deb-depends: [false] nipype-extras: ['doc,tests,profiler'] include: - - os: ubuntu-20.04 - python-version: 3.8 + - os: ubuntu-22.04 + python-version: '3.8' check: test pip-flags: '' depends: REQUIREMENTS diff --git a/nipype/info.py b/nipype/info.py index 192ba4368f..22290d1bc0 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -57,6 +57,7 @@ def get_nipype_gitversion(): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering", ] PYTHON_REQUIRES = ">= 3.8" diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 2541e0a483..e0ec687a6a 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -28,30 +28,8 @@ related_filetype_sets = [(".hdr", ".img", ".mat"), (".nii", ".mat"), (".BRIK", ".HEAD")] -def _resolve_with_filenotfound(path, **kwargs): - """Raise FileNotFoundError instead of OSError""" - try: - return path.resolve(**kwargs) - except OSError as e: - if isinstance(e, FileNotFoundError): - raise - raise FileNotFoundError(str(path)) - - -def path_resolve(path, strict=False): - try: - return _resolve_with_filenotfound(path, strict=strict) - except TypeError: # PY35 - pass - - path = path.absolute() - if strict or path.exists(): - return _resolve_with_filenotfound(path) - - # This is a hacky shortcut, using path.absolute() unmodified - # In cases where the existing part of the path contains a - # symlink, different results will be produced - return path +# Previously a patch, not worth deprecating +path_resolve = Path.resolve def split_filename(fname):