Merge Stefano's fixes for Python 3.10

2 jobs for v1.2.4 in 1 minute and 28 seconds (queued for 4 seconds)
latest