From c1306bb5b8ff4e5db1da360f98db869f3656487e Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Wed, 5 Nov 2025 11:02:05 +0000 Subject: [PATCH] Make the pathlib ValueError a warning --- dials_data/download.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dials_data/download.py b/dials_data/download.py index 9b205a23..3deac95b 100644 --- a/dials_data/download.py +++ b/dials_data/download.py @@ -7,6 +7,7 @@ import hashlib import os import tarfile +import warnings import zipfile from pathlib import Path from typing import Any @@ -309,9 +310,10 @@ def __call__(self, test_data: str, **kwargs): if the dataset is not available. """ if "pathlib" in kwargs: - raise ValueError( - "The pathlib parameter has been removed. The " - "DataFetcher always returns pathlib.Path() objects now." + warnings.warn( + "pathlib argument is deprecated: Using Pathlib is now the default (and only) option.", + UserWarning, + stacklevel=2, ) if test_data not in self._cache: self._cache[test_data] = self._attempt_fetch(test_data)