I've been studying fedpkg code and noticed that the tests were failing to run on python 3.12. The main cause of this is that the pkg_resources library can't be found during the testing process when testing on python 3.12.
Digging around, I found out that the thing that causes this problem is that python 3.12 stopped preinstalling the setuptools library in virtual environments created with venv [0]. This can be easily fixed by adding the setuptools requirement to the requirements.txt file, but I also noticed that the pkg_resources API being used in fedpkg was a deprecated API [1], so I changed the code so that fedpkg prioritizes using the importlib library when available instead as recommended by upstream[1].
I've been studying fedpkg code and noticed that the tests were failing to run on python 3.12. The main cause of this is that the pkg_resources library can't be found during the testing process when testing on python 3.12.
Digging around, I found out that the thing that causes this problem is that python 3.12 stopped preinstalling the
setuptoolslibrary in virtual environments created with venv [0]. This can be easily fixed by adding thesetuptoolsrequirement to therequirements.txtfile, but I also noticed that the pkg_resources API being used in fedpkg was a deprecated API [1], so I changed the code so that fedpkg prioritizes using the importlib library when available instead as recommended by upstream[1].[0] https://docs.python.org/3/whatsnew/3.12.html
[1] https://setuptools.pypa.io/en/latest/pkg_resources.html