Skip to content

Commit 71ffe58

Browse files
authored
Make the pathlib ValueError a warning (#528)
1 parent e2b2a92 commit 71ffe58

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dials_data/download.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import hashlib
88
import os
99
import tarfile
10+
import warnings
1011
import zipfile
1112
from pathlib import Path
1213
from typing import Any
@@ -309,9 +310,10 @@ def __call__(self, test_data: str, **kwargs):
309310
if the dataset is not available.
310311
"""
311312
if "pathlib" in kwargs:
312-
raise ValueError(
313-
"The pathlib parameter has been removed. The "
314-
"DataFetcher always returns pathlib.Path() objects now."
313+
warnings.warn(
314+
"pathlib argument is deprecated: Using Pathlib is now the default (and only) option.",
315+
UserWarning,
316+
stacklevel=2,
315317
)
316318
if test_data not in self._cache:
317319
self._cache[test_data] = self._attempt_fetch(test_data)

0 commit comments

Comments
 (0)