bskinn / sphobjinv

Toolkit for manipulation and inspection of Sphinx objects.inv files
https://sphobjinv.readthedocs.io
MIT License
81 stars 9 forks source link

Deprecation warning from `attr` #107

Closed mortenvp closed 4 years ago

mortenvp commented 4 years ago

Hi, Getting this warning:

virtualenv-97d4f4/lib/python3.7/site-packages/sphobjinv/inventory.py:106
  /home/mvp/dev/steinwurf/versjon/virtualenv-97d4f4/lib/python3.7/site-packages/sphobjinv/inventory.py:106: DeprecationWarning: The usage of `cmp` is deprecated and will be removed on or after 2021-06-01.  Please use `eq` and `order` instead.
    @attr.s(slots=True, cmp=False)

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

Don't think it has been reported before.

bskinn commented 4 years ago

Yup, this is a new warning here. @hynek (& co?) have been working on some API changes, including this one... looks like those are moving forward.

What attrs version do you have installed in that virtualenv?

bskinn commented 4 years ago

Looks like it was deprecated in 19.2 -- really not sure why the warning isn't showing up in CI. :-(

bskinn commented 4 years ago

Ooooh. Unless the first import of a module happens inside a fixture or test function/etc. (i.e., if a module/package is imported at the test module scope), it appears that pytests warning-catching machinery can't see it.

I had to add a new, ~dedicated tox environment in order for the warning to be visible to CI.

I think I've got it fixed.

bskinn commented 4 years ago

Will get the 2.0.1 release cut as soon as I can manage it. :+1:

mortenvp commented 4 years ago

Awesome :+1:

bskinn commented 4 years ago

v2.0.1 is up on PyPI -- lemme know how it works!

mortenvp commented 4 years ago

Warning seems to have disappeared - great work! and thanks!