Skip to content

Deprecated from numpy.testing.decorators import skipif #718

Closed
@SebastianoF

Description

@SebastianoF

Hello!

Thanks for nibabel, I have been using it extensively in the last few years!
Today I updated to numpy 1.15.0 and the following warning have started to appear when running tests on python 3:

========================================================= warnings summary ==========================================================
/Applications/python_virtualenvs/clean3/lib/python3.6/site-packages/nibabel/testing/__init__.py:21
  /Applications/python_virtualenvs/clean3/lib/python3.6/site-packages/nibabel/testing/__init__.py:21: DeprecationWarning: Importing from numpy.testing.decorators is deprecated since numpy 1.15.0, import from numpy.testing instead.
    from numpy.testing.decorators import skipif

-- Docs: https://docs.pytest.org/en/latest/warnings.html

To solve the issue, I believe the line nibabel/testing/init.py:21

from numpy.testing.decorators import skipif

should be substituted with something like:

from numpy.testing import dec
skipif = dec.skipif

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions