Skip to content

CI: Test on Python 3.11 #3589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
26 changes: 2 additions & 24 deletions nipype/utils/filemanip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down