Skip to content

Commit 27cb819

Browse files
committed
main() should use the flush_pth_start() helper
1 parent ab8f926 commit 27cb819

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/site.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,10 +859,10 @@ def main():
859859
# PEP 829: flush accumulated data from all .pth and .start files.
860860
# Paths are extended first, then deprecated import lines are exec'd,
861861
# and finally .start entry points are executed — ensuring sys.path is
862-
# fully populated before any startup code runs.
863-
_extend_syspath()
864-
_exec_imports()
865-
_execute_start_entrypoints()
862+
# fully populated before any startup code runs. flush_pth_start()
863+
# also clears the pending state so a later addsitedir() call does
864+
# not re-apply already-processed data.
865+
flush_pth_start()
866866
setquit()
867867
setcopyright()
868868
sethelper()

0 commit comments

Comments
 (0)