question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning with the latest setuptools

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Stannislavcommented, Jan 24, 2022

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

0reactions
mwaskomcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Deprecation warning when building wheels · Issue #2847
Attempting to install or build a wheel of a project using setuptools results in the following warning: venv/lib/python3.8/site-packages/ ...
Read more >
'setup.py install is deprecated' warning shows up every time I ...
This answer conflicts with another answer which states the newer versions no longer have the said warning. Either has to be corrected. Please ......
Read more >
Why you shouldn't invoke setup.py directly - Paul Ganssle
The setuptools project has stopped maintaining all direct invocations of setup.py years ago, and distutils is deprecated. There are undoubtedly ...
Read more >
PEP 632 – Deprecate distutils module
In Python 3.10 and 3.11, distutils will be formally marked as deprecated. All known issues will be closed at this time. import distutils...
Read more >
setuptools 2.0 - PyPI
Issue #42: Fix new AttributeError introduced in last fix. ... 0.6.32. Fix test suite with Python 2.6. Fix some DeprecationWarnings and ResourceWarnings.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found