Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning with the latest setuptools #2724

Closed
Stannislav opened this issue Jan 4, 2022 · 9 comments
Closed

DeprecationWarning with the latest setuptools #2724

Stannislav opened this issue Jan 4, 2022 · 9 comments

Comments

@Stannislav
Copy link

Starting with setuptools==60.0.0 there's a DeprecationWarning for distutils version classes: pypa/setuptools@1701579

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.

@mwaskom
Copy link
Owner

mwaskom commented Jan 9, 2022

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.

@Stannislav
Copy link
Author

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.

@mwaskom
Copy link
Owner

mwaskom commented Jan 10, 2022

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.

@Stannislav
Copy link
Author

Stannislav commented Jan 10, 2022

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!

@mwaskom
Copy link
Owner

mwaskom commented Jan 22, 2022

@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.

@Stannislav
Copy link
Author

Hey @mwaskom, sounds like a great idea. I'll try and look into this soon.

@Stannislav
Copy link
Author

Hi @mwaskom, only now got around to this. I created a PR here: #2766

@ampx-mg
Copy link

ampx-mg commented Jul 13, 2022

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?

@mwaskom
Copy link
Owner

mwaskom commented Sep 14, 2022

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.

@mwaskom mwaskom closed this as completed Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants