This patch adds static typing, and it switches to the Hatch package manager and its Hatchling build backend.
This patch also deletes all of the compatibility code that we no longer need.