diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36b63be7e..b3c48770b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,9 @@ jobs: - os: ubuntu-22.04 python-version: '3.11' toxenv: py311-fuse3 + - os: ubuntu-22.04 + python-version: '3.12-dev' + toxenv: py312-fuse3 env: TOXENV: ${{ matrix.toxenv }} diff --git a/pyproject.toml b/pyproject.toml index 587df1309..8ca874e63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,12 +24,13 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Security :: Cryptography", "Topic :: System :: Archiving :: Backup", ] license = {text="BSD"} dependencies = [ - "msgpack >=1.0.3, <=1.0.5", + "msgpack >=1.0.3, <=1.0.6rc1", "packaging", "platformdirs >=3.0.0, <4.0.0; sys_platform == 'darwin'", # for macOS: breaking changes in 3.0.0, "platformdirs >=2.6.0, <4.0.0; sys_platform != 'darwin'", # for others: 2.6+ works consistently. @@ -53,7 +54,7 @@ borg = "borg.archiver:main" borgfs = "borg.archiver:main" [build-system] -requires = ["setuptools", "pkgconfig", "Cython", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools", "wheel", "pkgconfig", "Cython", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] diff --git a/src/borg/archiver/tar_cmds.py b/src/borg/archiver/tar_cmds.py index 30f4a6d68..b18cb24d0 100644 --- a/src/borg/archiver/tar_cmds.py +++ b/src/borg/archiver/tar_cmds.py @@ -29,6 +29,11 @@ from ..logger import create_logger logger = create_logger(__name__) +# Python 3.12+ gives a deprecation warning if TarFile.extraction_filter is None. +# https://docs.python.org/3.12/library/tarfile.html#tarfile-extraction-filter +if hasattr(tarfile, "fully_trusted_filter"): + tarfile.TarFile.extraction_filter = staticmethod(tarfile.fully_trusted_filter) # type: ignore + def get_tar_filter(fname, decompress): # Note that filter is None if fname is '-'. diff --git a/src/borg/helpers/msgpack.py b/src/borg/helpers/msgpack.py index 54c3b9cbd..2cd708e17 100644 --- a/src/borg/helpers/msgpack.py +++ b/src/borg/helpers/msgpack.py @@ -209,7 +209,7 @@ def is_supported_msgpack(): if msgpack.version in []: # < add bad releases here to deny list return False - return (1, 0, 3) <= msgpack.version <= (1, 0, 5) + return (1, 0, 3) <= msgpack.version < (1, 0, 7) def get_limited_unpacker(kind): diff --git a/tox.ini b/tox.ini index 8dc396d5b..10f3e7f30 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # fakeroot -u tox --recreate [tox] -envlist = py{39,310,311}-{none,fuse2,fuse3},docs +envlist = py{39,310,311,312}-{none,fuse2,fuse3},docs minversion = 3.2 requires = pkgconfig