From 17eee2fc16bdf56616f093c508df140d12e9bf95 Mon Sep 17 00:00:00 2001 From: barneygale Date: Sat, 9 Sep 2023 15:37:49 +0100 Subject: [PATCH] MAX_SYMLINKS --> _MAX_SYMLINKS --- Lib/pathlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 03673d5f541f34..1a2eb1ec92e260 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -41,7 +41,7 @@ # # Maximum number of symlinks to follow in _PathBase.resolve() -MAX_SYMLINKS = 40 +_MAX_SYMLINKS = 40 # Reference for Windows paths can be found at # https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file . @@ -1293,7 +1293,7 @@ def resolve(self, strict=False): break else: link_count += 1 - if link_count >= MAX_SYMLINKS: + if link_count >= _MAX_SYMLINKS: raise OSError(ELOOP, "Too many symbolic links in path", path) elif link_target.root or link_target.drive: link_target = link.parent / link_target