From 74d20a87c14be6d3febae22181130189e270e943 Mon Sep 17 00:00:00 2001 From: Brian McFee Date: Tue, 5 Mar 2024 14:50:29 -0500 Subject: [PATCH] better handling of importlib_resources --- resampy/filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resampy/filters.py b/resampy/filters.py index bcf7abf..8d08927 100644 --- a/resampy/filters.py +++ b/resampy/filters.py @@ -50,8 +50,9 @@ try: # Try to import from the standard library first (Python >= 3.9) +if sys.version_info < (3, 9) from importlib import resources as importlib_resources -except ImportError: +else: # Fall back to the backport import importlib_resources