TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.74k stars 332 forks source link

cmp will be depreciated #402

Open icfly2 opened 3 years ago

icfly2 commented 3 years ago

https://www.attrs.org/en/stable/changelog.html and the corresponding deprecation warning:

eli5\base_utils.py:36
  C:\Users\...\eli5\eli5\base_utils.py:36: DeprecationWarning: The usage of `cmp` is deprecated and will be removed on or after 2021-06-01.  Please use `eq` and `order` instead.
    return attr.s(class_, these=these, init=False, slots=True, **attrs_kwargs)  # type: ignore

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

I'm not familiar with this modle, so I can't suggest a fix, but perhaps replacing cmp with __eq__ would be sufficient to avoid problems later on.