Browse Source

Merge pull request #2034 from ThomasWaldmann/api-version-number-spacing

API_VERSION: use numberspaces, fixes #2023
enkore 8 years ago
parent
commit
a488d39245
8 changed files with 11 additions and 11 deletions
  1. 1 1
      borg/chunker.pyx
  2. 1 1
      borg/crypto.pyx
  3. 1 1
      borg/hashindex.pyx
  4. 4 4
      borg/helpers.py
  5. 1 1
      borg/platform.py
  6. 1 1
      borg/platform_darwin.pyx
  7. 1 1
      borg/platform_freebsd.pyx
  8. 1 1
      borg/platform_linux.pyx

+ 1 - 1
borg/chunker.pyx

@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-API_VERSION = 2
+API_VERSION = '1.0_01'
 
 from libc.stdlib cimport free
 

+ 1 - 1
borg/crypto.pyx

@@ -8,7 +8,7 @@ from math import ceil
 
 from libc.stdlib cimport malloc, free
 
-API_VERSION = 3
+API_VERSION = '1.0_01'
 
 cdef extern from "openssl/rand.h":
     int  RAND_bytes(unsigned char *buf, int num)

+ 1 - 1
borg/hashindex.pyx

@@ -4,7 +4,7 @@ import os
 cimport cython
 from libc.stdint cimport uint32_t, UINT32_MAX, uint64_t
 
-API_VERSION = 3
+API_VERSION = '1.0_01'
 
 
 cdef extern from "_hashindex.c":

+ 4 - 4
borg/helpers.py

@@ -88,13 +88,13 @@ class PlaceholderError(Error):
 
 def check_extension_modules():
     from . import platform
-    if hashindex.API_VERSION != 3:
+    if hashindex.API_VERSION != '1.0_01':
         raise ExtensionModuleError
-    if chunker.API_VERSION != 2:
+    if chunker.API_VERSION != '1.0_01':
         raise ExtensionModuleError
-    if crypto.API_VERSION != 3:
+    if crypto.API_VERSION != '1.0_01':
         raise ExtensionModuleError
-    if platform.API_VERSION != 3:
+    if platform.API_VERSION != '1.0_01':
         raise ExtensionModuleError
 
 

+ 1 - 1
borg/platform.py

@@ -30,7 +30,7 @@ elif sys.platform.startswith('freebsd'):  # pragma: freebsd only
 elif sys.platform == 'darwin':  # pragma: darwin only
     from .platform_darwin import acl_get, acl_set, API_VERSION
 else:  # pragma: unknown platform only
-    API_VERSION = 3
+    API_VERSION = '1.0_01'
 
     def acl_get(path, item, st, numeric_owner=False):
         pass

+ 1 - 1
borg/platform_darwin.pyx

@@ -1,7 +1,7 @@
 import os
 from .helpers import user2uid, group2gid, safe_decode, safe_encode
 
-API_VERSION = 3
+API_VERSION = '1.0_01'
 
 cdef extern from "sys/acl.h":
     ctypedef struct _acl_t:

+ 1 - 1
borg/platform_freebsd.pyx

@@ -1,7 +1,7 @@
 import os
 from .helpers import posix_acl_use_stored_uid_gid, safe_encode, safe_decode
 
-API_VERSION = 3
+API_VERSION = '1.0_01'
 
 cdef extern from "errno.h":
     int errno

+ 1 - 1
borg/platform_linux.pyx

@@ -4,7 +4,7 @@ import subprocess
 from stat import S_ISLNK
 from .helpers import posix_acl_use_stored_uid_gid, user2uid, group2gid, safe_decode, safe_encode
 
-API_VERSION = 3
+API_VERSION = '1.0_01'
 
 cdef extern from "sys/types.h":
     int ACL_TYPE_ACCESS