Lines Matching full:path
16 if not all(map(os.path.isabs, tzpaths)):
36 new_tzpath = tuple(filter(os.path.isabs, raw_tzpath))
54 invalid_paths = (path for path in tzpaths if not os.path.isabs(path))
66 """Retrieve the path to a TZif file from a key."""
69 filepath = os.path.join(search_path, key)
70 if os.path.isfile(filepath):
76 _TEST_PATH = os.path.normpath(os.path.join("_", "_"))[:-1]
79 def _validate_tzfile_path(path, _base=_TEST_PATH):
80 if os.path.isabs(path):
82 f"ZoneInfo keys may not be absolute paths, got: {path}"
85 # We only care about the kinds of path normalizations that would change the
89 new_path = os.path.normpath(path)
90 if len(new_path) != len(path):
92 f"ZoneInfo keys must be normalized relative paths, got: {path}"
95 resolved = os.path.normpath(os.path.join(_base, new_path))
98 f"ZoneInfo keys must refer to subdirectories of TZPATH, got: {path}"
111 determine if a given file on the time zone search path is to open it
137 if not os.path.exists(tz_root):
150 fpath = os.path.join(root, file)
152 key = os.path.relpath(fpath, start=tz_root)
171 """Warning raised if an invalid path is specified in PYTHONTZPATH."""