Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_tzpath.cpython-314.pyc65 linesDownload Raw Back to __pycache__
1+
2��i]����^RIt^RItR
RltRRltRtRtRt]PP]PPRR44RRt3]43RltA5R	t!R6R]
4tRs]!^R7R#)�Nc��TpVe�\V\\34'd#\RR\	V4RV:2,4hVUu.uFp\7P!V4NK	pp\;QJdRV4F'dKRM	RM
!RV44'g\R4h\\\8PPV44'g\\V44hTpME\9PPRR4pVf\P !R	4p\#WQ4p\%V4sR#uupi)10Nz!tzpaths must be a list or tuple, znot z: c3�B"�TFp\V\4x�K	R#5i�N)�11isinstance�str)�.0�ps& �Lib\zoneinfo\_tzpath.py�	<genexpr>� _reset_tzpath.<locals>.<genexpr>s���7�w�!�:�a��%�%�w�s�FTzbAll elements of a tzpath sequence must be strings or os.PathLike objects which convert to strings.�PYTHONTZPATH�TZPATH)rr�bytes�	TypeError�type�os�fspath�all�map�path�isabs�12ValueError�_get_invalid_paths_message�environ�get�	sysconfig�get_config_var�_parse_python_tzpath�tupler)�to�13stacklevel�tzpathsr	�base_tzpath�env_vars&&    r14�
_reset_tzpathr%s���G����g��U�|�,�,��3���g���r�'��5�6��
�15*1�1��A�2�9�9�Q�<���1��s�7�w�7�s�s�s�7�w�7�7�7��@��
�16�3�r�w�w�}�}�g�.�/�/��7��@�A�A����*�*�.�.���6���?��.�.�x�8�G�*�7�?��
�;�
�F��!2s�	Ec��\V4R#)zReset global TZPATH.N)r%)r s&r17�reset_tzpathr'#s��18�"��c�@�V'gR#VP\P4p\\	\P19PV44p\V4\V48wd/^RIp\V4pVPRV,\VR7V#)rNz>Invalid paths specified in PYTHONTZPATH environment variable. �r!�)�splitr�pathsepr�filterrr�len�warningsr�warn�InvalidTZPathWarning)r$r!�20raw_tzpath�21new_tzpathr0�msgs&&    r22rr+s~����	����r�z�z�*�J��v�b�g�g�m�m�Z�8�9�J��:��#�j�/�)��(��4���
�
�L��
� �!�		�	23��r(c�X�RV4pRpW"PV4,pRV,#)c3�t"�TF.p\PPV4'dK*Vx�K0	R#5ir)rrr)rrs& r24r�-_get_invalid_paths_message.<locals>.<genexpr>Cs!���I�g�d�R�W�W�]�]�4�5H�T�T�g�s�'8�258z26    z@Paths should be absolute but found the following relative paths:)�join)r"�
invalid_paths�prefix�indented_strs&   r27rrBs5��I�g�I�M�
�F��K�K�
�6�6�L�	K�28�	�r(c���\V4\FKp\PP	W4p\PPV4'gKIVu#	R#)z,Retrieve the path to a TZif file from a key.N)�_validate_tzfile_pathrrrr9�isfile)�key�search_path�filepaths&  r29�find_tzfilerCNsC���#�����7�7�<�<��1��
�7�7�>�>�(�#�#��O��30r(�_c��\PPV4'd\RV24h\PP	V4p\V4\V48wd\RV24h\PP	\PP
W44pVPV4'g\RV24hR#)z.ZoneInfo keys may not be absolute paths, got: z6ZoneInfo keys must be normalized relative paths, got: z;ZoneInfo keys must refer to subdirectories of TZPATH, got: N)rrrr�normpathr/r9�31startswith)r�_base�new_path�resolveds&&  r32r>r>\s���	�w�w�}�}�T����<�T�F�C�33�	34��w�w����%�H�35�8�}��D�	�!��D�T�F�K�36�	37��w�w��������U� =�>�H����u�%�%��I�$��P�38�	39�&r(c��^RIHp\4pVPR4P	R4pVPRRR7;_uu_4pVF.pVP
4pV'gKVPV4K0	RRR4Rp\EF/p\PPT4'gK+\P!T4F�wrxp	Yv8Xd1R	T9dTPR	4R40T9dTPR414T	F�p42\PP!Yz4p\PP#Y�R7p\P$R8wd!TP'\P$R4pT'dY�9dK�T!T4'gK�TPT4K�	K�	EK2	R
T9dTPR
4T# +'giELh;i \\3dELi;i)aReturns a set containing all available time zones.43 44.. caution::45 46    This may attempt to open a large number of files, since the best way to47    determine if a given file on the time zone search path is to open it48    and check for the "magic string" at the beginning.49)�	resources�tzdata�zones�rzutf-8)�encodingNc��\VR4;_uu_4pVP^4R8HuuRRR4# +'giR#;i \dR#i;i)�rbsTZifNF)�open�read�	Exception)�fpath�fs& r50�	valid_key�&available_timezones.<locals>.valid_key�sF��	��e�T�"�"�a��v�v�a�y�G�+�#�"�"�"���	��	�s+�A	�5�51A	�A	�A	�A	�	A�A�right�posix)�start�/�52posixrules)�	importlibrL�set�files�joinpathrS�strip�add�ImportError�FileNotFoundErrorrrr�exists�walk�remover9�relpath�sep�replace)
rL�valid_zones�53zones_filerW�zonerX�tz_root�root�dirnamesra�filerVr@s
             r54�available_timezonesrtvs���$��%�K�
��_�_�X�.�7�7��@�55�
�_�_�S�7�_�
3�
3�q����z�z�|���4��O�O�D�)��4���6���w�w�~�~�g�&�&��%'�W�W�W�%5�!�D�E����h�&��O�O�G�,��h�&��O�O�G�,��������T�0���g�g�o�o�e�o�;���6�6�S�=��+�+�b�f�f�c�2�C��c�0���U�#�#��O�O�C�(��&6�	�4�{�"�	���<�(���]4�
3�
3��56
�*�+�
��
�s5�;G5�
G!�-G!�G5�!G2	�,G5�2G5�5H57�	H58c��]tRt^�tRtRtR#)r2z?Warning raised if an invalid path is specified in PYTHONTZPATH.r+N)�__name__�59__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r+r(r60r2r2�s��Ir(r2r*)N�r�����r+)rrr%r'rrrCrrFr9�61_TEST_PATHr>rt�RuntimeWarningr2rr+r(r62�<module>r�s���	�� �<��.	���W�W�
�
�b�g�g�l�l�3��4�
5�c�r�
:�63�'1�64�.�?�DJ�>�J�65��
��r(
codekingpro/portable-devtools · Team Ai