ros / catkin

A CMake-based build system that is used to build all packages in ROS.
http://wiki.ros.org/catkin
BSD 3-Clause "New" or "Revised" License
321 stars 280 forks source link

`distutils`: Deprecation warning #1164

Open acxz opened 2 years ago

acxz commented 2 years ago
/opt/ros/noetic/share/catkin/cmake/interrogate_setup_dot_py.py:43: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.core

catkin version: 0.8.10 py version: 3.10.2

gbiggs commented 2 years ago

As there are still likely to be a a lot of packages using distutils in Noetic, I do not think it is safe to remove support for it at this time. Python 3.10 has just been released and 3.12 is not yet scheduled, so we still have a long time before it will become unavailable in the most up-to-date version on Python. On top of that, Noetic targets Python 3.8, so it is not required to handle a Python version where distutils has been removed.

A better time to do this is probably in a post-Noetic version of catkin.

tfoote commented 2 years ago

Also before removing the support it would be best to provide a deprecation warning to users with a stated interval by which they will need to have migrated forward.

acxz commented 2 years ago

packages using distutils in Noetic

Do you know of a smart way to find out which Noetic packages use distutils?

provide a deprecation warning

I can create a PR with a deprecation warning when distutils gets imported. Is there documentation on a proper format to coding this deprecation warning?