@@ -515,8 +515,9 @@ def __reduce__(self):
515
515
depending from it.
516
516
In addition, when unpickling, we run the __init__
517
517
"""
518
- return (self .__class__ , (self .func , self .store_backend , self .ignore ,
519
- self .mmap_mode , self .compress , self ._verbose ))
518
+ return (self .__class__ , (self .func , None ),
519
+ {k : v for k , v in vars (self ).items ()
520
+ if k not in ('timestamp' , 'func' )})
520
521
521
522
# ------------------------------------------------------------------------
522
523
# Private interface
@@ -775,12 +776,6 @@ class Memory(Logger):
775
776
The 'local' backend is using regular filesystem operations to
776
777
manipulate data (open, mv, etc) in the backend.
777
778
778
- cachedir: str or None, optional
779
-
780
- .. deprecated: 0.12
781
- 'cachedir' has been deprecated in 0.12 and will be
782
- removed in 0.14. Use the 'location' parameter instead.
783
-
784
779
mmap_mode: {None, 'r+', 'r', 'w+', 'c'}, optional
785
780
The memmapping mode used when loading from cache
786
781
numpy arrays. See numpy.load for the meaning of the
@@ -802,14 +797,20 @@ class Memory(Logger):
802
797
backend_options: dict, optional
803
798
Contains a dictionnary of named parameters used to configure
804
799
the store backend.
800
+
801
+ cachedir: str or None, optional
802
+
803
+ .. deprecated: 0.12
804
+ 'cachedir' has been deprecated in 0.12 and will be
805
+ removed in 0.14. Use the 'location' parameter instead.
805
806
"""
806
807
# ------------------------------------------------------------------------
807
808
# Public interface
808
809
# ------------------------------------------------------------------------
809
810
810
- def __init__ (self , location = None , backend = 'local' , cachedir = None ,
811
- mmap_mode = None , compress = False , verbose = 1 , bytes_limit = None ,
812
- backend_options = {}):
811
+ def __init__ (self , location = None , backend = 'local' , mmap_mode = None ,
812
+ compress = False , verbose = 1 , bytes_limit = None ,
813
+ backend_options = {}, cachedir = None ):
813
814
# XXX: Bad explanation of the None value of cachedir
814
815
Logger .__init__ (self )
815
816
self ._verbose = verbose
@@ -940,10 +941,5 @@ def __reduce__(self):
940
941
depending from it.
941
942
In addition, when unpickling, we run the __init__
942
943
"""
943
- # We need to remove 'joblib' from the end of cachedir
944
- location = (repr (self .store_backend )[:- 7 ]
945
- if self .store_backend is not None else None )
946
- compress = self .store_backend .compress \
947
- if self .store_backend is not None else False
948
- return (self .__class__ , (location , self .backend , self .mmap_mode ,
949
- compress , self ._verbose ))
944
+ return (self .__class__ , (), {k : v for k , v in vars (self ).items ()
945
+ if k != 'timestamp' })
0 commit comments