You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/09/03 17:02:09 UTC
[buildstream] branch bst-1 updated: Fix click deprecation warning
for get_terminal_size shutil replacement is available since Python 3.3
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch bst-1
in repository https://gitbox.apache.org/repos/asf/buildstream.git
The following commit(s) were added to refs/heads/bst-1 by this push:
new cb91707 Fix click deprecation warning for get_terminal_size shutil replacement is available since Python 3.3
new fdd2a61 Merge pull request #1502 from nanonyme/click-deprecation
cb91707 is described below
commit cb91707b3b473c4562f13263e057ffa255b87e80
Author: Seppo Yli-Olli <se...@gmail.com>
AuthorDate: Wed Aug 25 22:25:49 2021 +0300
Fix click deprecation warning for get_terminal_size
shutil replacement is available since Python 3.3
---
buildstream/_frontend/status.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/buildstream/_frontend/status.py b/buildstream/_frontend/status.py
index 70f2333..1efba3d 100644
--- a/buildstream/_frontend/status.py
+++ b/buildstream/_frontend/status.py
@@ -19,6 +19,8 @@
import os
import sys
import curses
+import shutil
+
import click
# Import a widget internal for formatting time codes
@@ -72,7 +74,7 @@ class Status():
success_profile, error_profile,
stream)
- self._term_width, _ = click.get_terminal_size()
+ self._term_width, _ = shutil.get_terminal_size()
self._alloc_lines = 0
self._alloc_columns = None
self._line_length = 0