From 25c9fdc20d4c190802b385bc01feaf42f27c7dc4 Mon Sep 17 00:00:00 2001 From: Scott Colby Date: Wed, 26 Sep 2018 23:27:33 -0700 Subject: [PATCH] Add `bytes` as legal type for `RawConfigParser.read`. (#2484) Add `bytes` as legal type for `RawConfigParser.read` in 3.7. Closes #2476. https://bugs.python.org/issue31307 --- stdlib/3/configparser.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/3/configparser.pyi b/stdlib/3/configparser.pyi index 99539b578..5560cd38e 100644 --- a/stdlib/3/configparser.pyi +++ b/stdlib/3/configparser.pyi @@ -18,7 +18,9 @@ _converter = Callable[[str], Any] _converters = Dict[str, _converter] _T = TypeVar('_T') -if sys.version_info >= (3, 6): +if sys.version_info >= (3, 7): + _Path = Union[str, bytes, PathLike[str]] +elif sys.version_info >= (3, 6): _Path = Union[str, PathLike[str]] else: _Path = str