1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Scott Christley <scott.christley@utsouthwestern.edu>
Date: Wed, 28 Jan 2026 02:08:51 +0000
Subject: replace deprecated resource_stream
Origin: https://github.com/airr-community/airr-standards/commit/f5b69ca6f43d1e1d1cb1d5634aab8bc1f0d1061e
Bug-Debian: https://bugs.debian.org/1083596
Last-Update: 2026-01-28
---
airr/schema.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/airr/schema.py b/airr/schema.py
index 28967d3..298b020 100644
--- a/airr/schema.py
+++ b/airr/schema.py
@@ -7,12 +7,12 @@ import sys
import yaml
import yamlordereddictloader
from collections import OrderedDict
-from pkg_resources import resource_stream
+import importlib.resources
-with resource_stream(__name__, 'specs/airr-schema.yaml') as f:
+# For Python 3.9+
+with importlib.resources.files(__name__).joinpath('specs/airr-schema.yaml').open('rb') as f:
DEFAULT_SPEC = yaml.load(f, Loader=yamlordereddictloader.Loader)
-
class ValidationError(Exception):
"""
Exception raised when validation errors are encountered.
|