diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-01-07 15:54:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-07 15:54:31 (GMT) |
commit | 3460198f6ba40a839f105c381f07179aba1e8c61 (patch) | |
tree | 1b43b27d96931ebfd4c7f23758da932d42c0940e /Lib/macpath.py | |
parent | e46a8af450210ee5c7f0459ad6beddbc626ae60f (diff) | |
download | cpython-3460198f6ba40a839f105c381f07179aba1e8c61.zip cpython-3460198f6ba40a839f105c381f07179aba1e8c61.tar.gz cpython-3460198f6ba40a839f105c381f07179aba1e8c61.tar.bz2 |
bpo-31802: Fix importing native path module before importing os. (#4017)
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r-- | Lib/macpath.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py index f85a914..aacf723 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -1,5 +1,17 @@ """Pathname and path-related operations for the Macintosh.""" +# strings representing various path-related bits and pieces +# These are primarily for export; internally, they are hardcoded. +# Should be set before imports for resolving cyclic dependency. +curdir = ':' +pardir = '::' +extsep = '.' +sep = ':' +pathsep = '\n' +defpath = ':' +altsep = None +devnull = 'Dev:Null' + import os from stat import * import genericpath @@ -16,17 +28,6 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "curdir","pardir","sep","pathsep","defpath","altsep","extsep", "devnull","realpath","supports_unicode_filenames"] -# strings representing various path-related bits and pieces -# These are primarily for export; internally, they are hardcoded. -curdir = ':' -pardir = '::' -extsep = '.' -sep = ':' -pathsep = '\n' -defpath = ':' -altsep = None -devnull = 'Dev:Null' - def _get_colon(path): if isinstance(path, bytes): return b':' |