From 8335518e926e1639a421b6ea492ea5d43c86161e Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 11 Aug 2023 08:38:31 -0400 Subject: [PATCH] add attempt to import ValidationError first try to import ValidationError from asdf.exceptions then fallback to importing from the top level asdf if this fails. --- dkist/dataset/loader.py | 5 ++++- setup.cfg | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dkist/dataset/loader.py b/dkist/dataset/loader.py index 5e5700a1..e6424a74 100644 --- a/dkist/dataset/loader.py +++ b/dkist/dataset/loader.py @@ -5,7 +5,10 @@ from parfive import Results import asdf -from asdf.exceptions import ValidationError +try: + from asdf.exceptions import ValidationError +except ImportError: + from asdf import ValidationError @singledispatch diff --git a/setup.cfg b/setup.cfg index 8e2dab76..d73adece 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,9 +22,9 @@ packages = find: include_package_data = True install_requires = appdirs>=1.4 - asdf>=2.15.1 + asdf>=2.9.2 asdf-astropy>=0.1.1 - asdf-transform-schemas>=0.3 + asdf-transform-schemas astropy>=5 dask[array]>=2021.8.0 globus-sdk>=3.0