Control: tags 972548 + patch Control: tags 972548 + pending Dear maintainer,
The issue seems to be pandas 1.1 more than python 3.9. I've prepared an NMU for python-skbio (versioned as 0.5.6-3.1) and uploaded it to DELAYED/3. Please feel free to tell me if I should delay it longer. Regards. SR
diff -Nru python-skbio-0.5.6/debian/changelog python-skbio-0.5.6/debian/changelog --- python-skbio-0.5.6/debian/changelog 2020-09-29 00:20:23.000000000 -0700 +++ python-skbio-0.5.6/debian/changelog 2020-10-20 11:00:59.000000000 -0700 @@ -1,3 +1,10 @@ +python-skbio (0.5.6-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Patches: Support Pandas 1.1. (Closes: #972548) + + -- Stefano Rivera <stefa...@debian.org> Tue, 20 Oct 2020 11:00:59 -0700 + python-skbio (0.5.6-3) unstable; urgency=medium * debhelper-compat 13 (routine-update) diff -Nru python-skbio-0.5.6/debian/patches/pandas1.1-ordination-fix.patch python-skbio-0.5.6/debian/patches/pandas1.1-ordination-fix.patch --- python-skbio-0.5.6/debian/patches/pandas1.1-ordination-fix.patch 1969-12-31 16:00:00.000000000 -0800 +++ python-skbio-0.5.6/debian/patches/pandas1.1-ordination-fix.patch 2020-10-20 10:54:50.000000000 -0700 @@ -0,0 +1,137 @@ +From: Jamie Morton <jamietmor...@gmail.com> +Date: Wed, 26 Aug 2020 10:37:27 -0600 +Subject: Ordination fix (#1720) + +* `skbio.stats.ordination` tests have been relaxed. + +* Fixes build errors for newer versions of NumPy, Pandas, and SciPy. + +* Corrected a criticial bug in `skbio.alignment.StripedSmithWaterman` / + `skbio.alignment.local_pairwise_align_ssw` which would cause the + formatting of the aligned sequences to misplace gap characters by the + number of gap characters present in the opposing aligned sequence up + to that point. This was caused by a faulty implementation of CIGAR + string parsing, see + [#1679](https://github.com/biocore/scikit-bio/pull/1679) for full + details. + +Origin: upstream, https://github.com/biocore/scikit-bio/pull/1720 +Bug-Upstream: https://github.com/biocore/scikit-bio/issues/1713 +--- + CHANGELOG.md | 5 ++ + .../ordination/tests/test_redundancy_analysis.py | 1 - + skbio/util/_testing.py | 59 ++++++++++++++-------- + 3 files changed, 44 insertions(+), 21 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index ebdfe7e..61ae9a1 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -23,6 +23,11 @@ + ### Performance enhancements + + ### Bug fixes ++* * `skbio.stats.ordination` tests have been relaxed. ([#1713](https://github.com/biocore/scikit-bio/issues/1713)) ++ ++* Fixes build errors for newer versions of NumPy, Pandas, and SciPy. ++ ++* Corrected a criticial bug in `skbio.alignment.StripedSmithWaterman`/`skbio.alignment.local_pairwise_align_ssw` which would cause the formatting of the aligned sequences to misplace gap characters by the number of gap characters present in the opposing aligned sequence up to that point. This was caused by a faulty implementation of CIGAR string parsing, see [#1679](https://github.com/biocore/scikit-bio/pull/1679) for full details. + + * Fixes build errors for newer versions of NumPy, Pandas, and SciPy. + +diff --git a/skbio/stats/ordination/tests/test_redundancy_analysis.py b/skbio/stats/ordination/tests/test_redundancy_analysis.py +index 601832f..a8aefe8 100644 +--- a/skbio/stats/ordination/tests/test_redundancy_analysis.py ++++ b/skbio/stats/ordination/tests/test_redundancy_analysis.py +@@ -245,7 +245,6 @@ class TestRDAResults_biplot_score(TestCase): + proportion_explained=vegan_propexpl, + eigvals=vegan_eigvals) + +- pdt.assert_frame_equal(res_samples, vegan_samples) + # This scaling constant is required to make skbio comparable to vegan. + scaling = (rda_.eigvals[0] / rda_.eigvals[:6]) + exp.biplot_scores *= scaling +diff --git a/skbio/util/_testing.py b/skbio/util/_testing.py +index ae6ff1f..0d69fbc 100644 +--- a/skbio/util/_testing.py ++++ b/skbio/util/_testing.py +@@ -12,8 +12,8 @@ import sys + + import numpy as np + import numpy.testing as npt +-import pandas.testing as pdt +- ++import pandas.util.testing as pdt ++from scipy.spatial.distance import pdist + from ._decorator import experimental + + +@@ -118,24 +118,25 @@ def assert_ordination_results_equal(left, right, ignore_method_names=False, + npt.assert_equal(left.short_method_name, right.short_method_name) + npt.assert_equal(left.long_method_name, right.long_method_name) + +- _assert_frame_equal(left.samples, right.samples, +- ignore_columns=ignore_axis_labels, +- ignore_directionality=ignore_directionality, +- decimal=decimal) +- +- _assert_frame_equal(left.features, right.features, +- ignore_columns=ignore_axis_labels, +- ignore_directionality=ignore_directionality, +- decimal=decimal) +- _assert_frame_equal(left.biplot_scores, right.biplot_scores, +- ignore_columns=ignore_axis_labels, +- ignore_directionality=ignore_directionality, +- decimal=decimal) +- +- _assert_frame_equal(left.sample_constraints, right.sample_constraints, +- ignore_columns=ignore_axis_labels, +- ignore_directionality=ignore_directionality, +- decimal=decimal) ++ _assert_frame_dists_equal(left.samples, right.samples, ++ ignore_columns=ignore_axis_labels, ++ ignore_directionality=ignore_directionality, ++ decimal=decimal) ++ ++ _assert_frame_dists_equal(left.features, right.features, ++ ignore_columns=ignore_axis_labels, ++ ignore_directionality=ignore_directionality, ++ decimal=decimal) ++ ++ _assert_frame_dists_equal(left.biplot_scores, right.biplot_scores, ++ ignore_columns=ignore_axis_labels, ++ ignore_directionality=ignore_directionality, ++ decimal=decimal) ++ ++ _assert_frame_dists_equal(left.sample_constraints, right.sample_constraints, ++ ignore_columns=ignore_axis_labels, ++ ignore_directionality=ignore_directionality, ++ decimal=decimal) + + _assert_series_equal(left.eigvals, right.eigvals, ignore_axis_labels, + decimal=decimal) +@@ -156,6 +157,24 @@ def _assert_series_equal(left_s, right_s, ignore_index=False, decimal=7): + pdt.assert_index_equal(left_s.index, right_s.index) + + ++def _assert_frame_dists_equal(left_df, right_df, ignore_index=False, ++ ignore_columns=False, ++ ignore_directionality=False, decimal=7): ++ if left_df is None or right_df is None: ++ assert left_df is None and right_df is None ++ else: ++ left_values = left_df.values ++ right_values = right_df.values ++ left_dists = pdist(left_values) ++ right_dists = pdist(right_values) ++ npt.assert_almost_equal(left_dists, right_dists, decimal=decimal) ++ ++ if not ignore_index: ++ pdt.assert_index_equal(left_df.index, right_df.index) ++ if not ignore_columns: ++ pdt.assert_index_equal(left_df.columns, right_df.columns) ++ ++ + def _assert_frame_equal(left_df, right_df, ignore_index=False, + ignore_columns=False, ignore_directionality=False, + decimal=7): diff -Nru python-skbio-0.5.6/debian/patches/pandas1.1-valueerror.patch python-skbio-0.5.6/debian/patches/pandas1.1-valueerror.patch --- python-skbio-0.5.6/debian/patches/pandas1.1-valueerror.patch 1969-12-31 16:00:00.000000000 -0800 +++ python-skbio-0.5.6/debian/patches/pandas1.1-valueerror.patch 2020-10-20 10:54:50.000000000 -0700 @@ -0,0 +1,32 @@ +From: Stefano Rivera <stefa...@debian.org> +Date: Tue, 20 Oct 2020 10:43:09 -0700 +Subject: Update ValueError message assertion check + +Fixes compatibility with Pandas 1.1. + +Origin: https://github.com/biocore/scikit-bio/pull/1719 +Author: Ritik Raina <rra...@ucsd.edu> +Bug-Debian: https://bugs.debian.org/972548 +--- + skbio/metadata/_testing.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/skbio/metadata/_testing.py b/skbio/metadata/_testing.py +index 42ed277..c413133 100644 +--- a/skbio/metadata/_testing.py ++++ b/skbio/metadata/_testing.py +@@ -715,9 +715,12 @@ class PositionalMetadataMixinTests: + # array-like objects will fail if wrong size. + for array_like in (np.array(range(length-1)), range(length-1), + np.array(range(length+1)), range(length+1)): ++ + with self.assertRaisesRegex(ValueError, +- "Length of values does not match " +- "length of index"): ++ r'Length of values \(' + ++ str(len(array_like)) + ++ r'\) does not match length' ++ r' of index \(8\)'): + obj.positional_metadata['bar'] = array_like + + def test_positional_metadata_setter_pandas_consumable(self): diff -Nru python-skbio-0.5.6/debian/patches/series python-skbio-0.5.6/debian/patches/series --- python-skbio-0.5.6/debian/patches/series 2020-09-29 00:20:23.000000000 -0700 +++ python-skbio-0.5.6/debian/patches/series 2020-10-20 10:54:50.000000000 -0700 @@ -4,3 +4,5 @@ ignore_failing_patches.patch simde soften_test +pandas1.1-ordination-fix.patch +pandas1.1-valueerror.patch