Revert to os.path.join() semantics for path manipulation in importlib
which is different than what imp.cache_from_source() operates on.
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 46a7029..a705bf8 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -65,17 +65,8 @@
# and choosing in _setup().
def _path_join(*args):
"""Replacement for os.path.join()."""
- if len(path_separators) == 1:
- sep = path_sep
- else:
- for x in reversed(args[0]):
- if x in path_separators:
- sep = x
- break
- else:
- sep = path_sep
- return sep.join(x[:-len(sep)] if x.endswith(sep) else x
- for x in args if x)
+ return path_sep.join(x[:-len(path_sep)] if x.endswith(path_sep) else x
+ for x in args if x)
def _path_split(path):
diff --git a/Python/importlib.h b/Python/importlib.h
index ad3894d..c6c5618 100644
--- a/Python/importlib.h
+++ b/Python/importlib.h
Binary files differ