diff --git a/README.md b/README.md index 6eb34df..3a1e254 100644 --- a/README.md +++ b/README.md @@ -570,7 +570,7 @@ extract_archive(large_archive, "restore/", streaming=True) ## Requirements - Python 3.12 or higher (including Python 3.14 pre-release) -- zstandard >= 0.23.0 +- zstandard >= 0.23.1 ## Development diff --git a/pyproject.toml b/pyproject.toml index a2825be..688233f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Topic :: System :: Archiving :: Compression", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = ["zstandard>=0.23.0,<1.0.0"] +dependencies = ["zstandard>=0.23.1,<1.0.0"] [project.optional-dependencies] dev = ["pytest>=7.0.0", "pytest-cov>=4.0.0", "ruff>=0.1.0", "black>=23.0.0"] diff --git a/src/tzst/core.py b/src/tzst/core.py index 524ced6..c31e2c4 100644 --- a/src/tzst/core.py +++ b/src/tzst/core.py @@ -1,5 +1,16 @@ """Core functionality for tzst archives.""" +# Compatibility fix for Python 3.14 - ByteString was removed from typing +# This must be applied before importing zstandard +import typing + +try: + from collections.abc import ByteString + + typing.ByteString = ByteString +except ImportError: + pass + import io import os import tarfile