diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-07-01 16:25:00 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-07-01 16:25:00 +0200 |
commit | c3869f9866e3507bbb6767aeb5bc02ba41a98d60 (patch) | |
tree | d901c684ffdb978a02dd83a728e609e6a07c8b97 /compat.py | |
parent | 4eed1d5eef4f20ea32ee7af1f01d02ffcc7e229c (diff) | |
download | ruamel.yaml-c3869f9866e3507bbb6767aeb5bc02ba41a98d60.tar.gz |
fix regression caused by PR 270.15.42
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 |