This looks like https://bugs.python.org/issue29298 - fixed in the Python in Jammy but present in the Python in Focal. And the git-ubuntu snap currently builds from Focal, so uses Focal's Python.
This looks like https:/ /bugs.python. org/issue29298 - fixed in the Python in Jammy but present in the Python in Focal. And the git-ubuntu snap currently builds from Focal, so uses Focal's Python.