2bi
S SK r S SKrS SKrS SKrS SKrS SKJr S SKJr S SK J
r
JrJrJ
r
JrJr S SKJrJrJr S SKJr S SKJr S\S \4S
jr\S\S\
S \\SS4 4S j5 r\" S
\" S5 \" S5 S9r\" \R: 5 rS\S \4S jrS\S \4S jrS\S\S \
\ 4S jr S\S \\!\"4 4S jr#S\S \4S jr$S\S \\!\"4 4S jr%S\S \4S jr&g) N)contextmanager)NamedTemporaryFile)AnyBinaryIO GeneratorListUnioncast)retrystop_after_delay
wait_fixed)get_path_uid)format_sizepathreturnc [ R S:X d [ [ S5 ( d g[ R R U 5 ( d eS nX:w a [ R R
U 5 ( aO [ R " 5 S:X a [ U 5 nUS:H $ [ R " U [ R 5 $ U [ R R U 5 pX:w a M g! [ a gf = f)Nwin32geteuidTr F)
sysplatformhasattrosr isabslexistsr r OSErroraccessW_OKdirname)r previouspath_uids ڐ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/utils/filesystem.pycheck_path_ownerr" s ||wgb)&<&<
77==H
77??4 zz|q !+D1H 1}$yyrww//!277??4#8d
! !s C3 3
D ?D kwargsc + # [ SS[ R R U 5 [ R R U 5 SS.UD6 n[ [ U5 n Uv UR 5 [ R " UR 5 5 SSS5 g! UR 5 [ R " UR 5 5 f = f! , ( d f g= f7f)a Return a file-like object pointing to a tmp file next to path.
The file is created securely and is ensured to be written to disk
after the context reaches its end.
kwargs will be passed to tempfile.NamedTemporaryFile to control
the way the temporary file will be opened.
Fz.tmp)deletedirprefixsuffixN )
r r r r basenamer
r flushfsyncfileno)r r# fresults r! adjacent_tmp_filer0 + s
GGOOD!ww%
h" &LLLNHHV]]_%
LLNHHV]]_%
s6 AC+
CB!#4C C+!6CC
C($C+T g ?)reraisestopwaitc l [ R R U 5 ( dM [ R R U 5 nX:X a O(Un [ R R U 5 ( d MM [ R S:X a% [ R
" U [ R 5 $ [ U 5 $ )z_Check if a directory is writable.
Uses os.access() on POSIX, tries creating files on Windows.
posix)r r isdirr namer r _test_writable_dir_win)r parents r! test_writable_dirr; L sy ggmmD!!&> ggmmD!!
ww'yyrww''!$'' c ^ SnSm[ S5 H nUSR U4S j[ S5 5 5 - n[ R R X5 n [ R " U[ R
[ R - [ R - 5 n[ R " U5 [ R " U5 g [ S 5 e! [ a M [ a gf = f)
N(accesstest_deleteme_fishfingers_custard_$abcdefghijklmnopqrstuvwxyz0123456789
c 3 P ># U H n[ R " T5 v M g 7fN)randomchoice).0_alphabets r!