Support python 3.13
Python 3.13 is being aggressively installed by homebrew dependencies, so it's really hard for macOS users to avoid. Trying to run the tests using it fail with an error about _PyErr_WriteUnraisableMsg.
I did some digging and found that the error above is due to a reliance on zstandard==0.22.0. zstandard==0.23.0 fixes that build issue but then I ran into a cryptic traceback for "KeyError: 'version'" that I couldn't figure out how to resolve.
@jgraham I saw you did work on updating to support 3.12 (#45929), would you be able to take a look at this?
This is probably partly the fact that we quite possibly always just install into a _venv3, which means we don't actually re-install things when the ABI changes.
But more importantly I think this is needing to update cffi?
I've started a pull request in #49503 to add Python 3.13 support. Help is welcome since there is still an issue where the tests fail inside the Python logging code and I don't know why.
See also: #39359, about cgi being deprecated.
Fixed via #49970