From a1953431ffd9403df431299c1ee595f10dbfaae5 Mon Sep 17 00:00:00 2001 From: Rune Tynan Date: Thu, 28 May 2020 21:57:32 -0400 Subject: [PATCH] Move oem_(decode, encode) to be 3.6+ (#4140) --- stdlib/2and3/_codecs.pyi | 5 +++-- tests/stubtest_whitelists/win32-py35.txt | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/2and3/_codecs.pyi b/stdlib/2and3/_codecs.pyi index 236b06718..d933d0917 100644 --- a/stdlib/2and3/_codecs.pyi +++ b/stdlib/2and3/_codecs.pyi @@ -70,7 +70,8 @@ if sys.platform == 'win32': def mbcs_decode(__data: _Decodable, __errors: _Errors = ..., __final: int = ...) -> Tuple[Text, int]: ... def mbcs_encode(__str: _Encodable, __errors: _Errors = ...) -> Tuple[bytes, int]: ... if sys.version_info >= (3, 0): - def oem_decode(__data: bytes, __errors: _Errors = ..., __final: int = ...) -> Tuple[Text, int]: ... def code_page_decode(__codepage: int, __data: bytes, __errors: _Errors = ..., __final: int = ...) -> Tuple[Text, int]: ... - def oem_encode(__str: Text, __errors: _Errors = ...) -> Tuple[bytes, int]: ... def code_page_encode(__code_page: int, __str: Text, __errors: _Errors = ...) -> Tuple[bytes, int]: ... + if sys.version_info >= (3, 6): + def oem_decode(__data: bytes, __errors: _Errors = ..., __final: int = ...) -> Tuple[Text, int]: ... + def oem_encode(__str: Text, __errors: _Errors = ...) -> Tuple[bytes, int]: ... diff --git a/tests/stubtest_whitelists/win32-py35.txt b/tests/stubtest_whitelists/win32-py35.txt index 2b3ad07d4..57989eb55 100644 --- a/tests/stubtest_whitelists/win32-py35.txt +++ b/tests/stubtest_whitelists/win32-py35.txt @@ -1,5 +1,3 @@ -_codecs.oem_decode -_codecs.oem_encode ntpath.splitunc os.path.splitunc os.path.splitunc