In most systems on which python runs a path has the same representation: str or bytes. This representation is an implicit assumption throughout Python - including importlib, sys.path, os.path, sys.prefix, pathlib.
A "path" in CloudABI is either a file descriptor, or a string path relative to a file descriptor. So joining to paths won't reduce to string concatenation.
For importlib._bootstrap*. I've hacked together paths as a mixture of int and (int, str) tuples. This (or something like it) needs to be formalised into a Path object, maybe one based on pathlib.Path. Then the numerous isinstance(...) calls can be removed. The complication is that importlib._bootstrap* executes before pathlib is available.
In most systems on which python runs a path has the same representation:
str
orbytes
. This representation is an implicit assumption throughout Python - includingimportlib
,sys.path
,os.path
,sys.prefix
,pathlib
.A "path" in CloudABI is either a file descriptor, or a string path relative to a file descriptor. So joining to paths won't reduce to string concatenation.
For
importlib._bootstrap*
. I've hacked together paths as a mixture ofint
and(int, str)
tuples. This (or something like it) needs to be formalised into a Path object, maybe one based onpathlib.Path
. Then the numerousisinstance(...)
calls can be removed. The complication is thatimportlib._bootstrap*
executes beforepathlib
is available.