Description of problem:
Python 3.10 will be the main Python interpreter in Fedora 35 and the distutils module is deprecated there and raises DeprecationWarning when imported.
Version-Release number of selected component (if applicable):
Installed: dnf-0:4.7.0-1.fc35.noarch at Fri Apr 16 06:16:27 2021
Built : at Thu Apr 15 15:19:35 2021
Installed: rpm-0:4.16.1.3-1.fc35.x86_64 at Wed Apr 7 08:13:20 2021
Built : Fedora Project at Mon Mar 22 10:34:04 2021
Python 3.10.0a7
How reproducible:
Always
Steps to Reproduce:
1. run whatever dnf command, dnf --version for example
Actual results:
# dnf --version
/usr/lib/python3.10/site-packages/dnf/const.py:22: 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.sysconfig
4.7.0
Installed: dnf-0:4.7.0-1.fc35.noarch at Fri Apr 16 06:16:27 2021
Built : at Thu Apr 15 15:19:35 2021
Installed: rpm-0:4.16.1.3-1.fc35.x86_64 at Wed Apr 7 08:13:20 2021
Built : Fedora Project at Mon Mar 22 10:34:04 2021
Expected results:
No raised warning.
Additional info:
This import is unused: https://github.com/rpm-software-management/dnf/blob/1e0b9221006ec83cd8d359fc1a7d847e3443dfa2/dnf/persistor.py#L29