diff options
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ from __future__ import print_function import sys import os import types +import sysconfig if False: # MYPY from typing import Any, Dict, Optional, List, Union, BinaryIO, IO, Text, Tuple # NOQA @@ -112,6 +113,10 @@ if PY3: else: builtins_module = '__builtin__' +UNICODE_SIZE = sysconfig.get_config_var('Py_UNICODE_SIZE') +if UNICODE_SIZE is None: # on Python >= 3.3 unicode has no fixed bytesize + UNICODE_SIZE = 4 + def with_metaclass(meta, *bases): # type: (Any, Any) -> Any |