DeprecationWarning with the latest setuptools
See original GitHub issueStarting 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:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @mwaskom, sounds like a great idea. I’ll try and look into this soon.
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
.