From a3ead5af4f9ed3575004c8a7ec74138c26c52dd7 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 8 Jan 2020 23:02:12 +0200 Subject: Fix: sys.version compared to string (python10), use sys.version_info --- src/decorator.py | 2 +- src/tests/documentation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/decorator.py b/src/decorator.py index d5ac595..f1eaf57 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -42,7 +42,7 @@ import collections __version__ = '4.4.1' -if sys.version >= '3': +if sys.version_info >= (3,): from inspect import getfullargspec def get_init(cls): diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 60a37a2..2256fea 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -1421,7 +1421,7 @@ Another attribute copied from the original function is ``__qualname__``, the qualified name. This attribute was introduced in Python 3.3. """ -if sys.version < '3': +if sys.version_info < (3,): function_annotations = '' today = time.strftime('%Y-%m-%d') @@ -1654,7 +1654,7 @@ def a_test_for_pylons(): """ -if sys.version >= '3': # tests for signatures specific to Python 3 +if sys.version_info >= (3,): # tests for signatures specific to Python 3 def test_kwonlydefaults(): """ -- cgit v1.2.1