Support python 3.12+

Currently there is an issue with cchardet dependency, which might need removing/changing/updating, not sure.