From 74b46ceaf9affd65da0ba0d2d56e58a85955a652 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Apr 2017 09:00:53 -0500 Subject: Revert "In msvc9_query_vcvarsall, ensure dict values are not unicode. Fixes #992." This reverts commit b50fdf497d6970002a2f7156650d7da21e2e39f5. --- setuptools/msvc.py | 5 +---- setuptools/py27compat.py | 14 -------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 3110eaff..84dcb2a7 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -27,7 +27,6 @@ from packaging.version import LegacyVersion from six.moves import filterfalse from .monkey import get_unpatched -from . import py27compat if platform.system() == 'Windows': from six.moves import winreg @@ -136,13 +135,11 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): # If error, try to set environment directly try: - env = EnvironmentInfo(arch, ver).return_env() + return EnvironmentInfo(arch, ver).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, ver, arch) raise - return py27compat.dict_values_strings(env) - def msvc14_get_vc_env(plat_spec): """ diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 0f924889..701283c8 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -26,17 +26,3 @@ linux_py2_ascii = ( rmtree_safe = str if linux_py2_ascii else lambda x: x """Workaround for http://bugs.python.org/issue24672""" - - -def dict_values_strings(dict_): - """ - Given a dict, make sure the text values are str. - """ - if six.PY3: - return dict_ - - # When dropping Python 2.6 support, use a dict constructor - return dict( - (key, str(value)) - for key, value in dict_.iteritems() - ) -- cgit v1.2.1