[med-svn] [Git][med-team/emperor][master] 2 commits: d/watch: version=5

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Sep 24 06:18:48 BST 2026



Andreas Tille pushed to branch master at Debian Med / emperor


Commits:
19dfc68e by Andreas Tille at 2026-09-24T07:14:47+02:00
d/watch: version=5

- - - - -
61fc7b4f by Andreas Tille at 2026-09-24T07:18:35+02:00
Several changes to fix bug  #1148800: FTBFS against python 3.15rc2

* Replace deprecated Sphinx methods removed in Sphinx 9
* Add patch Replace deprecated Sphinx methods removed in Sphinx 9
* Update python3.12 patch with the upstream submitted accepted version
* Update no_future_dependency patch with the upstream accepted version
* Add patch Fallback version when package metadata is not found
* Add patch to deal with install_nbextension on Notebook 7+

- - - - -


10 changed files:

- debian/changelog
- + debian/patches/importlib-metadata-fallback.patch
- − debian/patches/no_future_dependency.patch
- + debian/patches/notebook7_compatibility.patch
- debian/patches/python3.12,patch → debian/patches/replace_deprecated_assertRaisesRegexp.patch
- debian/patches/series
- + debian/patches/sphinx9.patch
- + debian/patches/trim_python_2_crumbs.patch
- debian/rules
- debian/watch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,21 @@
+emperor (1.0.5+ds-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+
+  [ Andreas Tille ]
+  * d/watch: version=5
+
+  [ Maximiliano Curia ]
+  * Replace deprecated Sphinx methods removed in Sphinx 9
+  * Add patch Replace deprecated Sphinx methods removed in Sphinx 9
+  * Update python3.12 patch with the upstream submitted accepted version
+  * Update no_future_dependency patch with the upstream accepted version
+  * Add patch Fallback version when package metadata is not found
+  * Add patch to deal with install_nbextension on Notebook 7+
+  * All together Closes: #1148800
+
+ -- Andreas Tille <tille at debian.org>  Thu, 24 Sep 2026 07:14:29 +0200
+
 emperor (1.0.5+ds-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/importlib-metadata-fallback.patch
=====================================
@@ -0,0 +1,21 @@
+Description: Fallback version when package metadata is not found
+Author: Maximiliano Curia <maxy at debian.org>
+Forwarded: no
+Last-Update: 2026-09-22
+
+--- a/emperor/__init__.py
++++ b/emperor/__init__.py
+@@ -6,8 +6,11 @@
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+ 
+-from importlib.metadata import version
+-__version__ = version('emperor')  # noqa
++from importlib.metadata import PackageNotFoundError, version
++try:
++    __version__ = version('emperor')  # noqa
++except PackageNotFoundError:
++    __version__ = '1.0.5'
+ 
+ from emperor.core import Emperor
+ from emperor._pandas import scatterplot


=====================================
debian/patches/no_future_dependency.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Description: Remove extraneous dependency on python3-future
-Bug-Debian: https://bugs.debian.org/1058565
-Author: Alexandre Detiste <alexandre.detiste at gmail.com>
-Last-Update: Fri, 21 Feb 2025 21:53:49 +0100
-
---- a/setup.py
-+++ b/setup.py
-@@ -35,7 +35,7 @@
-     long_description = f.read()
- 
- base = ["numpy >= 1.7", "scipy >= 0.17.0", "click", "pandas",
--        "scikit-bio >= 0.4.1", "jinja2 >= 2.9", "future"]
-+        "scikit-bio >= 0.4.1", "jinja2 >= 2.9"]
- doc = ["Sphinx<4", "jinja2 >= 2.9, < 3.1", "sphinx-bootstrap-theme",
-        "numpydoc"]
- test = ["pep8", "flake8", "nose"]


=====================================
debian/patches/notebook7_compatibility.patch
=====================================
@@ -0,0 +1,59 @@
+Description: Handle missing install_nbextension on Notebook 7+ and modern IPython
+Author: Maximiliano Curia <maxy at debian.org>
+Forwarded: no
+Last-Update: 2026-09-23
+
+Index: emperor/emperor/util.py
+===================================================================
+--- emperor.orig/emperor/util.py
++++ emperor/emperor/util.py
+@@ -94,9 +94,15 @@ def nbinstall(overwrite=False, user=True
+ 
+     # Lazy imports so we don't pollute the namespace.
+     try:
+-        from notebook import install_nbextension
++        from notebook.nbextensions import install_nbextension
+     except ImportError:
+-        from IPython.html.nbextensions import install_nbextension
++        try:
++            from notebook import install_nbextension
++        except ImportError:
++            try:
++                from IPython.html.nbextensions import install_nbextension
++            except ImportError:
++                raise ImportError("install_nbextension is not available")
+     from IPython import version_info
+ 
+     install_nbextension(
+Index: emperor/tests/test_util.py
+===================================================================
+--- emperor.orig/tests/test_util.py
++++ emperor/tests/test_util.py
+@@ -114,7 +114,8 @@ class TopLevelTests(TestCase):
+ 
+     def tearDown(self):
+         for f in self.files_to_delete:
+-            rmtree(f)
++            if exists(f):
++                rmtree(f)
+ 
+     def test_preprocess_coords_file(self):
+         """Check correct processing is applied to the coords"""
+@@ -264,6 +265,17 @@ class TopLevelTests(TestCase):
+         self.assertEqual(o_clones, 4)
+ 
+     def test_nbinstall(self):
++        try:
++            from notebook.nbextensions import install_nbextension
++        except ImportError:
++            try:
++                from notebook import install_nbextension
++            except ImportError:
++                try:
++                    from IPython.html.nbextensions import install_nbextension
++                except ImportError:
++                    self.skipTest("install_nbextension is not available")
++
+         temp_dir = gettempdir()
+         target_path = join(temp_dir, 'share/jupyter/nbextensions/emperor/'
+                            'support_files')


=====================================
debian/patches/python3.12,patch → debian/patches/replace_deprecated_assertRaisesRegexp.patch
=====================================
@@ -1,60 +1,104 @@
-Description: Fix test
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
+From: Alexandre Detiste <alexandre.detiste at gmail.com>
+Date: Mon, 12 Jan 2026 18:01:04 +0100
+Subject: replace deprecated assertRaisesRegexp with assertRaisesRegex (#830)
+Origin: https://github.com/biocore/emperor/commit/ba319b96e4072837e2c76bf597b2bc7ff5eb7259
+
+---
+ tests/test_core.py | 58 +++++++++++++++++++++++-----------------------
+ 1 file changed, 29 insertions(+), 29 deletions(-)
 
 --- a/tests/test_core.py
 +++ b/tests/test_core.py
-@@ -237,7 +237,7 @@
+@@ -236,41 +236,41 @@ class TopLevelTests(TestCase):
          self.ord_res.proportion_explained = \
              self.ord_res.proportion_explained[:1].copy()
  
 -        with self.assertRaisesRegexp(ValueError, "Ordinations with less than "
+-                                     "two dimensions are not supported"):
 +        with self.assertRaisesRegex(ValueError, "Ordinations with less than "
-                                      "two dimensions are not supported"):
++                                    "two dimensions are not supported"):
              Emperor(self.ord_res, self.mf, remote=False)
  
-@@ -245,7 +245,7 @@
+     def test_initial_unbalanced_more_than_five(self):
          mf = self.mf.copy()
          mf.drop(['PC.354', 'PC.355', 'PC.356', 'PC.481', 'PC.607', 'PC.636'],
                  inplace=True)
 -        with self.assertRaisesRegexp(KeyError, "There are samples not "
+-                                     "included in the sample mapping file. "
+-                                     "Override this error by using the "
+-                                     "`ignore_missing_samples` argument. "
+-                                     "Showing only the first 5 samples out of "
+-                                     "6: PC.354, PC.355, PC.356, PC.481, "
+-                                     "PC.607 ..."):
 +        with self.assertRaisesRegex(KeyError, "There are samples not "
-                                      "included in the sample mapping file. "
-                                      "Override this error by using the "
-                                      "`ignore_missing_samples` argument. "
-@@ -257,7 +257,7 @@
++                                    "included in the sample mapping file. "
++                                    "Override this error by using the "
++                                    "`ignore_missing_samples` argument. "
++                                    "Showing only the first 5 samples out of "
++                                    "6: PC.354, PC.355, PC.356, PC.481, "
++                                    "PC.607 ..."):
+             Emperor(self.ord_res, mf, remote=self.url)
+ 
      def test_initial_unbalanced(self):
          mf = self.mf.copy()
          mf.drop(['PC.354'], inplace=True)
 -        with self.assertRaisesRegexp(KeyError, "There are samples not "
+-                                     "included in the sample mapping file. "
+-                                     "Override this error by using the "
+-                                     "`ignore_missing_samples` argument. "
+-                                     "Offending samples: PC.354"):
 +        with self.assertRaisesRegex(KeyError, "There are samples not "
-                                      "included in the sample mapping file. "
-                                      "Override this error by using the "
-                                      "`ignore_missing_samples` argument. "
-@@ -267,7 +267,7 @@
++                                    "included in the sample mapping file. "
++                                    "Override this error by using the "
++                                    "`ignore_missing_samples` argument. "
++                                    "Offending samples: PC.354"):
+             Emperor(self.ord_res, mf, remote=self.url)
+ 
          # test feature metadata
          fmf = self.feature_mf.copy()
          fmf.drop(['f.PC.636'], inplace=True)
 -        with self.assertRaisesRegexp(KeyError, "There are features not "
+-                                     "included in the feature mapping file. "
+-                                     "Override this error by using the "
+-                                     "`ignore_missing_samples` argument. "
+-                                     "Offending features: f.PC.636"):
 +        with self.assertRaisesRegex(KeyError, "There are features not "
-                                      "included in the feature mapping file. "
-                                      "Override this error by using the "
-                                      "`ignore_missing_samples` argument. "
-@@ -323,7 +323,7 @@
++                                    "included in the feature mapping file. "
++                                    "Override this error by using the "
++                                    "`ignore_missing_samples` argument. "
++                                    "Offending features: f.PC.636"):
+             Emperor(self.biplot, self.mf, fmf, remote=self.url)
+ 
+     def test_initial_unbalanced_ignore(self):
+@@ -322,21 +322,21 @@ class TopLevelTests(TestCase):
          mf = self.mf.copy()
          mf.index = mf.index + '.not'
  
 -        with self.assertRaisesRegexp(ValueError, 'None of the sample '
+-                                     'identifiers match between the metadata '
+-                                     'and the coordinates. Verify that you are'
+-                                     ' using metadata and coordinates '
+-                                     'corresponding to the same dataset.'):
 +        with self.assertRaisesRegex(ValueError, 'None of the sample '
-                                      'identifiers match between the metadata '
-                                      'and the coordinates. Verify that you are'
-                                      ' using metadata and coordinates '
-@@ -333,7 +333,7 @@
++                                    'identifiers match between the metadata '
++                                    'and the coordinates. Verify that you are'
++                                    ' using metadata and coordinates '
++                                    'corresponding to the same dataset.'):
+             Emperor(self.ord_res, mf, remote=self.url)
+ 
          fmf = self.feature_mf.copy()
          fmf.index = fmf.index + '.not'
  
 -        with self.assertRaisesRegexp(ValueError, 'None of the feature '
+-                                     'identifiers match between the metadata '
+-                                     'and the coordinates. Verify that you are'
+-                                     ' using metadata and coordinates '
+-                                     'corresponding to the same dataset.'):
 +        with self.assertRaisesRegex(ValueError, 'None of the feature '
-                                      'identifiers match between the metadata '
-                                      'and the coordinates. Verify that you are'
-                                      ' using metadata and coordinates '
++                                    'identifiers match between the metadata '
++                                    'and the coordinates. Verify that you are'
++                                    ' using metadata and coordinates '
++                                    'corresponding to the same dataset.'):
+             Emperor(self.biplot, self.mf, fmf, remote=self.url)
+ 
+     def test_get_template(self):


=====================================
debian/patches/series
=====================================
@@ -1,5 +1,8 @@
 do_not_use_custom_numpydoc.patch
 correct_jsdoc_arguments.patch
 EditSectionTitle.patch
-no_future_dependency.patch
-python3.12,patch
+trim_python_2_crumbs.patch
+replace_deprecated_assertRaisesRegexp.patch
+sphinx9.patch
+importlib-metadata-fallback.patch
+notebook7_compatibility.patch


=====================================
debian/patches/sphinx9.patch
=====================================
@@ -0,0 +1,23 @@
+Description: Replace deprecated Sphinx methods removed in Sphinx 9 and add emperor to sys.path
+Author: Maximiliano Curia <maxy at debian.org>
+Forwarded: no
+Last-Update: 2026-09-23
+
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -16,6 +16,7 @@
+ import os
+ import glob
+ 
++sys.path.insert(0, os.path.abspath('../..'))
+ import sphinx_bootstrap_theme
+ 
+ # -- Options for autosummary ----------------------------------------------
+@@ -271,5 +272,5 @@
+ # Add the 'copybutton' javascript, to hide/show the prompt in code
+ # examples, originally taken from scikit-learn's doc/conf.py
+ def setup(app):
+-    app.add_javascript('copybutton.js')
+-    app.add_stylesheet('style.css')
++    app.add_js_file('copybutton.js')
++    app.add_css_file('style.css')


=====================================
debian/patches/trim_python_2_crumbs.patch
=====================================
@@ -0,0 +1,146 @@
+From: Alexandre Detiste <alexandre.detiste at gmail.com>
+Date: Mon, 12 Jan 2026 17:07:57 +0100
+Subject: trim Python 2 crumbs (#829)
+Origin: https://github.com/biocore/emperor/commit/1ba443724d2b6ba26fa694f8b9ad3113e727786a
+
+---
+ emperor/_pandas.py                      | 1 -
+ emperor/core.py                         | 1 -
+ emperor/format.py                       | 3 ---
+ emperor/util.py                         | 1 -
+ examples/build.py                       | 1 -
+ setup.py                                | 2 +-
+ tests/test_core.py                      | 1 -
+ tests/test_format.py                    | 1 -
+ tests/test_pandas.py                    | 9 +--------
+ tests/test_qiime_backports/test_util.py | 1 -
+ tests/test_util.py                      | 1 -
+ 11 files changed, 2 insertions(+), 20 deletions(-)
+
+--- a/emperor/_pandas.py
++++ b/emperor/_pandas.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ import numpy as np
+ import pandas as pd
+--- a/emperor/core.py
++++ b/emperor/core.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ from copy import deepcopy
+ from os.path import join
+--- a/emperor/format.py
++++ b/emperor/format.py
+@@ -6,9 +6,6 @@
+ # The full license is in the file COPYING.txt, distributed with this software.
+ # ----------------------------------------------------------------------------
+ 
+-from __future__ import division
+-
+-
+ from sys import argv
+ from os.path import abspath
+ from datetime import datetime
+--- a/emperor/util.py
++++ b/emperor/util.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ import pandas as pd
+ import numpy as np
+--- a/examples/build.py
++++ b/examples/build.py
+@@ -9,7 +9,6 @@ to generate a plot with 111 samples do:
+ Note that you will need jinja2 installed, and to execute the program from
+ within the examples folder.
+ """
+-from __future__ import division
+ 
+ from random import sample, choice
+ from sys import argv
+--- a/setup.py
++++ b/setup.py
+@@ -35,7 +35,7 @@ with open('README.md') as f:
+     long_description = f.read()
+ 
+ base = ["numpy >= 1.7", "scipy >= 0.17.0", "click", "pandas",
+-        "scikit-bio >= 0.4.1", "jinja2 >= 2.9", "future"]
++        "scikit-bio >= 0.4.1", "jinja2 >= 2.9"]
+ doc = ["Sphinx<4", "jinja2 >= 2.9, < 3.1", "sphinx-bootstrap-theme",
+        "numpydoc"]
+ test = ["pep8", "flake8", "nose"]
+--- a/tests/test_core.py
++++ b/tests/test_core.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ from unittest import TestCase, main
+ from copy import deepcopy
+--- a/tests/test_format.py
++++ b/tests/test_format.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ from emperor.format import format_emperor_autograph
+ from unittest import TestCase, main
+--- a/tests/test_pandas.py
++++ b/tests/test_pandas.py
+@@ -5,8 +5,8 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
++from io import StringIO
+ from unittest import TestCase, main
+ 
+ import pandas as pd
+@@ -21,13 +21,6 @@ try:
+ except Exception:
+     import _test_core_strings as tcs
+ 
+-# from http://stackoverflow.com/a/22605281/379593
+-import sys
+-if sys.version_info[0] < 3:
+-    from StringIO import StringIO
+-else:
+-    from io import StringIO
+-
+ 
+ class TopLevelTests(TestCase):
+     def setUp(self):
+--- a/tests/test_qiime_backports/test_util.py
++++ b/tests/test_qiime_backports/test_util.py
+@@ -1,5 +1,4 @@
+ #!/usr/bin/env python
+-from __future__ import division
+ 
+ __author__ = "Greg Caporaso"
+ __copyright__ = "Copyright 2011, The QIIME Project"
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -5,7 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+ 
+ from unittest import TestCase, main
+ from os.path import exists, join


=====================================
debian/rules
=====================================
@@ -3,19 +3,14 @@
 export DH_VERBOSE = 1
 
 export PYBUILD_NAME=emperor
-
-export PYBUILD_AFTER_BUILD=python{version} setup.py develop --install-dir {build_dir}; \
-	export PYTHONPATH={build_dir}:$(PYTHONPATH); \
-	$(MAKE) -C doc html; \
-	cp -rv {dir}/tests/test_data {build_dir}/tests
-
-export PYBUILD_BEFORE_INSTALL=rm -rvf {build_dir}/emperor.egg* \
-	{build_dir}/site.py {build_dir}/easy-install.pth \
-	{build_dir}/f* {build_dir}/*.py {build_dir}/numpy-config
+export PYBUILD_BEFORE_TEST=cp -rv {dir}/tests/test_data {build_dir}/tests
 
 %:
 	dh $@ --with sphinxdoc --buildsystem=pybuild
 
+execute_after_dh_auto_build-indep:
+	PYTHONPATH=$(CURDIR) $(MAKE) -C doc html
+
 execute_after_dh_installdocs:
 	p="debian/python3-emperor-doc/usr/share/doc/python3-emperor/jsdoc" ; \
 	if [ -d "$$p" ]; then \
@@ -34,7 +29,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 		cd tests/javascript_tests/qunit/ && ln -s /usr/share/javascript/qunit/qunit.css qunit-min.css \
 		                                 && ln -s /usr/share/javascript/qunit/qunit.min.js qunit-min.js ; \
 	fi
-	PYTHONPATH=.pybuild/`find .pybuild -name cpython3*_emperor -type d|head -n 1`/build pytest-3
+	dh_auto_test
 endif
 
 execute_after_dh_auto_clean:


=====================================
debian/watch
=====================================
@@ -1,3 +1,7 @@
-version=4
-opts="uversionmangle=s/-beta/~beta/,repacksuffix=+ds,dversionmangle=auto,repack,compression=xz" \
-   https://github.com/biocore/emperor/tags .*/v?(\d\S+)\.tar\.gz
+Version: 5
+
+Template: Github
+Dist: https://github.com/biocore/emperor
+Dversionmangle: auto
+Repacksuffix: +ds
+Uversionmangle: s/-beta/~beta/



View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/5901f9121431e240f9bc7e7552c9a74275a64883...61fc7b4f5832c5dea27a708700c21577297e29b6

-- 
View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/5901f9121431e240f9bc7e7552c9a74275a64883...61fc7b4f5832c5dea27a708700c21577297e29b6
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


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


More information about the debian-med-commit mailing list