Skip to content

Commit f5db482

Browse files
authored
Merge pull request #1236 from Textualize/bump050
bumped version
2 parents 3bc8f17 + e7743d3 commit f5db482

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](http://semver.org/).
88

9-
## [0.5.0] - Unreleased
9+
## [0.5.0] - 2022-11-20
1010

1111
### Added
1212

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
homepage = "https://github.com/Textualize/textual"
55
description = "Modern Text User Interface framework"
66
authors = ["Will McGugan <[email protected]>"]

src/textual/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,15 +2011,15 @@ async def _prune_node(self, root: Widget) -> None:
20112011
for children in reversed(node_children):
20122012
# Closing children can be done asynchronously.
20132013
close_messages = [
2014-
child._close_messages() for child in children if child._running
2014+
child._close_messages(wait=True) for child in children if child._running
20152015
]
20162016
# TODO: What if a message pump refuses to exit?
20172017
if close_messages:
20182018
await asyncio.gather(*close_messages)
20192019
for child in children:
20202020
self._unregister(child)
20212021

2022-
await root._close_messages()
2022+
await root._close_messages(wait=False)
20232023
self._unregister(root)
20242024

20252025
async def action_check_bindings(self, key: str) -> None:

src/textual/message_pump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def _close_messages_no_wait(self) -> None:
284284
async def _on_close_messages(self, message: messages.CloseMessages) -> None:
285285
await self._close_messages()
286286

287-
async def _close_messages(self) -> None:
287+
async def _close_messages(self, wait: bool = True) -> None:
288288
"""Close message queue, and optionally wait for queue to finish processing."""
289289
if self._closed or self._closing:
290290
return
@@ -296,7 +296,7 @@ async def _close_messages(self) -> None:
296296
await self._message_queue.put(events.Unmount(sender=self))
297297
Reactive._reset_object(self)
298298
await self._message_queue.put(None)
299-
if self._task is not None and asyncio.current_task() != self._task:
299+
if wait and self._task is not None and asyncio.current_task() != self._task:
300300
# Ensure everything is closed before returning
301301
await self._task
302302

0 commit comments

Comments
 (0)