diff --git a/python/mach/mach/logging.py b/python/mach/mach/logging.py index 724e734fa8c..9f0293eb7fd 100644 --- a/python/mach/mach/logging.py +++ b/python/mach/mach/logging.py @@ -9,9 +9,9 @@ from __future__ import absolute_import, unicode_literals try: - import blessings + import blessed except ImportError: - blessings = None + blessed = None import json import logging @@ -93,7 +93,7 @@ class StructuredTerminalFormatter(StructuredHumanFormatter): def set_terminal(self, terminal): self.terminal = terminal - self._sgr0 = terminal.normal if terminal and blessings else '' + self._sgr0 = terminal.normal if terminal and blessed else '' def format(self, record): f = record.msg.format(**record.params) @@ -172,11 +172,11 @@ class LoggingManager(object): @property def terminal(self): - if not self._terminal and blessings: + if not self._terminal and blessed: # Sometimes blessings fails to set up the terminal. In that case, # silently fail. try: - terminal = blessings.Terminal(stream=sys.stdout) + terminal = blessed.Terminal(stream=sys.stdout) if terminal.is_a_tty: self._terminal = terminal diff --git a/python/mach/setup.py b/python/mach/setup.py index 0c96a083e6d..ea0b39250db 100644 --- a/python/mach/setup.py +++ b/python/mach/setup.py @@ -29,7 +29,7 @@ setup( 'Programming Language :: Python :: 3.10', ], install_requires=[ - 'blessings', + 'blessed', 'mozfile', 'mozprocess', 'six', diff --git a/python/requirements.txt b/python/requirements.txt index c5635ed6bab..20d42065dde 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,7 +1,7 @@ # Ensure all versions are pinned for repeatability, # since `--system-site-packages` is enabled -blessings == 1.7 +blessed == 1.20.0 distro == 1.4 mozinfo == 1.2.3 mozlog == 8.0.0 diff --git a/python/wpt/grouping_formatter.py b/python/wpt/grouping_formatter.py index 376ddce0804..16f7044f351 100644 --- a/python/wpt/grouping_formatter.py +++ b/python/wpt/grouping_formatter.py @@ -238,8 +238,8 @@ class ServoFormatter(mozlog.formatters.base.BaseFormatter, ServoHandler): self.clear_eol = DEFAULT_CLEAR_EOL_CODE try: - import blessings - self.terminal = blessings.Terminal() + import blessed + self.terminal = blessed.Terminal() self.move_up = self.terminal.move_up self.clear_eol = self.terminal.clear_eol except Exception as exception: