+
    ¾¾jÅ(  ã                   ó0  € R t ^ RIt^ RIt ^ RIHt ^ RIHtHtH	t	H
t
 ^ RI	H	t ^ RIt^ RIHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHt R tR	 tR
 t R t!R t"R t#R t$R t%R t&R R lt'R t(R t)R t*R t+R t,R t-R t.R t/]P`                  Pc                  R1]]! R^^^
^4      ]! R^^^
^
4      3]]! R^^4      ]! R^
^4      3]]
! ^^^4      ]
! ^^
^4      3]]! R^^^
^4      ]
! ^^^4      3]! R^^^
^4      ]
! ^^
^4      33]]! R^^^
^4      ]
! ^^^4      3]! R^^^
^4      ]
! ^^^4      33]]! R^^^
^4      ]! R^^^
^4      3]! R^^^
^4      ]! R^^^
^4      33]]	! ^
^
^
4      ]	! ^
^
^4      3.4      ]P`                  Pc                  RRR.4      ]P`                  Pc                  R^ ^.4      ]P`                  Pc                  R ^ ^.4      ]P`                  Pc                  R!R" ]2.4      R# 4       4       4       4       4       t3R$ t4]! . 4      ]! ]! R^^^
^4      .4      ]! ]! R^^^
^4      ]! R^^4      .4      .t5]P`                  Pc                  R%]54      ]P`                  Pc                  R&]54      R' 4       4       t6]P`                  Pc                  R(^^.4      R) 4       t7]P`                  Pc                  R2/ / R*3R+R,// R-3R+R,/R+R,/R*3R+R,/R+R,./R*3R.R,/R+R,/R*3R.R,R/^/R+R,/R-3R/^/R+R,/R-3.4      R0 4       t8R#   ] d     ! R R]4      t ELi ; i)3z/Test the equality and inequality of components.N)ÚUnknownTimeZoneErrorc                   ó   € ] tR t^
tRtR# )r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú\/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/tests/test_equality.pyr   r   
   s   † Ûr
   r   )ÚdateÚdatetimeÚtimeÚ	timedelta)r   )ÚCalendarÚ	ComponentÚEventÚvBinaryÚvBooleanÚ	vCategoryÚvDateÚ	vDatetimeÚ	vDDDListsÚ	vDDDTypesÚ	vDurationÚvGeoÚvPeriodÚvRecurÚvTextÚvTimec                ó&   € W8X  g   Q hW8X  g   Q hR# )zMake sure both values are equalNr   ©Úactual_valueÚexpected_values   &&r   Úassert_equalr$   '   ó   € àÔ)Ð)Ð)ØÔ)Ð)Ò)r
   c                ó&   € W8w  g   Q hW8w  g   Q hR# )z#Make sure both values are not equalNr   r!   s   &&r   Úassert_not_equalr'   -   r%   r
   c                ón   € V P                   P                  V P                  4       4      p\        W 4       R# )z]Ensure that a calendar equals the same calendar.

source -> calendar -> ics -> same calendar
N)Ú	__class__Ú	from_icalÚto_icalr$   ©Úsource_fileÚtzpÚcopy_of_calendars   && r   Ú/test_parsed_calendars_are_equal_if_parsed_againr0   3   s-   € ð
 #×,Ñ,×6Ñ6°{×7JÑ7JÓ7LÓMÐÜÐ!Ö/r
   c                ó²   € V P                   R8X  d   \        P                  ! R4       \        P                  ! V P                  4       4      p\        W 4       R# )z^Ensure that a calendar equals the same calendar.

source -> calendar -> jcal -> same calendar
zissue_464_invalid_rdate.icszDInvalid RDATE falls back to vBroken, which can't round-trip to jCal.N)r-   ÚpytestÚskipr   Ú	from_jcalÚto_jcalr$   r,   s   && r   Ú4test_parsed_calendars_are_equal_if_parsed_again_jcalr6   <   sG   € ð
 ×ÑÐ"?Ô?Ü�ŠØRô	
ô !×*Ò*¨;×+>Ñ+>Ó+@ÓAÐÜÐ!Ö/r
   c                ó°   € V P                   P                  V P                  4      pV P                   P                  V P                  4      p\        W#4       R# )zWEnsure that a calendar equals the same calendar.

ics -> calendar
ics -> same calendar
N)r)   r*   Úraw_icsr$   )Úics_filer.   Úcal1Úcal2s   &&  r   Ú3test_parsed_calendars_are_equal_if_from_same_sourcer<   I   sD   € ð ×Ñ×'Ñ'¨×(8Ñ(8Ó9€DØ×Ñ×'Ñ'¨×(8Ñ(8Ó9€DÜ�Ör
   c                óœ   € \         P                  ! V P                  4      p\         P                  ! V P                  4      p\        W#4       R# )zYEnsure that a calendar equals the same calendar.

jcal -> calendar
jcal -> same calendar
N)r   r4   Úraw_jcalr$   )Ú	jcal_filer.   r:   r;   s   &&  r   Ú8test_parsed_calendars_are_equal_if_from_same_source_jcalr@   T   s8   € ô ×Ò˜y×1Ñ1Ó2€DÜ×Ò˜y×1Ñ1Ó2€DÜ�Ör
   c                óÚ   € V P                  4       pV P                  Vn        V P                  4       pV P                  R,          Vn        \        W#4       \        W 4       \        W04       R# )zEnsure that copies are equal.:NNNN)ÚcopyÚsubcomponentsr$   )r-   r.   Úcopy1Úcopy2s   &&  r   Útest_copies_are_equalrF   _   sW   € à×ÑÓ€EØ%×3Ñ3€EÔØ×ÑÓ€EØ%×3Ñ3°AÕ6€EÔÜ�ÔÜ�Ô$Ü�Ö$r
   c            
     óÂ   € \        4       p \        4       p\        P                  ! \        R^^^^^ 4      R7      p\        4       pW#.V n        W".Vn        \        W4       R# )zYEnsure inequality of calendars when subcomponents are strict subset, regardless of order.éå  ©ÚstartN)r   r   Únewr   rC   r'   )Ú	calendar1Ú	calendar2Úevent1Úevent2s       r   Útest_calendar_equality_orderrP   j   sR   € ä“
€IÜ“
€IÜ�YŠYœX d¨A¨q°"°b¸!Ó<Ô=€FÜ‹W€FØ%Ð.€IÔØ%Ð.€IÔÜ�YÖ*r
   c            
     óÂ   € \        4       p \        4       p\        P                  ! \        R^^^^^ 4      R7      p\        4       pW#.V n        W".Vn        \        W4       R# )zZEnsure inequality of components when subcomponents are strict subset, regardless of order.rH   rI   N)r   r   rK   r   rC   r'   )Ú
component1Ú
component2rN   rO   s       r   Útest_component_equality_orderrT   u   sR   € ä“€JÜ“€JÜ�YŠYœX d¨A¨q°"°b¸!Ó<Ô=€FÜ‹W€FØ &Ð/€JÔØ &Ð/€JÔÜ�ZÖ,r
   c                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚdepthÚreturn)Úintr   )Úformats   "r   Ú__annotate__r[   €   s   € ÷ ñ œSð ¤Uñ r
   c                óz   € \        4       ;r\        V 4       F   p\        4       pVP                  V4       TpK"  	  V# )z2Build a component nested depth subcomponents deep.)r   ÚrangeÚadd_component)rW   ÚrootÚnodeÚ_Úchilds   &    r   Ú_nested_componentrc   €   s;   € ä“'Ð€DÜ�5Ž\ˆÜ“ˆØ×Ñ˜5Ô!ØŠñ ð €Kr
   c                 óþ  € \        ^^4       Fì  p ^
V ,          p\        4       p\        \        V4      \        V4      4       \        4       pW2,
          pW@8  g   Q RV: RV RV  24       h\        V4      p\        V4      pTpVP                  '       d   VP                  ^ ,          pK'  VP                  RR4       \        4       p\        WV4       \        4       p	W˜,
          pW@8  d   KÝ  Q RV: RV RV  24       h	  R# )aÌ  Regression test for GHSA-cv84-9p8j-fj68.

Comparing deeply nested components used to recurse and re-compare both
directions at every level, which is exponential in the nesting depth: a
depth-30 structure took minutes. The fix walks an explicit stack and
compares each pair of nested components exactly once, which is linear.

We try at a few depths and fail when the first one takes too long.
We could try just one large depth, but if there really is a regression,
the tests could take ten or a hundred times as long.
At depth 20 the comparison already takes 2.85 seconds on my fast laptop
when using the original implementation.
We give each depth more time.  The main thing is that this should not be
exponential.
zequal nested depth=z takes too long: z > ÚsummaryÚ	differentzunequal nested depth=N)r]   Ú	time_timer$   rc   rC   Úaddr'   )
ÚsecondsrW   Út1Út2ÚtotalÚleftÚrightÚdeepestÚt3Út4s
             r   Ú'test_deeply_nested_equality_at_depth_50rr   Š   sú   € ô  ˜˜A–;ˆØ�W•ˆä‹[ˆÜÔ& uÓ-Ô/@ÀÓ/GÔHÜ‹[ˆØ•ˆØŒð 	
Ø"˜E™8Ð#4°U°G¸3¸w¸iÐHó	
ˆô
 ! Ó'ˆÜ! %Ó(ˆØˆØ×#×#Ð#Ø×+Ñ+¨AÕ.ŠGØ�‰�I˜{Ô+Ü‹[ˆÜ˜Ô%Ü‹[ˆØ•ˆØŽð 	
Ø$˜e™XÐ%6°u°g¸SÀÀ	ÐJó	
ˆó- r
   c                óš   € V P                   P                  '       g   Q hV P                   P                  4       P                  '       d   Q hR# )zGIf we copy the subcomponents, assumptions around copies will be broken.N)Ú	timezonedrC   rB   )Ú	calendarsr.   s   &&r   Ú%test_copy_does_not_copy_subcomponentsrv   µ   s>   € à×Ñ×,×,Ð,Ð,Ð,Ø×"Ñ"×'Ñ'Ó)×7×7Ð7Ð7Ð7Ñ7r
   c                ó"  € V P                   R8X  d-   VP                  4       '       d   \        P                  ! R4       \        P
                  ! \        4      ;_uu_ 4        \        \        P                  ! V 4      \        P                  ! V 4      4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        \        P                  ! V 4      V 4       RRR4       R#   + '       g   i     L]; i  + '       g   i     R# ; i)z~Ensure that deep copies are equal.

Ignore errors when a custom time zone is used.
This is still covered by the parsing test.
z+issue_722_timezone_transition_ambiguity.icszThis test fails for now.N)
r-   Úuses_zoneinfor2   r3   Ú
contextlibÚsuppressr   r$   rB   Údeepcopy)r-   r.   s   &&r   Útest_deep_copies_are_equalr|   »   s¢   € ð 	×ÑÐ#PÔPØ×Ñ×Òä�ŠÐ.Ô/Ü	×	Ò	Ô1×	2Õ	2Ü”T—]’] ;Ó/´·²¸{Ó1KÔL÷ 
3ä	×	Ò	Ô1×	2Õ	2Ü”T—]’] ;Ó/°Ô=÷ 
3Ñ	2÷ 
3×	2úç	2×	2Ð	2ús   Á 5C*Â?!C=Ã*C:	Ã=D	c                 óº   € \        \        R4      \        R4      4       \        \        R4      \        R4      4       \        \        R4      \        R4      4       R# )zCheck the equality of vGeo.N)Ú100ú12.33)z100.00z12.330)r~   z12.331)Ú10r   )r$   r   r'   r   r
   r   Ú	test_vGeor�   Ì   sC   € ä”Ð&Ó'¬Ð.BÓ)CÔDÜ”TÐ+Ó,¬dÐ3GÓ.HÔIÜ”T˜/Ó*¬DÐ1EÓ,FÖGr
   c                  ó~   € \        \        R 4      \        R 4      4       \        \        R4      \        R 4      4       R# )ÚasdÚasdfN)r$   r   r'   r   r
   r   Útest_vBinaryr…   Ó   s&   € Ü”˜“¤¨£Ô0Ü”W˜V“_¤g¨e£nÖ5r
   c                  ó>  € \        \        P                  ! R 4      \        P                  ! R 4      4       \        \        P                  ! R4      \        P                  ! R4      4       \        \        P                  ! R 4      \        P                  ! R4      4       R# )ÚTRUEÚFALSEN)r$   r   r*   r'   r   r
   r   Útest_vBooleanr‰   Ø   sb   € Ü”×#Ò# FÓ+¬X×-?Ò-?ÀÓ-GÔHÜ”×#Ò# GÓ,¬h×.@Ò.@ÀÓ.IÔJÜ”X×'Ò'¨Ó/´×1CÒ1CÀGÓ1LÖMr
   c                  óÊ   € \        \        R 4      \        R 4      4       \        \        RR.4      \        RR.4      4       \        \        RR.4      \        . RO4      4       R# )ÚHELLOÚaÚbN)rŒ   r�   Úc)r$   r   r'   r   r
   r   Útest_vCategoryr�   Þ   sJ   € Ü”˜7Ó#¤Y¨wÓ%7Ô8Ü”˜C ˜:Ó&¬	°3¸°*Ó(=Ô>Ü”Y  S˜zÓ*¬I²oÓ,FÖGr
   c                  ó~   € \        \        R 4      \        R 4      4       \        \        R4      \        R 4      4       R# )r‹   ÚHELLO1N)r$   r   r'   r   r
   r   Ú
test_vTextr’   ä   s&   € Ü”�w“¤ w£Ô0Ü”U˜8“_¤e¨G£nÖ5r
   iç  Úeqú==z!=Úcls1Úcls2Úhashc                 ó   € V # )Nr   )Úxs   &r   Ú<lambda>rš     s   € ©Ar
   c                ón  € V \         3V,          pV \         3V,          pVR8X  dZ   V! V4      V! V4      8X  g   Q hV! V! V4      4      V! V! V4      4      8X  g   Q hV! V! V4      4      V! V! V4      4      8X  g   Q hR# V! V4      V! V4      8w  g   Q hV! V! V4      4      V! V! V4      4      8w  g   Q hR# )zCheck equality and inequality.r”   N)r   )	Úv_typeÚv1Úv2r•   r–   r“   r—   rj   rk   s	   &&&&&&&  r   Útest_vDDDTypes_and_othersrŸ   é   s¯   € ð< ”)Ð	˜TÕ	"€BØ
”)Ð	˜TÕ	"€BØ	ˆT„zÙ�B‹x™4 ›8Ô#Ð#Ð#Ù‘B�r“F‹|™t¡B r£F›|Ô+Ð+Ð+Ù‘B�r“F‹|™t¡B r£F›|Ô+Ð+Ò+á�B‹x™4 ›8Ô#Ð#Ð#Ù‘B�r“F‹|™t¡B r£F›|Ô+Ð+Ò+r
   c            
      óR   € R \        \        \        ^^^4      4      4      9   g   Q hR# )r   N)Úreprr   r   r   r
   r   Útest_repr_vDDDTypesr¢     s#   € Øœ$œy¬°1°b¸!Ó)<Ó=Ó>Ô>Ð>Ò>r
   Úl1Úl2c                ód   € WJ p\         P                  ! V4      pW V8H  8X  g   Q hW V8g  8w  g   Q hR# )z*Check the equality functions of vDDDLists.N)rB   r{   )r£   r¤   Úequals   && r   Útest_vDDDListsr§     s9   € ð ˆH€EÜ	�Š�rÓ	€BØ˜2‘XÔÐÐØ˜2‘XÔÐÒr
   Úindexc                ó    € V RV R2,          pV RV R2,          p\        VP                  4       VP                  4       4       \        W#4       R# )z jcal and ical should be the sameÚrfc_7265_appendix_example_Ú_icalÚ_jcalN)r$   r5   )ru   r¨   ÚicalÚjcals   &&  r   Ú2test_rfc_7265_equivalence_of_example_from_appendixr¯   '  sJ   € ð Ð1°%°¸Ð>Õ?€DØÐ1°%°¸Ð>Õ?€DÜ�—‘“ §¡£Ô0Ü�Ör
   TÚBYDAYÚ1SUFÚbydayÚcountc                ór   € \        V 4      p\        V4      pV'       d   \        W44       R# \        W44       R# )z'Check the equality functions of vRecur.N)r   r$   r'   )r�   rž   r¦   Úrecur1Úrecur2s   &&&  r   Útest_v_recur_equalr·   0  s)   € ô �B‹Z€FÜ�B‹Z€FßÜ�VÖ$ä˜Ö(r
   )rœ   r�   rž   )r�   rž   r¦   )9Ú__doc__ry   rB   Úpytzr   ÚImportErrorÚ	Exceptionr   r   r   r   rg   r2   Ú	icalendarr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r$   r'   r0   r6   r<   r@   rF   rP   rT   rc   rr   rv   r|   r�   r…   r‰   r�   r’   ÚmarkÚparametrizer—   rŸ   r¢   ÚvDDDLists_examplesr§   r¯   r·   r   r
   r   Ú<module>rÀ      s  ðÙ 5ã Û ðÝ)÷ 5Ó 4Ý "ã ÷÷ ÷ ÷ ó ò(*ò*ò0ò
0òòò%ò+ò-õò(
òV8ò>ò"Hò6ò
NòHò6ð
 ‡�×ÑØà	‘H˜T 2 q¨"¨bÓ1±8¸DÀ"ÀaÈÈRÓ3PÐQØ	‘�T˜2˜qÓ!¡4¨¨b°"Ó#5Ð6Ø	‘I˜a  QÓ'©°2°r¸2Ó)>Ð?àÙ�d˜B  2 rÓ*©I°a¸¸QÓ,?Ð@Ù�d˜B  2 rÓ*©I°b¸"¸bÓ,AÐBð	
ð Ù�d˜B  2 qÓ)©9°Q¸¸AÓ+>Ð?Ù�d˜B  2 rÓ*©I°a¸¸QÓ,?Ð@ð	
ð Ù�d˜B  2 qÓ)©8°D¸"¸aÀÀQÓ+GÐHÙ�d˜B  2 qÓ)©8°D¸"¸aÀÀQÓ+GÐHð	
ð
 
‘�R˜˜RÓ ¡$ r¨2¨rÓ"2Ð3ð'óð0 ‡�×Ñ˜  d˜|Ó,Ø‡�×Ñ˜ ! Q Ó(Ø‡�×Ñ˜ ! Q Ó(Ø‡�×Ñ˜¡+¨tÐ!4Ó5ñ
,ó 6ó )ó )ó -ó1ð8
,ò?ñ
 ˆbƒMÙ‰x˜˜b ! R¨Ó+Ð,Ó-Ù‰x˜˜b ! R¨Ó+©T°$¸¸AÓ->Ð?Ó@ðÐ ð ‡�×Ñ˜Ð1Ó2Ø‡�×Ñ˜Ð1Ó2ñó 3ó 3ðð ‡�×Ñ˜ 1 a &Ó)ñó *ðð ‡�×ÑØà	ˆR�ˆØ
�5Ð	˜2˜uÐ%Ø
�5Ð	˜G UÐ+¨TÐ2Ø
�5Ð	˜G e WÐ-¨tÐ4Ø
�5Ð	˜G UÐ+¨TÐ2Ø
�5˜' 1Ð	%¨°Ð'7¸Ð?Ø
�1ˆ˜ Ð'¨Ð/ðóñ)óò)øði	 ô ô˜y÷ ðús   ŒK? Ë?LÌL