[med-svn] [Git][med-team/q2templates][master] Backport upstream change to move away from python3-pkg-resources.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Tue Mar 3 18:13:49 GMT 2026



Étienne Mollier pushed to branch master at Debian Med / q2templates


Commits:
77f7bca3 by Adrian Bunk at 2026-03-03T19:09:41+01:00
Backport upstream change to move away from python3-pkg-resources.

Signed-off-by: Étienne Mollier <emollier at debian.org>

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/0001-MAINT-pkg_resources-deprecation.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+q2templates (2024.5.0+ds-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream change to move away from python3-pkg-resources.
+    (Closes: #1125825)
+
+ -- Adrian Bunk <bunk at debian.org>  Tue, 03 Mar 2026 19:51:17 +0200
+
 q2templates (2024.5.0+ds-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -24,7 +24,6 @@ Depends: ${shlibs:Depends},
          ${misc:Depends},
          ${python3:Depends},
          python3-pandas,
-         python3-pkg-resources,
          python3-jinja2,
          libjs-bootstrap,
          libjs-jquery,


=====================================
debian/patches/0001-MAINT-pkg_resources-deprecation.patch
=====================================
@@ -0,0 +1,35 @@
+From ba3e92d92918e620c77e23d0442608a1a678a061 Mon Sep 17 00:00:00 2001
+From: Chloe Herman <60228108+cherman2 at users.noreply.github.com>
+Date: Fri, 21 Mar 2025 13:15:51 -0700
+Subject: MAINT: `pkg_resources` deprecation
+
+Co-authored-by: Liz Gehret <elizabeth.gehret at gmail.com>
+---
+ q2templates/_templates.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/q2templates/_templates.py b/q2templates/_templates.py
+index e6bf159..4023041 100644
+--- a/q2templates/_templates.py
++++ b/q2templates/_templates.py
+@@ -8,7 +8,7 @@
+ 
+ import inspect
+ import os
+-import pkg_resources
++import importlib
+ import shutil
+ import tempfile
+ 
+@@ -35,7 +35,7 @@ def render(source_files, output_dir, context=None):
+     src = get_iterable(source_files)
+     # TODO: Hook into qiime.sdk.config.TemporaryDirectory() when it exists
+     temp_dir = tempfile.TemporaryDirectory()
+-    template_data = pkg_resources.resource_filename('q2templates', 'templates')
++    template_data = importlib.resources.files('q2templates') / 'templates'
+     env = Environment(loader=FileSystemLoader(temp_dir.name), auto_reload=True)
+ 
+     shutil.copy2(os.path.join(template_data, 'base.html'), temp_dir.name)
+-- 
+2.47.3
+


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 jquery_remove_version.patch
 python3.12.patch
+0001-MAINT-pkg_resources-deprecation.patch



View it on GitLab: https://salsa.debian.org/med-team/q2templates/-/commit/77f7bca34ff07f7b46db113ed6dbfc958afb6503

-- 
View it on GitLab: https://salsa.debian.org/med-team/q2templates/-/commit/77f7bca34ff07f7b46db113ed6dbfc958afb6503
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260303/48cf40d4/attachment-0001.htm>


More information about the debian-med-commit mailing list