*j. S r SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK Jr S/rS r S r\R r S r " S S 5 r " S S\\ R( 5 r " S S\5 rSS jr " S S5 rg)z A Path-like interface for zipfiles. This codebase is shared between zipfile.Path in the stdlib and zipp in PyPI. See https://github.com/python/importlib_metadata/wiki/Development-Methodology for more detail. N ) TranslatorPathc D [ R " [ U 5 SS5 $ )z Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] r N) itertoolsislice _ancestry)paths =/opt/alt/python313/lib64/python3.13/zipfile/_path/__init__.py_parentsr s IdOQ55 c # # U R [ R 5 n U R [ R 5 ( aC U v [ R " U 5 u pU R [ R 5 ( a MB gg7f)a Given a path with elements separated by posixpath.sep, generate all elements of that path. >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] Multiple separators are treated like a single. >>> list(_ancestry('//b//d///f//')) ['//b//d///f', '//b//d', '//b'] N)rstrip posixpathsepsplit)r tails r r r , sV * ;;y}}%D ++imm $ $ __T* ++imm $ $s BB B c V [ R " [ U5 R U 5 $ )zN Return items in minuend not in subtrahend, retaining order with O(1) lookup. )r filterfalseset__contains__)minuend subtrahends r _differencer K s! Z!=!=wGGr c > ^ \ rS rSrSrU 4S jrS rU 4S jrSrU =r $ )InitializedStateS z7 Mix-in to save the initialization state for pickling. c > > Xl X l [ TU ] " U0 UD6 g N)_InitializedState__args_InitializedState__kwargssuper__init__)selfargskwargs __class__s r r# InitializedState.__init__X s $)&)r c 2 U R U R 4$ r )r r! r$ s r __getstate__InitializedState.__getstate__] s {{DMM))r c . > Uu p#[ TU ] " U0 UD6 g r )r" r# )r$ stater% r&