Initial support for 3.12. Keep compatible with 3.10.