Port the change from python/cpython#138059. _Originally posted by @jaraco in https://github.com/python/cpython/issues/138059#issuecomment-4230186378_
Port the change from python/cpython#138059.
Originally posted by @jaraco in python/cpython#138059 (comment)