codecov[bot]: # [Codecov](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=h1) Report
> Merging [#639](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=desc) into [master](https://codecov.io/gh/joblib/joblib/commit/a0e1f69d2be31e9e6be1f5e346988bc04df7ff75?src=pr&el=desc) will **increase** coverage by `0.44%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/joblib/joblib/pull/639/graphs/tree.svg?height=150&width=650&token=gA6LF5DGTW&src=pr)](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #639      +/-   ##
==========================================
+ Coverage   94.52%   94.96%   +0.44%     
==========================================
  Files          39       39              
  Lines        5403     5407       +4     
==========================================
+ Hits         5107     5135      +28     
+ Misses        296      272      -24
```


| [Impacted Files](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [joblib/memory.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL21lbW9yeS5weQ==) | `94.98% <100%> (+0.02%)` | :arrow_up: |
| [joblib/test/test\_memory.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL3Rlc3QvdGVzdF9tZW1vcnkucHk=) | `98.14% <100%> (ø)` | :arrow_up: |
| [joblib/test/test\_parallel.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL3Rlc3QvdGVzdF9wYXJhbGxlbC5weQ==) | `96.27% <0%> (+0.35%)` | :arrow_up: |
| [joblib/\_parallel\_backends.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL19wYXJhbGxlbF9iYWNrZW5kcy5weQ==) | `94.39% <0%> (+0.43%)` | :arrow_up: |
| [joblib/numpy\_pickle\_utils.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL251bXB5X3BpY2tsZV91dGlscy5weQ==) | `93.29% <0%> (+0.63%)` | :arrow_up: |
| [joblib/hashing.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL2hhc2hpbmcucHk=) | `92.98% <0%> (+0.87%)` | :arrow_up: |
| [joblib/\_memmapping\_reducer.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL19tZW1tYXBwaW5nX3JlZHVjZXIucHk=) | `95% <0%> (+1.11%)` | :arrow_up: |
| [joblib/logger.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL2xvZ2dlci5weQ==) | `86.84% <0%> (+1.31%)` | :arrow_up: |
| [joblib/numpy\_pickle.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL251bXB5X3BpY2tsZS5weQ==) | `98.47% <0%> (+2.03%)` | :arrow_up: |
| [joblib/pool.py](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree#diff-am9ibGliL3Bvb2wucHk=) | `91.37% <0%> (+2.58%)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/joblib/joblib/pull/639/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=footer). Last update [a0e1f69...4f88f5a](https://codecov.io/gh/joblib/joblib/pull/639?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

lesteve: Merging, thanks a lot @aabadie!
diff --git a/joblib/memory.py b/joblib/memory.py
index 0f005dd..18b20f5 100644
--- a/joblib/memory.py
+++ b/joblib/memory.py
@@ -767,7 +767,7 @@ class Memory(Logger):
                 The path of the base directory to use as a data store
                 or None. If None is given, no caching is done and
                 the Memory object is completely transparent. This option
-                replaces cachedir since version 0.11.
+                replaces cachedir since version 0.12.
 
             backend: str or 'local'
                 Type of store backend for reading/writing cache files.
@@ -776,8 +776,8 @@ class Memory(Logger):
                 backend.
 
             cachedir: str or None
-                cachedir is deprecated since version 0.11 and will be
-                removed in 0.13. Please consider using location option instead.
+                cachedir is deprecated since version 0.12 and will be
+                removed in 0.14. Please consider using location option instead.
                 The path of the base directory to use as a data store
                 or None. If None is given, no caching is done and
                 the Memory object is completely transparent.
@@ -818,17 +818,18 @@ class Memory(Logger):
         if cachedir is not None:
             if location is None:
                 warnings.warn("cachedir option is deprecated since version "
-                              "0.10 and will be removed after version 0.12.\n"
+                              "0.12 and will be removed in version 0.14.\n"
                               "Use option location=<store location> "
                               "instead.", DeprecationWarning, stacklevel=2)
                 location = cachedir
             else:
                 warnings.warn("You set both location and cachedir options."
                               "cachedir is deprecated since version "
-                              "0.10 and will be removed after version 0.12.\n"
+                              "0.12 and will be removed in version 0.14.\n"
                               "cachedir value will be ignored.",
                               DeprecationWarning, stacklevel=2)
 
+        self.location = location
         if isinstance(location, _basestring):
             location = os.path.join(location, 'joblib')
 
@@ -837,6 +838,14 @@ class Memory(Logger):
             backend_options=dict(compress=compress, mmap_mode=mmap_mode,
                                  **backend_options))
 
+    @property
+    def cachedir(self):
+        warnings.warn("cachedir option is deprecated since version "
+                      "0.12 and will be removed in version 0.14.\n"
+                      "Use option location=<store location> "
+                      "instead.", DeprecationWarning, stacklevel=2)
+        return self.location
+
     def cache(self, func=None, ignore=None, verbose=None, mmap_mode=False):
         """ Decorates the given function func to only compute its return
             value for input arguments not cached on disk.

Memory object does not have a cachedir attribute in master
Seems like an oversight from #397. The doc says that cachedir is deprecated but actually it is not set:
https://github.com/joblib/joblib/blob/a0e1f69d2be31e9e6be1f5e346988bc04df7ff75/joblib/memory.py#L778-L783

It'd be a good idea to double-check that other similar things have not been overseen.

Snippet:
```python
from joblib import Memory

mem = Memory('/tmp/test')
print(mem.cachedir)
```


diff --git a/joblib/test/test_memory.py b/joblib/test/test_memory.py
index 7d74506..00f384c 100644
--- a/joblib/test/test_memory.py
+++ b/joblib/test/test_memory.py
@@ -383,6 +383,11 @@ def test_func_dir(tmpdir):
     location = os.path.join(g.store_backend.location, func_id)
     assert location == path
     assert os.path.exists(path)
+    assert memory.location == os.path.dirname(g.store_backend.location)
+    with warns(DeprecationWarning) as w:
+        assert memory.cachedir == os.path.dirname(g.store_backend.location)
+    assert len(w) == 1
+    assert "cachedir option is deprecated since version" in str(w[-1].message)
 
     # Test that the code is stored.
     # For the following test to be robust to previous execution, we clear

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-timeout codecov
3.6
continuous_integration/appveyor/requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
codecov==2.1.13
coverage==6.2
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
-e git+https://github.com/joblib/joblib.git@d3e478f2822dde4181927b9efb6064cf00b92996#egg=joblib
numpy==1.19.5
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-timeout==2.1.0
requests==2.27.1
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: joblib
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - codecov==2.1.13
      - coverage==6.2
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - numpy==1.19.5
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-timeout==2.1.0
      - requests==2.27.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/joblib

joblib/test/test_memory.py::test_func_dir
joblib/test/test_memory.py::test_memory_integration joblib/test/test_memory.py::test_no_memory joblib/test/test_memory.py::test_memory_kwarg joblib/test/test_memory.py::test_memory_lambda joblib/test/test_memory.py::test_memory_name_collision joblib/test/test_memory.py::test_memory_warning_lambda_collisions joblib/test/test_memory.py::test_memory_warning_collision_detection joblib/test/test_memory.py::test_memory_partial joblib/test/test_memory.py::test_memory_eval joblib/test/test_memory.py::test_argument_change joblib/test/test_memory.py::test_memory_numpy[None] joblib/test/test_memory.py::test_memory_numpy[r] joblib/test/test_memory.py::test_memory_numpy_check_mmap_mode joblib/test/test_memory.py::test_memory_exception joblib/test/test_memory.py::test_memory_ignore joblib/test/test_memory.py::test_partial_decoration[ignore0-100-r] joblib/test/test_memory.py::test_partial_decoration[ignore1-10-None] joblib/test/test_memory.py::test_persistence joblib/test/test_memory.py::test_call_and_shelve joblib/test/test_memory.py::test_memorized_pickling joblib/test/test_memory.py::test_memorized_repr joblib/test/test_memory.py::test_memory_file_modification joblib/test/test_memory.py::test_memory_in_memory_function_code_change joblib/test/test_memory.py::test_clear_memory_with_none_location joblib/test/test_memory.py::test_memory_func_with_kwonly_args joblib/test/test_memory.py::test_memory_func_with_signature joblib/test/test_memory.py::test__get_items joblib/test/test_memory.py::test__get_items_to_delete joblib/test/test_memory.py::test_memory_reduce_size joblib/test/test_memory.py::test_memory_clear joblib/test/test_memory.py::test_cached_function_race_condition_when_persisting_output joblib/test/test_memory.py::test_cached_function_race_condition_when_persisting_output_2 joblib/test/test_memory.py::test_concurrency_safe_write[multiprocessing] joblib/test/test_memory.py::test_concurrency_safe_write[loky] joblib/test/test_memory.py::test_concurrency_safe_write[threading] joblib/test/test_memory.py::test_memory_recomputes_after_an_error_why_loading_results joblib/test/test_memory.py::test_cachedir_deprecation_warning joblib/test/test_memory.py::test_register_invalid_store_backends_key[None] joblib/test/test_memory.py::test_register_invalid_store_backends_key[invalid_prefix1] joblib/test/test_memory.py::test_register_invalid_store_backends_key[invalid_prefix2] joblib/test/test_memory.py::test_register_invalid_store_backends_object joblib/test/test_memory.py::test_memory_default_store_backend joblib/test/test_memory.py::test_instanciate_incomplete_store_backend joblib/test/test_memory.py::test_dummy_store_backend
joblib/memory.py
joblib/memory.py