From 40dbc0a616839d634d64ec6212b9daeff1b94063 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 2 Dec 2021 13:46:10 +0000 Subject: [PATCH] fix for deadlock --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- rich/live.py | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 974d14aaf..037aa243c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [10.15.2] - 2021-12-02 + +### Fixed + +- Deadlock issue https://github.com/willmcgugan/rich/issues/1734 + ## [10.15.1] - 2021-11-29 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 4300beae9..4be770b13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "rich" homepage = "https://github.com/willmcgugan/rich" documentation = "https://rich.readthedocs.io/en/latest/" -version = "10.15.0" +version = "10.15.2" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" authors = ["Will McGugan "] license = "MIT" diff --git a/rich/live.py b/rich/live.py index 59478dd97..4413f16da 100644 --- a/rich/live.py +++ b/rich/live.py @@ -128,11 +128,11 @@ def stop(self) -> None: with self._lock: if not self._started: return + self.console.clear_live() self._started = False if self.auto_refresh and self._refresh_thread is not None: self._refresh_thread.stop() - self._refresh_thread.join() self._refresh_thread = None # allow it to fully render on the last even if overflow self.vertical_overflow = "visible" @@ -158,7 +158,6 @@ def stop(self) -> None: # jupyter last refresh must occur after console pop render hook # i am not sure why this is needed self.refresh() - self.console.clear_live() def __enter__(self) -> "Live": self.start(refresh=self._renderable is not None)