浏览代码

Merge pull request #8865 from ThomasWaldmann/cython-fixes

Cython and build fixes
TW 1 周之前
父节点
当前提交
34cc0b28d1
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      setup.py
  2. 3 2
      src/borg/compress.pyx

+ 1 - 1
setup.py

@@ -46,7 +46,7 @@ cpu_threads = multiprocessing.cpu_count() if multiprocessing and multiprocessing
 on_rtd = os.environ.get("READTHEDOCS")
 
 # Extra cflags for all extensions, usually just warnings we want to enable explicitly
-cflags = ["-Wall", "-Wextra", "-Wpointer-arith"]
+cflags = ["-Wall", "-Wextra", "-Wpointer-arith", "-Wno-unreachable-code-fallthrough"]
 
 compress_source = "src/borg/compress.pyx"
 crypto_ll_source = "src/borg/crypto/low_level.pyx"

+ 3 - 2
src/borg/compress.pyx

@@ -526,9 +526,10 @@ class Auto(CompressorBase):
             get_meta(cheap_meta, meta)
             return meta, cheap_compressed_data
 
-    def decompress(self, data):
+    def decompress(self, meta, data):
         raise NotImplementedError
 
+    @classmethod
     def detect(cls, data):
         raise NotImplementedError
 
@@ -562,7 +563,7 @@ class ObfuscateSize(CompressorBase):
     def _obfuscate(self, compr_size):
         # implementations need to return the size of obfuscation data,
         # that the caller shall add.
-        raise NotImplemented
+        raise NotImplementedError
 
     def _relative_random_reciprocal_obfuscate(self, compr_size):
         # effect for SPEC 1: