diff -Nru django-rich-1.4.0/debian/changelog django-rich-1.4.0/debian/changelog --- django-rich-1.4.0/debian/changelog 2023-02-02 13:48:51.000000000 +0000 +++ django-rich-1.4.0/debian/changelog 2023-02-02 11:05:10.000000000 +0000 @@ -1,13 +1,7 @@ -django-rich (1.4.0-5ubuntu2~ppa1) lunar; urgency=medium +django-rich (1.4.0-5ubuntu1~ppa5) lunar; urgency=medium - * mock environment when running management test - - -- Olivier Gayot Thu, 02 Feb 2023 14:48:51 +0100 - -django-rich (1.4.0-5ubuntu1) lunar; urgency=medium - - * clear TERM variable when running build test suite since python-rich - disables color/style when TERM=unknown (LP: #2004553) + * make test-suite insensitive to the TERM variable to fix FTBFS when + TERM=unknown (LP: #2004553) -- Olivier Gayot Thu, 02 Feb 2023 12:05:10 +0100 diff -Nru django-rich-1.4.0/debian/patches/0001-Fix-failing-tests-if-the-TERM-variable-is-set-to-unk.patch django-rich-1.4.0/debian/patches/0001-Fix-failing-tests-if-the-TERM-variable-is-set-to-unk.patch --- django-rich-1.4.0/debian/patches/0001-Fix-failing-tests-if-the-TERM-variable-is-set-to-unk.patch 1970-01-01 00:00:00.000000000 +0000 +++ django-rich-1.4.0/debian/patches/0001-Fix-failing-tests-if-the-TERM-variable-is-set-to-unk.patch 2023-02-02 11:05:10.000000000 +0000 @@ -0,0 +1,57 @@ +Description: Fix failing tests if the TERM variable is set to unknown +Origin: upstream, https://github.com/adamchainz/django-rich/commit/d437e9248322540b976d25f8a78a413e581c5dac +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030305 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/django-rich/+bug/2004553 +Applied-Upstream: django-rich >> 1.4.0 +Last-Update: 2023-02-03 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: django-rich-1.4.0/tests/test_management.py +=================================================================== +--- django-rich-1.4.0.orig/tests/test_management.py 2023-02-03 09:25:32.460627256 +0100 ++++ django-rich-1.4.0/tests/test_management.py 2023-02-03 09:28:26.431930919 +0100 +@@ -1,12 +1,16 @@ + from __future__ import annotations + ++import os + from functools import partial + from inspect import Parameter, Signature, signature + from io import StringIO ++from typing import Any + from unittest import mock + + import pytest +-from django.core.management import BaseCommand, CommandError, call_command ++from django.core.management import BaseCommand ++from django.core.management import call_command as base_call_command ++from django.core.management import CommandError + from django.test import SimpleTestCase + from rich.console import Console + +@@ -28,6 +32,12 @@ + return True + + ++def call_command(*args: str, **kwargs: Any) -> None: ++ # Ensure rich uses colouring and consistent width ++ with mock.patch.dict(os.environ, TERM="", COLUMNS="80"): ++ base_call_command(*args, **kwargs) ++ ++ + class RichCommandTests(SimpleTestCase): + def test_init_signature(self): + rc_signature = strip_annotations(signature(RichCommand.__init__)) +Index: django-rich-1.4.0/tests/test_test.py +=================================================================== +--- django-rich-1.4.0.orig/tests/test_test.py 2023-02-03 09:25:32.460627256 +0100 ++++ django-rich-1.4.0/tests/test_test.py 2023-02-03 09:25:32.460627256 +0100 +@@ -88,6 +88,9 @@ + **os.environ, + "DJANGO_SETTINGS_MODULE": "tests.settings", + "COVERAGE_PROCESS_START": str(SETUP_CFG_PATH), ++ # Ensure rich uses colouring and consistent width ++ "TERM": "", ++ "COLUMNS": "80", + }, + **kwargs, + ) diff -Nru django-rich-1.4.0/debian/patches/clear-TERM-variable.patch django-rich-1.4.0/debian/patches/clear-TERM-variable.patch --- django-rich-1.4.0/debian/patches/clear-TERM-variable.patch 2023-02-02 13:48:51.000000000 +0000 +++ django-rich-1.4.0/debian/patches/clear-TERM-variable.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Index: django-rich-1.4.0/tests/test_management.py -=================================================================== ---- django-rich-1.4.0.orig/tests/test_management.py 2022-06-05 17:27:00.000000000 +0200 -+++ django-rich-1.4.0/tests/test_management.py 2023-02-02 14:50:44.876420552 +0100 -@@ -3,6 +3,7 @@ - from functools import partial - from inspect import Parameter, Signature, signature - from io import StringIO -+import os - from unittest import mock - - import pytest -@@ -28,6 +29,7 @@ - return True - - -+@mock.patch.dict(os.environ, TERM="") - class RichCommandTests(SimpleTestCase): - def test_init_signature(self): - rc_signature = strip_annotations(signature(RichCommand.__init__)) diff -Nru django-rich-1.4.0/debian/patches/series django-rich-1.4.0/debian/patches/series --- django-rich-1.4.0/debian/patches/series 2023-02-02 13:48:51.000000000 +0000 +++ django-rich-1.4.0/debian/patches/series 2023-02-02 11:05:10.000000000 +0000 @@ -1,4 +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 -clear-TERM-variable.patch +0001-Fix-failing-tests-if-the-TERM-variable-is-set-to-unk.patch