Bug#1061740: django-rich: upstream patch to fix the test failure on Python 3.12

2024-02-09 Thread Ravi Kant Sharma
Package: django-rich
Version: 1.8.0-1
Followup-For: Bug #1061740
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: ravi.kant.sha...@canonical.com
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * The bug was identified during Ubuntu Noble migration to Python 3.12.
  * The patch is chery picked commit from upstream.
  * Fixes tests on Python-3.12 (LP: #2052724)
Added patch:
tests-Fix-skip-test-for-change-in-Python-3.12.patch


Thanks for considering the patch.


-- System Information:
Debian Release: trixie/sid
  APT prefers mantic-updates
  APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 
'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-15-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, 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 django-rich-1.8.0/debian/patches/series 
django-rich-1.8.0/debian/patches/series
--- django-rich-1.8.0/debian/patches/series 2023-01-23 17:48:06.0 
+0100
+++ django-rich-1.8.0/debian/patches/series 2024-02-08 18:27:46.0 
+0100
@@ -1,3 +1,4 @@
 Use-python3-within-test-call.patch
 tests-Drop-various-python-version-handling.patch
 tests-Another-bunch-of-adoptions-for-Python-3.11.patch
+tests-Fix-skip-test-for-change-in-Python-3.12.patch
diff -Nru 
django-rich-1.8.0/debian/patches/tests-Fix-skip-test-for-change-in-Python-3.12.patch
 
django-rich-1.8.0/debian/patches/tests-Fix-skip-test-for-change-in-Python-3.12.patch
--- 
django-rich-1.8.0/debian/patches/tests-Fix-skip-test-for-change-in-Python-3.12.patch
1970-01-01 01:00:00.0 +0100
+++ 
django-rich-1.8.0/debian/patches/tests-Fix-skip-test-for-change-in-Python-3.12.patch
2024-02-08 18:27:46.0 +0100
@@ -0,0 +1,28 @@
+From ddd703aa55cb76c7addd6cc87d4ecdbf695d870b Mon Sep 17 00:00:00 2001
+From: Adam Johnson 
+Date: Tue, 19 Dec 2023 23:13:56 +
+Subject: [PATCH] Fix skip test for change in Python 3.12 (#172)
+Origin: upstream, 
https://github.com/adamchainz/django-rich/commit/ddd703aa55cb76c7addd6cc87d4ecdbf695d870b
+Bug: https://bugs.launchpad.net/debian/+source/django-rich/+bug/2052724
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061740
+
+---
+ tests/test_test.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_test.py b/tests/test_test.py
+index 86eac20..2b69bba 100644
+--- a/tests/test_test.py
 b/tests/test_test.py
+@@ -36,9 +36,8 @@ def test_failure_sql_query(self):
+ )
+ self.assertTrue(False)
+ 
+-@unittest.skip("some reason")
+-def test_skip(self):  # pragma: no cover
+-raise ValueError("never run")
++def test_skip(self):
++self.skipTest("some reason")
+ 
+ @unittest.expectedFailure
+ def test_expected_failure(self):


Bug#1061740: django-rich: upstream patch to fix the test failure on Python 3.12

2024-02-09 Thread Ravi Kant Sharma
Package: django-rich
Version: 1.8.0-1
Followup-For: Bug #1061740
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: ravi.kant.sha...@canonical.com
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

Fix a test failure identified during Python migration to 3.12.

The patch cherry picks commit form upstream to fix the test case.

  * Fixes tests on Python-3.12 (LP: #2052724)
Added patch:
tests-Fix-skip-test-for-change-in-Python-3.12.patch


Thanks for considering the patch.


-- System Information:
Debian Release: trixie/sid
  APT prefers mantic-updates
  APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 
'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-15-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, 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


django-rich_1.8.0-1ubuntu1.debdiff
Description: inode/empty