From ffc8cf78ee2a2480f8b2d36336cd5ae5a4c63d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Mon, 14 Sep 2020 07:55:34 +0200 Subject: [PATCH] Added workaround for asyncio bug (close #145) --- CB/GitLab.py | 2 +- CB/__init__.py | 2 +- CurseBreaker.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CB/GitLab.py b/CB/GitLab.py index 13f992d..0c04325 100644 --- a/CB/GitLab.py +++ b/CB/GitLab.py @@ -37,6 +37,6 @@ def install(self, path): self.archive.extractall(path) for directory in self.directories: shutil.rmtree(path / directory, ignore_errors=True) - # FIXME - Python bug #32689 + # FIXME - Python bug #32689 - Fixed in 3.9 shutil.move(str(path / f'{self.shorthPath}-{self.branch}' / directory), str(path)) shutil.rmtree(path / f'{self.shorthPath}-{self.branch}') diff --git a/CB/__init__.py b/CB/__init__.py index 67c6f58..0a34a8f 100644 --- a/CB/__init__.py +++ b/CB/__init__.py @@ -2,7 +2,7 @@ import random from rich.terminal_theme import TerminalTheme -__version__ = '3.9.4' +__version__ = '3.9.5' __license__ = 'GPLv3' __copyright__ = '2019-2020, Paweł Jastrzębski ' __docformat__ = 'restructuredtext en' diff --git a/CurseBreaker.py b/CurseBreaker.py index fb5cb4f..c975ddd 100644 --- a/CurseBreaker.py +++ b/CurseBreaker.py @@ -35,6 +35,11 @@ if platform.system() == 'Windows': from ctypes import windll, wintypes +# FIXME - Python bug #39010 - Fixed in 3.8.6/3.9 +import asyncio +import selectors +asyncio.set_event_loop(asyncio.SelectorEventLoop(selectors.SelectSelector())) + class TUI: def __init__(self):