+
    Bi5&                        ^ RI t ^ RIt^ RIt^ RIHt  ! R R]4      t ! R R]4      t ! R R]4      t ! R	 R
]4      t	 ! R R]
4      t ! R R]4      t ! R R]
4      t ! R R]4      t ! R R]4      t ! R R]
4      t ! R R] P"                  R7      t ! R R] P"                  R7      t ! R R]P(                  4      t ! R R]4      t ! R  R!]4      t ! R" R#]P(                  4      t]R$8X  d   ]P4                  ! 4        R# R# )%    N)DynamicClassAttributec                       ] tR t^	tRtR# )PropertyBase N__name__
__module____qualname____firstlineno____static_attributes__r       6/usr/lib/python3.14/test/test_dynamicclassattribute.pyr   r   	       r   r   c                       ] tR t^tRtR# )PropertyGetr   Nr   r   r   r   r   r      r   r   r   c                       ] tR t^tRtR# )PropertySetr   Nr   r   r   r   r   r      r   r   r   c                       ] tR t^tRtR# )PropertyDelr   Nr   r   r   r   r   r      r   r   r   c                   ~   a  ] tR t^t o R t]R 4       t]P                  R 4       t]P                  R 4       tRt	V t
R# )	BaseClassc                    ^V n         R# )   N_spamselfs   &r   __init__BaseClass.__init__   s	    
r   c                    V P                   # )BaseClass.getterr   r   s   &r   spamBaseClass.spam        zzr   c                    Wn         R # Nr   r   values   &&r   r"   r#      s    
r   c                
    V = R # r&   r   r   s   &r   r"   r#   "   s    Jr   r   N)r   r	   r
   r   r   r   r"   setterdeleterr   __classdictcell____classdict__s   @r   r   r      sN        
[[  
\\ r   r   c                      a  ] tR t^&t o ]P
                  R,          t]P                  R 4       t]P                  R 4       t]P                  R 4       tRt
V tR# )SubClassr"   c                ,    \        V P                  4      h)SubClass.getter)r   r   r   s   &r   r"   SubClass.spam*   s     $**%%r   c                ,    \        V P                  4      hr&   )r   r   r'   s   &&r   r"   r3   /       $**%%r   c                ,    \        V P                  4      hr&   )r   r   r   s   &r   r"   r3   3   r5   r   r   N)r   r	   r
   r   r   __dict__r"   getterr*   r+   r   r,   r-   s   @r   r0   r0   &   s[     f%D	[[& & 
[[& & 
\\& &r   r0   c                   >   a  ] tR t^7t o ^tR t]! ]RR7      tRtV t	R# )PropertyDocBasec                    V P                   # r&   r   r   s   &r   	_get_spamPropertyDocBase._get_spam9   s    zzr   spam spam spam)docr   N)
r   r	   r
   r   r   r<   r   r"   r   r,   r-   s   @r   r:   r:   7   s     E 0@ADr   r:   c                   j   a  ] tR t^=t o ]P
                  R,          t]P                  R 4       tRtV t	R# )PropertyDocSubr"   c                    V P                   # )z*The decorator does not use this doc stringr   r   s   &r   r"   PropertyDocSub.spam?   r$   r   r   N)
r   r	   r
   r   r:   r7   r"   r8   r   r,   r-   s   @r   rA   rA   =   s+     ##F+D	[[ r   rA   c                   j   a  ] tR t^Dt o ]P
                  R,          t]P                  R 4       tRtV t	R# )PropertySubNewGetterr"   c                    ^# new docstringr   r   s   &r   r"   PropertySubNewGetter.spamF        r   r   N)
r   r	   r
   r   r   r7   r"   r8   r   r,   r-   s   @r   rE   rE   D   s+     f%D	[[ r   rE   c                   T   a  ] tR t^Kt o ]R 4       t]P                  R 4       tRtV tR# )PropertyNewGetterc                    ^# )zoriginal docstringr   r   s   &r   r"   PropertyNewGetter.spamL   rJ   r   c                    ^# rG   r   r   s   &r   r"   rN   P   rJ   r   r   N)	r   r	   r
   r   r   r"   r8   r   r,   r-   s   @r   rL   rL   K   s/       
[[ r   rL   c                   N   a  ] tR t^Ut o ]]P                  R 4       4       tRtV t	R# ) ClassWithAbstractVirtualPropertyc                     R # r&   r   r   r   r   color&ClassWithAbstractVirtualProperty.colorV        	r   r   N)
r   r	   r
   r   r   abcabstractmethodrS   r   r,   r-   s   @r   rQ   rQ   U   s%       r   rQ   )	metaclassc                   N   a  ] tR t^[t o ]P
                  ]R 4       4       tRtV t	R# ) ClassWithPropertyAbstractVirtualc                     R # r&   r   r   r   r   rS   &ClassWithPropertyAbstractVirtual.color\   rU   r   r   N)
r   r	   r
   r   rV   rW   r   rS   r   r,   r-   s   @r   rZ   rZ   [   s%       r   rZ   c                   ^  a  ] tR t^at o R tR t]P                  ! ]P                  P                  ^8  R4      R 4       t]P                  ! ]P                  P                  ^8  R4      R 4       tR t]P                  ! ]P                  P                  ^8  R4      R 4       tR tR	 tR
tV tR# )PropertyTestsc                   \        4       pV P                  VP                  ^4       V P                  VP                  ^4       ^
Vn        V P                  VP                  ^
4       V P                  VP                  ^
4       \	        VR4       V P                  VR4       V P                  VR4       ^Vn        V P                  VP                  ^4       V P                  VP                  ^4       R# )r   r"   r   N)r   assertEqualr"   r   delattrassertNotHasAttrr   bases   & r   !test_property_decorator_baseclass/PropertyTests.test_property_decorator_baseclassb   s    {A&Q'	B'R(fdF+dG,	B'R(r   c                    \        4       pV P                  \        \        VR 4       V P                  \        \
        VR R4       V P                  \        \        VR 4       R# )r"   N)r0   assertRaisesr   getattrr   setattrr   ra   r   subs   & r    test_property_decorator_subclass.PropertyTests.test_property_decorator_subclassq   sG    j+wV<+wVTB+wV<r   )Docstrings are omitted with -O2 and abovec                    \        4       pV P                  VP                  P                  R ,          P                  R4       R# )r"   r2   N)r0   r`   	__class__r7   __doc__rk   s   & r   $test_property_decorator_subclass_doc2PropertyTests.test_property_decorator_subclass_docx   s1     j//7??ARSr   c                    \        4       pV P                  VP                  P                  R ,          P                  R4       R# )r"   r!   N)r   r`   rq   r7   rr   rc   s   & r   %test_property_decorator_baseclass_doc3PropertyTests.test_property_decorator_baseclass_doc~   s1     {008@@BTUr   c                
   \        4       p\        4       pV P                  VP                  P                  R ,          P
                  R4       V P                  VP                  P                  R ,          P
                  R4       R# )r"   r>   N)r:   rA   r`   rq   r7   rr   )r   rd   rl   s   &  r   test_property_decorator_doc)PropertyTests.test_property_decorator_doc   s^     008@@BRS//7??AQRr   c                z   \        4       pV P                  VP                  ^4       V P                  VP                  P                  R,          P
                  R4       \        4       pV P                  VP                  ^4       V P                  VP                  P                  R,          P
                  R4       R# )r   r"   rH   N)rE   r`   r"   rq   r7   rr   rL   )r   newgettersub	newgetters   &  r   !test_property_getter_doc_override/PropertyTests.test_property_getter_doc_override   s     ,-**A.//88@HH/Z%'	+,,55f=EEWr   c                p  aa R R. ^.RR3 FK  o ! V3R lR\         4      pV P                  VP                  R,          P                  \	        S4      4       KM  	   ! R R\         4      oV P                  \        4      ;_uu_ 4         ! V3R	 lR\         4      pR
R
R
4       R
#   + '       g   i     R
# ; i)TF 1c                   H   <a  ] tR t^t o R t Z]n        ]! ]4      tRtV tR# )EPropertyTests.test_property___isabstractmethod__descriptor.<locals>.Cc                    R # r&   r   r   s   &r   fooIPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.foo       r   r   N	r   r	   r
   r   r   __isabstractmethod__r   r   r,   )r.   vals   @r   Cr      s     +.(+C0r   r   r   c                   *   a  ] tR t^t o R t]tRtV tR# )KPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolc                    \        4       hr&   )
ValueErrorr   s   &r   __bool__TPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__   s
     l"r   r   N)r   r	   r
   r   r   __len__r   r,   r-   s   @r   NotBoolr      s     #Gr   r   c                   R   <a  ] tR t^t o R t Z! 4       ]n        ]! ]4      tRtV tR# )r   c                    R # r&   r   r   s   &r   r   r      r   r   r   Nr   )r.   r   s   @r   r   r      s     +29(+C0r   N)objectassertIsr7   r   boolrh   r   )r   r   r   r   s   & @@r   ,test_property___isabstractmethod__descriptor:PropertyTests.test_property___isabstractmethod__descriptor   s    %aS"c2C1F 1
 MM!**U+@@$s)L 3	f 	 z**1F 1 +***s   B$$B5	c                   V P                  \        \        4       V P                  \        \        4        ! R  R\        4      pV P                  \        V4        ! R R\        4      pV P                  \        V4        ! R R\        4      pV P                  \        4      ;_uu_ 4        VP
                   RRR4       V P                  V! 4       P
                  R4        ! R R	\        4      pV P                  \        4      ;_uu_ 4        VP
                   RRR4       V P                  V! 4       P
                  R
4       R#   + '       g   i     L; i  + '       g   i     LF; i)c                       ] tR t^tRtR# )0PropertyTests.test_abstract_virtual.<locals>.APVr   Nr   r   r   r   APVr          r   r   c                       ] tR t^tRtR# )0PropertyTests.test_abstract_virtual.<locals>.AVPr   Nr   r   r   r   AVPr      r   r   r   c                   6   a  ] tR t^t o ]R 4       tR tRtV tR# )2PropertyTests.test_abstract_virtual.<locals>.Okay1c                    V P                   # r&   _colorr   s   &r   rS   8PropertyTests.test_abstract_virtual.<locals>.Okay1.color       {{"r   c                    R V n         R# )cyanNr   r   s   &r   r   ;PropertyTests.test_abstract_virtual.<locals>.Okay1.__init__   s	    $r   r   N	r   r	   r
   r   r   rS   r   r   r,   r-   s   @r   Okay1r      s!     "# ##% %r   r   Nr   c                   6   a  ] tR t^t o ]R 4       tR tRtV tR# )2PropertyTests.test_abstract_virtual.<locals>.Okay2c                    V P                   # r&   r   r   s   &r   rS   8PropertyTests.test_abstract_virtual.<locals>.Okay2.color   r   r   c                    R V n         R# )magentaNr   r   s   &r   r   ;PropertyTests.test_abstract_virtual.<locals>.Okay2.__init__   s	    'r   r   Nr   r-   s   @r   Okay2r      s!     "# ##( (r   r   r   )rh   	TypeErrorrQ   rZ   AttributeErrorrS   r`   )r   r   r   r   r   s   &    r   test_abstract_virtual#PropertyTests.test_abstract_virtual   s    )%EF)%EF	2 	)S)	2 	)S)	%4 	% ~..KK //	(4 	( ~..KK /	2 /. /.s   +EEE	E(	r   N)r   r	   r
   r   re   rm   unittestskipIfsysflagsoptimizers   rv   ry   r~   r   r   r   r,   r-   s   @r   r^   r^   a   s     )= __SYY''1,@BTBT __SYY''1,@BVBVS __SYY''1,@BXBX1,3 3r   r^   c                       ] tR t^tRtRtR# )PropertySubz+This is a subclass of DynamicClassAttributer   N)r   r	   r
   r   rr   r   r   r   r   r   r      s    5r   r   c                       ] tR t^tRtRtRtR# )PropertySubSlotszBThis is a subclass of DynamicClassAttribute that defines __slots__r   N)r   r	   r
   r   rr   	__slots__r   r   r   r   r   r      s
    LIr   r   c                     a  ] tR t^t o ]P
                  ! ]! ]R4      R4      R 4       t]P
                  ! ]	P                  P                  ^8  R4      R 4       t]P
                  ! ]	P                  P                  ^8  R4      R 4       t]P
                  ! ]	P                  P                  ^8  R4      R 4       tRtV tR	# )
PropertySubclassTestsrr   z9__doc__ is already present, __slots__ will have no effectc                \      ! R  R\         4      p\        R4      h  \         d     R# i ; i)c                   V   a  ] tR t^t o ]R 4       t]! R]P                  4       RtV t	R# )FPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Fooc                    ^# )z5Trying to copy this docstring will raise an exceptionr   r   s   &r   r"   KPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spam   s     r   
r   N)
r   r	   r
   r   r   r"   printrr   r   r,   r-   s   @r   Foor      s*     ! " d4<<((r   r   zAttributeError not raisedN)r   	Exceptionr   r   r   s   & r   #test_slots_docstring_copy_exception9PropertySubclassTests.test_slots_docstring_copy_exception   s5    
	9)f ) 788  		s    ++ro   c                ~     ! R  R\         4      pV P                  VP                  R,          P                  R4       R# )c                   0   a  ] tR t^t o ]R 4       tRtV tR# )6PropertySubclassTests.test_docstring_copy.<locals>.Fooc                    ^# .spam wrapped in DynamicClassAttribute subclassr   r   s   &r   r"   ;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spam        r   r   Nr   r	   r
   r   r   r"   r   r,   r-   s   @r   r   r            r   r   r"   r   Nr   r`   r7   rr   r   s   & r   test_docstring_copy)PropertySubclassTests.test_docstring_copy   s3    	& 	
 	LL ((<	>r   c                  a  ! R  R\         4      oS! 4       pV P                  VP                  ^4       ^Vn        V P                  VP                  ^4       V P                  SP                  R,          P                  R4        ! V3R lRS4      pV! 4       pV P                  VP                  ^4       ^Vn        V P                  VP                  R4       V P                  VP                  R,          P                  R4       R# )c                   Z   a  ] tR t^t o R t]R 4       t]P                  R 4       tRtV t	R# )OPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Fooc                    ^V n         R# )   Nr   r   s   &r   r   XPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__   s    Q
r   c                    V P                   # r   r   r   s   &r   r"   TPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spam   s     zz!r   c                    Wn         R# )zthis docstring is ignoredNr   r'   s   &&r   r"   r      s	     #
r   r   N)
r   r	   r
   r   r   r   r"   r*   r   r,   r-   s   @r   r   r      s2     ." " [[# #r   r   r"   r   c                   n   <a  ] tR tRt o  ZP                  R,          t]P                  R 4       tRtV tR# )RPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub   r"   c                    RV n         R# )zanother ignored docstringeggsNr   r'   s   &&r   r"   WPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spam  s     $
r   r   N)	r   r	   r
   r   r7   r"   r*   r   r,   )r.   r   s   @r   FooSubr      s)     <<'D[[$ $r   r   r   N)r   r`   r"   r7   rr   )r   r   r   foosubr   s   &   @r   ,test_property_setter_copies_getter_docstringBPropertySubclassTests.test_property_setter_copies_getter_docstring   s    		#& 		# e1%1%LL ((<	>	$S 	$ a(f-OOF#++<	>r   c                  a  ! R  R\         4      pV P                  VP                  R,          P                  R4        ! R R\         4      o ! V3R lRS4      pV P                  VP                  R,          P                  R4       R# )	c                   T   a  ] tR tRt o ]R 4       t]P                  R 4       tRtV tR# )IPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Fooi  c                    ^# za docstringr   r   s   &r   r"   NPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spam  r   r   c                    ^# a new docstringr   r   s   &r   r"   r     r   r   r   N)	r   r	   r
   r   r   r"   r8   r   r,   r-   s   @r   r   r     s/       [[ r   r   r"   r   c                   0   a  ] tR tRt o ]R 4       tRtV tR# )MPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasei  c                    ^# r   r   r   s   &r   r"   RPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spam  r   r   r   Nr   r-   s   @r   FooBaser     r   r   r  c                   n   <a  ] tR tRt o  ZP                  R,          t]P                  R 4       tRtV tR# )JPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2i!  r"   c                    ^# r   r   r   s   &r   r"   OPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spam#  r   r   r   N)	r   r	   r
   r   r7   r"   r8   r   r,   )r.   r  s   @r   Foo2r  !  s+     ##F+D[[ r   r  Nr   )r   r   r  r  s   &  @r   &test_property_new_getter_new_docstring<PropertySubclassTests.test_property_new_getter_new_docstring  sk    	& 	 	f-557HI	f 	
	7 	 	f-557HIr   r   N)r   r	   r
   r   r   r   hasattrr   r   r   r   r   r   r   r  r   r,   r-   s   @r   r   r      s     __W-y9GI9I9 __SYY''1,@B>B> __SYY''1,@B>B>@ __SYY''1,@BJBJr   r   __main__)rV   r   r   typesr   r   r   r   r   r   r   r   r0   r:   rA   rE   rL   ABCMetarQ   rZ   TestCaser^   r   r   r   r   mainr   r   r   <module>r     s    
  '	9 		, 		, 		, 	 "&y &"Bf B_ 9    c3H%% c3N6' 6, XJH-- XJx zMMO r   