We should pull upstream changes because we didn't do it for a long time.
There is already a PR doing this: #329 , but it's effectively impossible to review because of changes made by removing Python 2.
We should merge #243 and then redo the merge on top of that.