Merge pull request #7592 from ThomasWaldmann/py312

support / test on Python 3.12
This commit is contained in:
TW 2023-09-14 04:38:57 +02:00 committed by GitHub
commit 2943d1c11e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 4 deletions

View file

@ -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 }}

View file

@ -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]

View file

@ -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 '-'.

View file

@ -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):

View file

@ -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