seaborn
seaborn copied to clipboard
DeprecationWarning with the latest setuptools
Starting with setuptools==60.0.0
there's a DeprecationWarning
for distutils version classes: https://github.com/pypa/setuptools/commit/1701579e0827317d8888c2254a17b5786b6b5246
This leads to a warning in seaborn:
$ pip install -U 'setuptools>=60' seaborn
$ python -We -c 'import seaborn'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/venv/lib/python3.7/site-packages/seaborn/__init__.py", line 2, in <module>
from .rcmod import * # noqa: F401,F403
File "/venv/lib/python3.7/site-packages/seaborn/rcmod.py", line 82, in <module>
if LooseVersion(mpl.__version__) >= "3.0":
File "/venv/lib/python3.7/site-packages/setuptools/_distutils/version.py", line 57, in __init__
stacklevel=2,
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
I see that this has probably been fixed by #2466 on master. But this change hasn't been released yet. Maybe this can be a reason to realease a new patch version sooner than later? Unfixable warnings can have an impact on many CI/CD setups.
Unfixable warnings can have an impact on many CI/CD setups.
Maybe you could give an example? IMO it is asking a lot of upstream libraries to cut a new release just to satisfy what sounds like a very strict CI configuration.
Hey there. This is more of a heads-up that the warning is happening, for sure nothing critical.
Maybe it should be noted though that it happens when importing the top module seaborn
itself, and not after using a specific seaborn feature that is deprected. So any seaborn import leads to a warning.
Yes but DeprecationWarning is hidden from the user by default, right? So for now this only pops up when running tests.
Just cutting a release with the commit that switches to packaging is not so straightforward because that commit was made against master and touches code that can’t be released as a patch on the 0.11 series. So I think there would be a reasonably high effort bar here.
You're right about deprecation warnings being hidden by default.
Cheers for the details on the release, didn't realise master wasn't suitable for another patch version bump. I guess it'll be part of the next minor/major version release then.
I guess this can be closed now, thanks for the help!
@Stannislav would you be interested in putting in a PR that cleanly cherry-picks #2659 onto the v0.11 branch? That would make it a lot easier to get out a v0.11 series release addressing the distutils deprecation.
Hey @mwaskom, sounds like a great idea. I'll try and look into this soon.
Hi @mwaskom, only now got around to this. I created a PR here: #2766
I see this issue is probably resolved, I just wanted to ask if there is a plan for a tagged release on v.11 branch including this fix?
Sorry for the runaround on this one, by the time the backport landed it felt like v0.12 was close to release, but then that process really ended up dragging out. In any case, v0.12.0 is out and so there should be no further warnings about distutils
.