Add support for Python v3.12

Expected to be release the 2nd October 2023.

Edited by Moul