From 40c95ca1b92ced97ba85b1a1dd5b46754f6ab0c7 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Wed, 22 Mar 2017 15:53:24 +0100 Subject: fix issue 106, Text undefined in 3.5.1 Reported by Charles Bouchard-L?gar? --- error.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'error.py') diff --git a/error.py b/error.py index c35623f..9de0b60 100644 --- a/error.py +++ b/error.py @@ -4,10 +4,14 @@ from __future__ import absolute_import import warnings -from typing import Any, Dict, Optional, List, Text # NOQA +import sys from ruamel.yaml.compat import utf8 +if sys.version_info >= (3, 5, 2): + from typing import Any, Dict, Optional, List, Text # NOQA + + __all__ = [ 'FileMark', 'StringMark', 'CommentMark', 'YAMLError', 'MarkedYAMLError', 'ReusedAnchorWarning', 'UnsafeLoaderWarning', -- cgit v1.2.1