Skip to content
Snippets Groups Projects

Remove deprecation warning ('cachedir' parameter has been deprecated)

Viewing commit 49142d54
Show latest version
1 file
+ 1
1
Preferences
Compare changes
  • Warning was:
    
    ```
      /localhome/seitz_local/projects/pystencils/pystencils/cache.py:15: DeprecationWarning: The 'cachedir' parameter has been deprecated in
    version 0.12 and will be removed in version 0.14.
      You provided "cachedir='/localhome/seitz_local/.cache/pystencils'", use "location='/localhome/seitz_local/.cache/pystencils'" instead.
        disk_cache = Memory(cachedir=cache_dir, verbose=False).cache
    ```
+ 1
1
@@ -12,7 +12,7 @@ try:
@@ -12,7 +12,7 @@ try:
cache_dir = os.environ['PYSTENCILS_CACHE_DIR']
cache_dir = os.environ['PYSTENCILS_CACHE_DIR']
else:
else:
cache_dir = user_cache_dir('pystencils')
cache_dir = user_cache_dir('pystencils')
disk_cache = Memory(cachedir=cache_dir, verbose=False).cache
disk_cache = Memory(cache_dir, verbose=False).cache
disk_cache_no_fallback = disk_cache
disk_cache_no_fallback = disk_cache
except ImportError:
except ImportError:
# fallback to in-memory caching if joblib is not available
# fallback to in-memory caching if joblib is not available