From cabd6658faee1c13fb2204b16a3cd16b0b036654 Mon Sep 17 00:00:00 2001 From: joamag Date: Wed, 18 Dec 2019 16:06:53 +0000 Subject: [PATCH] Added new legacy code --- src/netius/base/legacy.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/netius/base/legacy.py b/src/netius/base/legacy.py index 8ad7d8d0..88103f39 100644 --- a/src/netius/base/legacy.py +++ b/src/netius/base/legacy.py @@ -103,12 +103,24 @@ def ctx_absolute(): interpreter is at least Python 3 compliant, this is used to take some of the conversion decision for runtime """ -PYTHON_ASYNC = sys.version_info[0] >= 3 and sys.version_info[1] >= 5 +PYTHON_35 = sys.version_info[0] >= 3 and sys.version_info[1] >= 5 +""" Global variable that defines if the current Python +interpreter is at least Python 3.5 compliant """ + +PYTHON_36 = sys.version_info[0] >= 3 and sys.version_info[1] >= 6 +""" Global variable that defines if the current Python +interpreter is at least Python 3.6 compliant """ + +PYTHON_39 = sys.version_info[0] >= 3 and sys.version_info[1] >= 9 +""" Global variable that defines if the current Python +interpreter is at least Python 3.9 compliant """ + +PYTHON_ASYNC = PYTHON_35 """ Global variable that defines if the current Python interpreter support the async/await syntax responsible for the easy to use async methods """ -PYTHON_ASYNC_GEN = sys.version_info[0] >= 3 and sys.version_info[1] >= 6 +PYTHON_ASYNC_GEN = PYTHON_36 """ Global variable that defines if the current Python interpreter support the async/await generator syntax responsible for the async generator methods """