Merge pull request #1644 from pbiering/fix-python3.14

Fixes for Python 3.14
This commit is contained in:
Peter Bieringer 2024-12-06 05:17:15 +00:00 committed by GitHub
commit ff5fae1663
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,10 @@ else:
import importlib.abc
from importlib import resources
_TRAVERSABLE_LIKE_TYPE = Union[importlib.abc.Traversable, pathlib.Path]
if sys.version_info < (3, 13):
_TRAVERSABLE_LIKE_TYPE = Union[importlib.abc.Traversable, pathlib.Path]
else:
_TRAVERSABLE_LIKE_TYPE = Union[importlib.resources.abc.Traversable, pathlib.Path]
NOT_ALLOWED: types.WSGIResponse = (
client.FORBIDDEN, (("Content-Type", "text/plain"),),