+
    ŸBi^  ã                  ó.  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
. ROt]P                  ! ]4      P                  t]P                   ! RR7      R R l4       tR R ltR R	 ltR
 R ltR R ltRR R llt]R8X  d
   ]! 4        R# R# )aÜ  
Script to automatically generate a JSON file containing time zone information.

This is done to allow "pinning" a small subset of the tzdata in the tests,
since we are testing properties of a file that may be subject to change. For
example, the behavior in the far future of any given zone is likely to change,
but "does this give the right answer for this file in 2040" is still an
important property to test.

This must be run from a computer with zoneinfo data installed.
)ÚannotationsN)Úmaxsizec               ó   € V ^8„  d   QhRR/# )é   Úreturnzpathlib.Path© )Úformats   "Ú?/usr/lib/python3.14/test/test_zoneinfo/data/update_test_data.pyÚ__annotate__r
   *   s   € ÷ 5ñ 5˜<ñ 5ó    c                 óº   € Rp \        \        P                  \        P                  4       F#  pW,          P                  4       '       g   K!  Vu # 	  \        R4      h)zEGet the first zoneinfo directory on TZPATH containing the "UTC" zone.ÚUTCzCannot find time zone data.)ÚmapÚpathlibÚPathÚzoneinfoÚTZPATHÚexistsÚOSError)ÚkeyÚpaths     r	   Úget_zoneinfo_pathr   )   sF   € ð €CÜ”G—L‘L¤(§/¡/Ö2ˆØJ×Ñ× Ô ØŠKñ 3ô Ð3Ó4Ð4r   c               ó   € V ^8„  d   QhRR/# )r   r   ztyping.Dict[str, str]r   )r   s   "r	   r
   r
   4   s   € ÷  ñ  Ð4ñ  r   c                 óê  € \        4       p V R ,          pVP                  4       '       g   \        R4      h\        VR4      ;_uu_ 4       p\	        V4      pRRR4       XP                  4       P                  R^4      w  rEVR,          P                  4       '       d.   \        V4      ^8  g   VR,          P                  4       '       g   \        R	RV 2,           4      hRV/#   + '       g   i     L•; i)
z	tzdata.ziz*Time zone data does not include tzdata.zi.ÚrNÚ :é    é   N:r   NNzfound: ÚversionzJVersion string should be YYYYx, where YYYY is the year and x is a letter; )r   r   r   ÚopenÚnextÚstripÚrsplitÚisdigitÚlenÚisalphaÚ
ValueError)r   Ú	tzdata_ziÚfÚversion_lineÚ_r   s         r	   Úget_zoneinfo_metadatar+   4   sÖ   € ÜÓ€Dà{Õ"€IØ×Ñ×ÒäÐBÓCÐCä	ˆi˜×	Ô	 Ü˜A“wˆ÷ 
ð ×#Ñ#Ó%×,Ñ,¨S°!Ó4J€Að CL× Ñ ×"Ò"Üˆw‹<˜!ÔØr{×"Ñ"×$Ò$äð;à˜yÐ!õ"ó
ð 	
ð wÐÐ÷! 
×	ús   Á	C"Ã"C2	c               ó    € V ^8„  d   QhRRRR/# )r   r   Ústrr   Úbytesr   )r   s   "r	   r
   r
   O   s   € ÷ ñ cð ˜eñ r   c                ó¨   € \        4       p\        W,          R 4      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)ÚrbN)r   r   Úread)r   r   r(   s   &  r	   Úget_zoneinfor2   O   s3   € ÜÓ€Dä	ˆdj˜$×	Ô	 1Øv‰v‹x÷ 
 ×	×	Ó	ús   ¥A Á A	c               ó    € V ^8„  d   QhRRRR/# )r   Údatar.   r   ztyping.List[str]r   )r   s   "r	   r
   r
   V   s   € ÷ ñ ˜Eð Ð&6ñ r   c                ó°   € \         P                  ! V 4      p\        P                  ! V4      pVP	                  R 4      p\
        P                  ! V^FR7      pV# )zutf-8)Úwidth)ÚlzmaÚcompressÚbase64Ú	b85encodeÚdecodeÚtextwrapÚwrap)r4   Úcompressed_zoneÚrawÚraw_data_strÚdata_strs   &    r	   Úencode_compressedrB   V   sC   € Ü—m’m DÓ)€OÜ
×
Ò
˜?Ó
+€Cà—:‘:˜gÓ&€Lä}Š}˜\°Ô4€HØ€Or   c               ó   € V ^8„  d   QhRR/# )r   r   z"typing.Dict[str, typing.List[str]]r   )r   s   "r	   r
   r
   `   s   € ÷ ñ Ð@ñ r   c            	     ó^   € \          U u/ uF  q \        \        V 4      4      bK  	  pp V# u up i )N)ÚKEYSrB   r2   )r   Úoutputs     r	   Úload_compressed_keysrG   `   s/   € ÝCGÓHÁ4¸CÔ$¤\°#Ó%6Ó7Ò7Á4€FÐHà€Mùò Is   ‰*c               ó    € V ^8„  d   QhRRRR/# )r   Úfnamer-   r   ÚNoner   )r   s   "r	   r
   r
   f   s   € ÷ ,ñ ,˜Cð ,¸4ñ ,r   c                ó(  € \         P                  R R R7       \        ^R R7      p\        4       p\	        4       pRVRV/p\        \         V ,          R4      ;_uu_ 4       p\        P                  ! WE3/ VB  RRR4       R#   + '       g   i     R# ; i)T)Úexist_okÚparents)ÚindentÚ	sort_keysÚmetadatar4   ÚwN)ÚTEST_DATA_LOCÚmkdirÚdictrG   r+   r   ÚjsonÚdump)rI   Újson_kwargsÚcompressed_keysrP   rF   r(   s   &     r	   Úupdate_test_datarY   f   s   € Ü×Ñ ¨tÐÔ4ô 15Ø˜Dô1€Kô +Ó,€OÜ$Ó&€HàHØð€Fô
 
Œm˜eÕ# S×	)Ô	)¨QÜ	Š	&Ñ+˜{Ò+÷ 
*×	)×	)Ò	)ús   ÁB Â B	Ú__main__)zAfrica/AbidjanzAfrica/CasablancazAmerica/Los_AngeleszAmerica/Santiagoz
Asia/TokyozAustralia/SydneyzEurope/DublinzEurope/LisbonzEurope/LondonzPacific/Kiritimatir   )zzoneinfo_data.json)Ú__doc__Ú
__future__r   r9   Ú	functoolsrU   r7   r   r<   Útypingr   rE   r   Ú__file__ÚparentrR   Ú	lru_cacher   r+   r2   rB   rG   rY   Ú__name__r   r   r	   Ú<module>rc      s‘   ðñ
õ #ã Û Û Û Û Û Û ã ò€ð —’˜XÓ&×-Ñ-€ð ×Ò˜TÔ"ô5ó #ð5õ õ6õõ÷,ð& ˆzÔÙÖñ r   