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
This commit is contained in:
Scott Colby
2018-09-26 23:27:33 -07:00
committed by Jelle Zijlstra
parent 4f396f8130
commit 25c9fdc20d

View File

@@ -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