This probably needs to be ported to importlib_resources. _Originally posted by @jaraco in https://github.com/python/cpython/issues/93377#issuecomment-1154411136_