aiokitchen/aiomisc

не работает с python 3.5.3

Closed this issue · 2 comments

Добрый день!
Нам приходится работать исключительно на debian9 и astra linux 1.6 - к обоим дистрибутивам "прибита гвоздями" версия python 3.5.3 (к астре так точно прибита). В этой версии python не выполняется:

from typing import AsyncContextManager 

(AsyncContextManager появился в typing вроде только с версии 3.5.4)

Сами вопрос сейчас решаем патчем такого вида:

--- a/aiomisc/pool.py
+++ b/aiomisc/pool.py
@@ -3,7 +3,7 @@
 from abc import ABC, abstractmethod
 from collections import defaultdict
 from random import random
-from typing import AsyncContextManager
+from typing_extensions import AsyncContextManager
 
 from .utils import cancel_tasks
 
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
 colorlog
 prettylog~=0.3.0
+typing_extensions>=3.6.5

Забираем AsyncContextManager из стороннего пакета typing_extensions

С уважением, Александр.

Поправлено в актуальной версии. Если нет добавь деталей.

Спасибо, всё работает!