瀏覽代碼

Add support for Python 3.14 (#1149).

Dan Helfman 1 天之前
父節點
當前提交
65c17c91b3
共有 4 個文件被更改,包括 9 次插入5 次删除
  1. 3 0
      NEWS
  2. 4 3
      borgmatic/hooks/data_source/dump.py
  3. 1 1
      pyproject.toml
  4. 1 1
      tox.ini

+ 3 - 0
NEWS

@@ -1,3 +1,6 @@
+2.0.9.dev0
+ * #1149: Add support for Python 3.14.
+
 2.0.8
  * #1114: Document systemd configuration changes for the ZFS filesystem hook.
  * #1116: Add dumping of database containers via their container names, handy for backing up

+ 4 - 3
borgmatic/hooks/data_source/dump.py

@@ -119,10 +119,11 @@ def convert_glob_patterns_to_borg_pattern(patterns):
     Convert a sequence of shell glob patterns like "/etc/*", "/tmp/*" to the corresponding Borg
     regular expression archive pattern as a single string like "re:etc/.*|tmp/.*".
     '''
-    # Remove the "\Z" generated by fnmatch.translate() because we don't want the pattern to match
-    # only at the end of a path, as directory format dumps require extracting files with paths
+    # Remove the "\z" or "\Z" generated by fnmatch.translate() because we don't want the pattern to
+    # match only at the end of a path, as directory format dumps require extracting files with paths
     # longer than the pattern. E.g., a pattern of "borgmatic/*/foo_databases/test" should also match
     # paths like "borgmatic/*/foo_databases/test/toc.dat"
     return 're:' + '|'.join(
-        fnmatch.translate(pattern.lstrip('/')).replace('\\Z', '') for pattern in patterns
+        fnmatch.translate(pattern.lstrip('/')).replace('\\z', '').replace('\\Z', '')
+        for pattern in patterns
     )

+ 1 - 1
pyproject.toml

@@ -1,6 +1,6 @@
 [project]
 name = "borgmatic"
-version = "2.0.8"
+version = "2.0.9.dev0"
 authors = [
   { name="Dan Helfman", email="witten@torsion.org" },
 ]

+ 1 - 1
tox.ini

@@ -1,5 +1,5 @@
 [tox]
-env_list = py39,py310,py311,py312,py313
+env_list = py39,py310,py311,py312,py313,py314
 skip_missing_interpreters = true
 package = editable
 min_version = 4.0