Skip to content

Deepdiff incompatible with numpy 2.0 #464

@Kircheneer

Description

@Kircheneer

Describe the bug

Numpy 2.0 was released yesterday. Deepdiff appears incompatible right now and also doesn't specify a compatible dependency range.

To Reproduce

  • Install numpy 2.0
  • Run import deepdiff
>>> import deepdiff
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/deepdiff/__init__.py", line 10, in <module>
    from .diff import DeepDiff
  File "/usr/local/lib/python3.11/site-packages/deepdiff/diff.py", line 16, in <module>
    from deepdiff.helper import (strings, bytes_type, numbers, uuids, times, ListItemRemovedOrAdded, notpresent,
  File "/usr/local/lib/python3.11/site-packages/deepdiff/helper.py", line 60, in <module>
    np_float_ = np.float_
                ^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'?
Steps to reproduce the behavior

Expected behavior

Deepdiff works with Numpy 2.0, but prior to that, deepdiff specifies a numpy dependency range.

OS, DeepDiff version and Python version

  • OS: Amazon Linux
  • Version 2
  • Python Version 3.11.9
  • DeepDiff Version 5.8.1

Additional context

n.a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions