Package: python-dtcwt Version: 0.12.0-5 Severity: normal Tags: patch X-Debbugs-Cc: chris.peter...@canonical.com User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oracular ubuntu-patch
Hi, Pytest dropped support for nose-style tests in pytest 8.2, of which python-dtcwt currently relies on for its tests. I applied the following patch in Ubuntu to adjust the package for pytest 8.2+ support. * d/p/pytest-nose-deprecation.patch: Update tests for pytest 8 compatibility (LP: #2068558). Thanks for considering the patch. -- System Information: Debian Release: trixie/sid APT prefers oracular APT policy: (500, 'oracular'), (100, 'oracular-proposed') Architecture: amd64 (x86_64) Kernel: Linux 6.8.0-31-generic (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru python-dtcwt-0.12.0/debian/patches/pytest-nose-deprecation.patch python-dtcwt-0.12.0/debian/patches/pytest-nose-deprecation.patch --- python-dtcwt-0.12.0/debian/patches/pytest-nose-deprecation.patch 1969-12-31 16:00:00.000000000 -0800 +++ python-dtcwt-0.12.0/debian/patches/pytest-nose-deprecation.patch 2024-06-05 21:53:51.000000000 -0700 @@ -0,0 +1,186 @@ +Description: Update nose-style test for pytest 8 + Pytest 8 dropped support for nose style tests, which rely on module level + functions named "setup". These tests can be migrated to pytest style tests + by renaming the setup functions to "setup_module". +Author: Chris Peterson <chris.peter...@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-dtcwt/+bug/2068558 +Forwarded: https://github.com/rjw57/dtcwt/pull/146 +Last-Update: 2024-06-06 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tests/test_againstmatlab.py ++++ b/tests/test_againstmatlab.py +@@ -49,7 +49,7 @@ + def assert_percentile_almost_equal_to_summary_cube(a, summary, *args, **kwargs): + assert_percentile_almost_equal(summarise_cube(a), summary, *args, **kwargs) + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_coldfilt.py ++++ b/tests/test_coldfilt.py +@@ -7,7 +7,7 @@ + + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_colfilter.py ++++ b/tests/test_colfilter.py +@@ -6,7 +6,7 @@ + + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_colifilt.py ++++ b/tests/test_colifilt.py +@@ -7,7 +7,7 @@ + + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_ifm2.py ++++ b/tests/test_ifm2.py +@@ -7,7 +7,7 @@ + + TOLERANCE = 1e-12 + +-def setup(): ++def setup_module(): + global mandrill, mandrill_crop + mandrill = datasets.mandrill().astype(np.float64) + mandrill_crop = mandrill[:233, :301] +--- a/tests/test_openclcoldfilt.py ++++ b/tests/test_openclcoldfilt.py +@@ -10,7 +10,7 @@ + from .util import assert_almost_equal, skip_if_no_cl + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_openclcolfilter.py ++++ b/tests/test_openclcolfilter.py +@@ -8,7 +8,7 @@ + from .util import assert_almost_equal, skip_if_no_cl + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_openclcolifilt.py ++++ b/tests/test_openclcolifilt.py +@@ -10,7 +10,7 @@ + from .util import assert_almost_equal, skip_if_no_cl + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_openclxfm2.py ++++ b/tests/test_openclxfm2.py +@@ -12,7 +12,7 @@ + TOLERANCE = 1e-12 + GOLD_TOLERANCE = 1e-5 + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_reflect.py ++++ b/tests/test_reflect.py +@@ -2,7 +2,7 @@ + + from dtcwt.utils import reflect + +-def setup(): ++def setup_module(): + global ramp, reflected + + # Create a simple linear ramp and reflect it +--- a/tests/test_registration.py ++++ b/tests/test_registration.py +@@ -8,7 +8,7 @@ + + import tests.datasets as datasets + +-def setup(): ++def setup_module(): + global f1, f2 + f1, f2 = datasets.regframes('traffic') + +--- a/tests/test_tfTransform1d.py ++++ b/tests/test_tfTransform1d.py +@@ -18,7 +18,7 @@ + + + @skip_if_no_tf +-def setup(): ++def setup_module(): + global mandrill, in_p, pyramid_ops + global tf, Transform1d, dtwavexfm2, dtwaveifm2, Pyramid_tf + global np_dtypes, tf_dtypes, stats +--- a/tests/test_tfTransform2d.py ++++ b/tests/test_tfTransform2d.py +@@ -18,7 +18,7 @@ + + + @skip_if_no_tf +-def setup(): ++def setup_module(): + # Import some tf only dependencies + global mandrill, Transform2d, Pyramid + global tf, np_dtypes, tf_dtypes, dtwavexfm2, dtwaveifm2 +--- a/tests/test_tfinputshapes.py ++++ b/tests/test_tfinputshapes.py +@@ -12,7 +12,7 @@ + + + @skip_if_no_tf +-def setup(): ++def setup_module(): + global tf + tf = import_module('tensorflow') + dtcwt.push_backend('tf') +--- a/tests/test_xfm2.py ++++ b/tests/test_xfm2.py +@@ -8,7 +8,7 @@ + + TOLERANCE = 1e-12 + +-def setup(): ++def setup_module(): + global mandrill + mandrill = datasets.mandrill() + +--- a/tests/test_xfm3.py ++++ b/tests/test_xfm3.py +@@ -8,7 +8,7 @@ + SPHERE_RAD=0.4 * GRID_SIZE + TOLERANCE = 1e-12 + +-def setup(): ++def setup_module(): + global ellipsoid + + grid = slice(-(GRID_SIZE>>1), (GRID_SIZE>>1)) diff -Nru python-dtcwt-0.12.0/debian/patches/series python-dtcwt-0.12.0/debian/patches/series --- python-dtcwt-0.12.0/debian/patches/series 2023-01-13 06:47:41.000000000 -0800 +++ python-dtcwt-0.12.0/debian/patches/series 2024-06-05 21:50:45.000000000 -0700 @@ -2,3 +2,4 @@ reproducible-build.patch numpy-fix.patch numpy-1.24.patch +pytest-nose-deprecation.patch