Newer versions of Python rework this code significantly, so this does not need to be upstreamed.