Make os.altsep Optional on non-win32 platforms (#2918)

Keep it str on win32 to avoid breaking win32-specific code that relies
on it.
This commit is contained in:
Michael J. Sullivan
2019-04-12 23:00:19 -07:00
committed by Jelle Zijlstra
parent bd10d8aad4
commit f06f2e97bb
8 changed files with 32 additions and 8 deletions

View File

@@ -63,7 +63,10 @@ O_LARGEFILE: int # Gnu extension if in C library
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -128,7 +128,10 @@ O_LARGEFILE: int # Gnu extension if in C library
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str

View File

@@ -27,7 +27,10 @@ supports_unicode_filenames: bool
curdir: str
pardir: str
sep: str
altsep: str
if sys.platform == 'win32':
altsep: str
else:
altsep: Optional[str]
extsep: str
pathsep: str
defpath: str