diff options
author | Marcel Bargull <marcel.bargull@udo.edu> | 2018-07-12 06:58:14 -0500 |
---|---|---|
committer | Marcel Bargull <marcel.bargull@udo.edu> | 2018-07-12 06:58:14 -0500 |
commit | 37eab03d7db75e550652658bd1af1988cb0f1707 (patch) | |
tree | 4269378320d9bb965d50b943d4349174af8876d7 /compat.py | |
parent | 7c118cd53e4bc21de23c8db0c2bb58048a403f1c (diff) | |
download | ruamel.yaml-37eab03d7db75e550652658bd1af1988cb0f1707.tar.gz |
on Windows+PY2 get_config_var('Py_UNICODE_SIZE') is None
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -7,7 +7,6 @@ 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 @@ -113,9 +112,7 @@ 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 +UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2 def with_metaclass(meta, *bases): |