From acefbee3c0cefea291c4dfc8c2d4751c7bd9190c Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Fri, 14 Mar 2025 12:58:30 -0400 Subject: [PATCH 1/3] use modern importlib.resources --- norns/cfg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/norns/cfg.py b/norns/cfg.py index 5868f56..c2170d9 100644 --- a/norns/cfg.py +++ b/norns/cfg.py @@ -5,7 +5,7 @@ from UserDict import DictMixin except ImportError: from collections.abc import MutableMapping as DictMixin -import pkg_resources +import importlib.resources from norns.exceptions import ConfigError @@ -49,8 +49,9 @@ def __init__(self, name=None, config_file=None, default=None): if default and (not self.config_file or not os.path.exists(self.config_file)): - self.config_file = pkg_resources.resource_filename(name, default) - + self.config_file = importlib.resources.files(name) / default + #self.config_file = importlib.resources.as_file(config_traversable) + if not self.config_file or not os.path.exists(self.config_file): raise ConfigError("please provide name or config_file") From 332464e266536144d33e02ccb7c65d1078fd68db Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Fri, 14 Mar 2025 12:58:43 -0400 Subject: [PATCH 2/3] bump version --- norns/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/norns/__about__.py b/norns/__about__.py index 06ea00e..7de2db7 100644 --- a/norns/__about__.py +++ b/norns/__about__.py @@ -1,3 +1,3 @@ """Metadata""" -__version__ = '0.1.4' +__version__ = '0.1.6' __author__ = "Simon van Heeringen" From 0caea8432132fc002761b53b05652514e5359e3f Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Fri, 14 Mar 2025 14:58:50 -0400 Subject: [PATCH 3/3] use pynose as nose is not maintained --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 992ab2a..d3920be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -nose +pynose appdirs pyyaml>=5.1 diff --git a/setup.py b/setup.py index d9f5aec..0c68475 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ } requires = [ - 'nose', + 'pynose', 'appdirs', 'pyyaml', ]