The imp module (imported by setup.py) is now fully removed from Python 3.12. The good news is that setup.py doesn't actually seem to be using it! That import imp line can probably be removed. But someone should double check that in case I am missing something.