11cb0ef41Sopenharmony_ci# -*- coding: utf-8 -*- 21cb0ef41Sopenharmony_ci""" 31cb0ef41Sopenharmony_ci markupsafe._compat 41cb0ef41Sopenharmony_ci ~~~~~~~~~~~~~~~~~~ 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci Compatibility module for different Python versions. 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci :copyright: (c) 2013 by Armin Ronacher. 91cb0ef41Sopenharmony_ci :license: BSD, see LICENSE for more details. 101cb0ef41Sopenharmony_ci""" 111cb0ef41Sopenharmony_ciimport sys 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciPY2 = sys.version_info[0] == 2 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciif not PY2: 161cb0ef41Sopenharmony_ci text_type = str 171cb0ef41Sopenharmony_ci string_types = (str,) 181cb0ef41Sopenharmony_ci unichr = chr 191cb0ef41Sopenharmony_ci int_types = (int,) 201cb0ef41Sopenharmony_cielse: 211cb0ef41Sopenharmony_ci text_type = unicode 221cb0ef41Sopenharmony_ci string_types = (str, unicode) 231cb0ef41Sopenharmony_ci unichr = unichr 241cb0ef41Sopenharmony_ci int_types = (int, long) 25