[Bug 2004553] Re: django-rich FTBFS when TERM=unknown

Olivier Gayot 2004553 at bugs.launchpad.net
Thu Feb 2 14:13:42 UTC 2023


Adding second version of debdiff with patch that was submitted upstream.

** Patch added: "2-1.4.0-5__1.4.0-5ubuntu1.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/django-rich/+bug/2004553/+attachment/5644453/+files/2-1.4.0-5__1.4.0-5ubuntu1.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2004553

Title:
  django-rich FTBFS when TERM=unknown

Status in django-rich package in Ubuntu:
  New
Status in django-rich package in Debian:
  Unknown

Bug description:
  django-rich FTBFS on Ubuntu because the build-time test suite fails:

  
  ___________________ RichCommandTests.test_output_force_color ___________________

  self = <tests.test_management.RichCommandTests
  testMethod=test_output_force_color>

      def test_output_force_color(self):
          stdout = StringIO()
      
          call_command("example", "--force-color", stdout=stdout)
      
  >       assert stdout.getvalue() == "\x1b[1;31mAlert!\x1b[0m\n"
  E       AssertionError: assert 'Alert!\n' == '\x1b[1;31mAlert!\x1b[0m\n'
  E         - Alert!
  E         + Alert!

  This happens because the underlying python rich library disables
  color/style when the TERM variable is set to unknown (which is what
  the Ubuntu builders have):

  > Setting the environment variable TERM to "dumb" or "unknown" will
  disable color/style and some features that require moving the cursor,
  such as progress bars.

  https://rich.readthedocs.io/en/stable/console.html?highlight=unknown#environment-
  variables

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/django-rich/+bug/2004553/+subscriptions




More information about the Ubuntu-sponsors mailing list