+
    h!                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^RIHt R tR t	 ! R R4      t
R t]! RR	R
RRRRRRRRRRRRRRR4      R 4       tR# )    N)Metadatac                 P    R P                  R V P                  R 4       4       4      # )
c              3      "   T FF  pVP                  4       '       g   K  VP                  4       P                  R 4      '       d   KB  Vx  KH  	  R# 5i)#N)strip
startswith).0lines   & F/usr/lib/python3/dist-packages/pkg_resources/tests/test_working_set.py	<genexpr>!strip_comments.<locals>.<genexpr>   s;      !D::< 	 $

 7 7 < 	!s   A"A
A)joinsplit)ss   &r   strip_commentsr      s(    99 GGDM      c              #    "   V P                  4       p \        P                  ! RV 4       F  pV'       g   K  VP                  R^4      p^\        V4      u;8:  d	   ^8:  g   Q h Q hVP	                  ^ 4      P                  R^4      w  r4V'       d4   \        P                  ! VP	                  ^ 4      4      p\        RV34      pMRp\        P                  ! W4VR7      pVx  K  	  R# 5i)aa  
Parse a series of distribution specs of the form:
{project_name}-{version}
   [optional, indented requirements specification]

Example:

    foo-0.2
    bar-1.0
      foo>=3.0
      [feature]
      baz

yield 2 distributions:
    - project_name=foo, version=0.2
    - project_name=bar, version=1.0,
      requires=['foo>=3.0', 'baz; extra=="feature"']
z\n(?=[^\s])r   -zrequires.txtN)project_nameversionmetadata)r   rer   lenpoprsplittextwrapdedentr   pkg_resourcesDistribution)r   specfieldsnamer   requiresr   dists   &       r   parse_distributionsr&      s     & 	
	A+D!$CK$1$$$$$

1,,S!4vzz!}5H :;HH))
 
 ,s   C&C(c                   8   a  ] tR t^:t o V 3R lR ltR tRtV tR# )FakeInstallerc                   < V ^8  d   QhRR/# )   returnN )format__classdict__s   "r   __annotate__FakeInstaller.__annotate__;   s     4 4T 4r   c                    Wn         R # N_installable_dists)selfinstallable_distss   &&r   __init__FakeInstaller.__init__;   s    "3r   c                ^   a \        \        \        V3R  lV P                  4      4      R4      # )c                    < V S9   # r2   r,   )r%   reqs   &r   <lambda>(FakeInstaller.__call__.<locals>.<lambda>@   s	    TS[r   N)nextiterfilterr4   )r5   r;   s   &fr   __call__FakeInstaller.__call__>   s(    0$2I2IJKT
 	
r   r3   N)__name__
__module____qualname____firstlineno__r7   rA   __static_attributes____classdictcell__)r.   s   @r   r(   r(   :   s     4 4
 
r   r(   c                     . p. pV  EFU  pR  \         P                  ! V4      P                  4       P                  R^4       4       w  pppppp	\	        \        V4      4      p\	        \        V4      4      p\	        \        P                  ! V4      4      pVRV3VR,           RV	33 F  w  rpVP                  V
4       \        VP                  4       4      p\        P                  ! RV4      '       d*   \        \        V4      p\        V\        4      '       g   Q hM\	        \        V4      4      pVP                  \         P"                  ! VVVVV4      4       K  	  EKX  	  \         P$                  P'                  RVVR7      # )c              3   T   "   T F  p\        VP                  4       4      x  K   	  R # 5ir2   )r   lstrip)r
   r   s   & r   r   7parametrize_test_working_set_resolve.<locals>.<genexpr>O   s%      
D 188:&&Ds   &(z

F_replace_conflictingTz\w+$)ids)installed_distsr6   requirementsreplace_conflictingresolved_dists_or_exception)r   r   rK   r   listr&   r   parse_requirementsappendr   r   r   matchgetattr
issubclass	Exceptionpytestparammarkparametrize)	test_listidlist	argvaluestestr#   rO   r6   rP   	expected1	expected2id_rQ   expecteds   *            r   $parametrize_test_working_set_resolverf   D   sq   FI
__T*11399&!D
	

 2?CD !45F!GHM<<\JK5)$**D)<3
.Ch MM#%hnn&67Hxx**"=(;!(I6666 3H =>#% '3
 F ;;""	
 	 # 
 
r   z
    # id
    noop

    # installed

    # installable

    # wanted

    # resolved

    # resolved [replace conflicting]
    z
    # id
    already_installed

    # installed
    foo-3.0

    # installable

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    foo-3.0

    # resolved [replace conflicting]
    foo-3.0
    z
    # id
    installable_not_installed

    # installed

    # installable
    foo-3.0
    foo-4.0

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    foo-3.0

    # resolved [replace conflicting]
    foo-3.0
    z
    # id
    not_installable

    # installed

    # installable

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    DistributionNotFound

    # resolved [replace conflicting]
    DistributionNotFound
    z
    # id
    no_matching_version

    # installed

    # installable
    foo-3.1

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    DistributionNotFound

    # resolved [replace conflicting]
    DistributionNotFound
    z
    # id
    installable_with_installed_conflict

    # installed
    foo-3.1

    # installable
    foo-3.5

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    foo-3.5
    z
    # id
    not_installable_with_installed_conflict

    # installed
    foo-3.1

    # installable

    # wanted
    foo>=2.1,!=3.1,<4

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    DistributionNotFound
    a  
    # id
    installed_with_installed_require

    # installed
    foo-3.9
    baz-0.1
        foo>=2.1,!=3.1,<4

    # installable

    # wanted
    baz

    # resolved
    foo-3.9
    baz-0.1

    # resolved [replace conflicting]
    foo-3.9
    baz-0.1
    a  
    # id
    installed_with_conflicting_installed_require

    # installed
    foo-5
    baz-0.1
        foo>=2.1,!=3.1,<4

    # installable

    # wanted
    baz

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    DistributionNotFound
    a  
    # id
    installed_with_installable_conflicting_require

    # installed
    foo-5
    baz-0.1
        foo>=2.1,!=3.1,<4

    # installable
    foo-2.9

    # wanted
    baz

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    baz-0.1
    foo-2.9
    a  
    # id
    installed_with_installable_require

    # installed
    baz-0.1
        foo>=2.1,!=3.1,<4

    # installable
    foo-3.9

    # wanted
    baz

    # resolved
    foo-3.9
    baz-0.1

    # resolved [replace conflicting]
    foo-3.9
    baz-0.1
    a  
    # id
    installable_with_installed_require

    # installed
    foo-3.9

    # installable
    baz-0.1
        foo>=2.1,!=3.1,<4

    # wanted
    baz

    # resolved
    foo-3.9
    baz-0.1

    # resolved [replace conflicting]
    foo-3.9
    baz-0.1
    a	  
    # id
    installable_with_installable_require

    # installed

    # installable
    foo-3.9
    baz-0.1
        foo>=2.1,!=3.1,<4

    # wanted
    baz

    # resolved
    foo-3.9
    baz-0.1

    # resolved [replace conflicting]
    foo-3.9
    baz-0.1
    a  
    # id
    installable_with_conflicting_installable_require

    # installed
    foo-5

    # installable
    foo-2.9
    baz-0.1
        foo>=2.1,!=3.1,<4

    # wanted
    baz

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    baz-0.1
    foo-2.9
    z
    # id
    conflicting_installables

    # installed

    # installable
    foo-2.9
    foo-5.0

    # wanted
    foo>=2.1,!=3.1,<4
    foo>=4

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    VersionConflict
    a+  
    # id
    installables_with_conflicting_requires

    # installed

    # installable
    foo-2.9
        dep==1.0
    baz-5.0
        dep==2.0
    dep-1.0
    dep-2.0

    # wanted
    foo
    baz

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    VersionConflict
    ap  
    # id
    installables_with_conflicting_nested_requires

    # installed

    # installable
    foo-2.9
        dep1
    dep1-1.0
        subdep<1.0
    baz-5.0
        dep2
    dep2-1.0
        subdep>1.0
    subdep-0.9
    subdep-1.1

    # wanted
    foo
    baz

    # resolved
    VersionConflict

    # resolved [replace conflicting]
    VersionConflict
    z
    # id
    wanted_normalized_name_installed_canonical

    # installed
    foo.bar-3.6

    # installable

    # wanted
    foo-bar==3.6

    # resolved
    foo.bar-3.6

    # resolved [replace conflicting]
    foo.bar-3.6
    c                    \         P                  ! . 4      p\        \        VP                  V 4      4       \
        P                  ! VP                  V\        V4      VR 7      p\        P                  ! V4      '       d1   \        P                  ! V4      ;_uu_ 4        V! 4        RRR4       R# \        V! 4       4      \        V4      8X  g   Q hR#   + '       g   i     R# ; i))	installerrQ   N)r   
WorkingSetrS   mapadd	functoolspartialresolver(   inspectisclassrZ   raisessorted)rO   r6   rP   rQ   rR   wsresolve_calls   &&&&&  r   test_working_set_resolveru   w   s    l 
	!	!"	%BRVV_	%&$$


 12/	L 233]]677N 87 ln%0K)LLLL 877s   CC"	)rl   ro   r   r   rZ   r   test_resourcesr   r   r&   r(   rf   ru   r,   r   r   <module>rw      s      	    $"J
 
0f &$&"$&$,(,,,,,(08y
n^M_n^Mr   