Skip to content

Pylint (>=2.13.0) cannot find misc_util module in numpy.distutils #6497

@Thijss

Description

@Thijss

Bug description

Hi there,

No sure whether this is an issue in numpy or pylint.

Starting from pylint 2.13.0, pylint reports an error when importing numpy.distutils.misc_util
When I downgrade pylint to the previous version (2.12.2) there is no error reported.

I could not find a significant change in the release notes of 2.13.0 that would cause this.

script a.py:

"""Script that uses numpy's misc_util module"""

from numpy.distutils.misc_util import is_sequence


assert is_sequence("ABC") is False
assert is_sequence([1, 2, 3]) is True

Configuration

No response

Command used

pylint a.py

Pylint output

************* Module a
a.py:3:0: E0611: No name 'misc_util' in module 'numpy.distutils' (no-name-in-module)
a.py:3:0: E0401: Unable to import 'numpy.distutils.misc_util' (import-error)

Expected behavior

Python can import the module without issues, so I would not expect pylint to report an issue here

Pylint version

2.13.0

OS / Environment

Mac OS 12.3.1

Additional dependencies

numpy==1.22.3

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions