@@ -100,7 +100,10 @@ def _init():
100
100
""" Initialize the Blosc library environment."""
101
101
blosc_init()
102
102
103
- init = deprecated(" init is deprecated, with no replacement" )(_init)
103
+
104
+ @ deprecated (" init is deprecated, with no replacement" )
105
+ def init ():
106
+ return _init()
104
107
105
108
106
109
def _destroy ():
@@ -119,7 +122,10 @@ def _compname_to_compcode(cname):
119
122
cname = cname.encode(' ascii' )
120
123
return blosc_compname_to_compcode(cname)
121
124
122
- compname_to_compcode = deprecated(" compname_to_compcode is deprecated, with no replacement" )(_compname_to_compcode)
125
+
126
+ @ deprecated (" compname_to_compcode is deprecated, with no replacement" )
127
+ def compname_to_compcode (cname ):
128
+ return _compname_to_compcode(cname)
123
129
124
130
125
131
def list_compressors ():
@@ -168,7 +174,9 @@ def _cbuffer_sizes(source):
168
174
169
175
return nbytes, cbytes, blocksize
170
176
171
- cbuffer_sizes = deprecated(_cbuffer_sizes)
177
+ @ deprecated (" cbuffer_sizes is deprecated with no replacement" )
178
+ def cbuffer_sizes (source ):
179
+ return _cbuffer_sizes(source)
172
180
173
181
def cbuffer_complib (source ):
174
182
""" Return the name of the compression library used to compress `source`."""
@@ -226,13 +234,21 @@ def _cbuffer_metainfo(source):
226
234
227
235
return typesize, shuffle, memcpyed
228
236
229
- cbuffer_metainfo = deprecated(" cbuffer_metainfo is deprecated, with no replacement" )(_cbuffer_metainfo)
237
+
238
+ @ deprecated (" cbuffer_metainfo is deprecated, with no replacement" )
239
+ def cbuffer_metainfo (source ):
240
+ return _cbuffer_metainfo(source)
241
+
230
242
231
243
def _err_bad_cname (cname ):
232
244
raise ValueError (' bad compressor or compressor not supported: %r ; expected one of '
233
245
' %s ' % (cname, list_compressors()))
234
246
235
- err_bad_cname = deprecated(" err_bad_cname is deprecated, with no replacement" )(_err_bad_cname)
247
+
248
+ @ deprecated (" err_bad_cname is deprecated, with no replacement" )
249
+ def err_bad_cname (cname ):
250
+ return _err_bad_cname(cname)
251
+
236
252
237
253
def compress (source , char* cname , int clevel , int shuffle = SHUFFLE,
238
254
int blocksize = AUTOBLOCKS):
@@ -489,7 +505,9 @@ def _decompress_partial(source, start, nitems, dest=None):
489
505
490
506
return dest
491
507
492
- decompress_partial = deprecated(" decompress_partial is deprecated, with no replacement" )(_decompress_partial)
508
+ @ deprecated (" decompress_partial is deprecated, with no replacement" )
509
+ def decompress_partial (source , start , nitems , dest = None ):
510
+ return _decompress_partial(source, start, nitems, dest = None )
493
511
494
512
# set the value of this variable to True or False to override the
495
513
# default adaptive behaviour
0 commit comments