diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-04 08:01:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 08:01:10 (GMT) |
commit | 3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b (patch) | |
tree | 78737e7113e2b0a6fd07f20e7a7b751338293615 /Lib/_osx_support.py | |
parent | f8775e4f72240faba3947eea8efdd83ee56ae1fd (diff) | |
download | cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.zip cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.tar.gz cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.tar.bz2 |
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)
* Fix test_float
* Fix _osx_support
* Fix test_fstring
* Fix test_gc
* Fix test_gzip
* Fix test_hashlib
* Fix unrelated whitespace issue
Co-authored-by: Ned Deily <nad@python.org>
Diffstat (limited to 'Lib/_osx_support.py')
-rw-r--r-- | Lib/_osx_support.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py index 37975fe..72f4819 100644 --- a/Lib/_osx_support.py +++ b/Lib/_osx_support.py @@ -96,7 +96,7 @@ def _get_system_version(): if _SYSTEM_VERSION is None: _SYSTEM_VERSION = '' try: - f = open('/System/Library/CoreServices/SystemVersion.plist') + f = open('/System/Library/CoreServices/SystemVersion.plist', encoding="utf-8") except OSError: # We're on a plain darwin box, fall back to the default # behaviour. @@ -156,9 +156,9 @@ def _default_sysroot(cc): if _cache_default_sysroot is not None: return _cache_default_sysroot - + contents = _read_output('%s -c -E -v - </dev/null' % (cc,), True) - in_incdirs = False + in_incdirs = False for line in contents.splitlines(): if line.startswith("#include <...>"): in_incdirs = True |