zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
U
«ý°dã@sœddlZddlZddlmZddlmZddlmZddlm    Z
dddgZ d    Z d
Z Gd d „d e
ƒZ    d d„ZGdd„deƒZgZddd„Zdd„Zdd„ZdS)éN)ÚTarFile)Úget_data)ÚBytesIO)ÚtzfileÚget_zonefile_instanceÚgettzÚgettz_db_metadatazdateutil-zoneinfo.tar.gzÚMETADATAc@seZdZdd„ZdS)rcCs t|jffS)N)rÚ    _filename©Úself©r úQd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\dateutil/zoneinfo/__init__.pyÚ
__reduce__sztzfile.__reduce__N)Ú__name__Ú
__module__Ú __qualname__rr r r rrsrc
CsTzttttƒƒWStk
rN}z t d |j|j    ¡¡WY¢dSd}~XYnXdS)NzI/O error({0}): {1})
rrrÚ ZONEFILENAMEÚIOErrorÚwarningsÚwarnÚformatÚerrnoÚstrerror)Úer r rÚgetzoneinfofile_streams
rc@s eZdZddd„Zddd„ZdS)Ú ZoneInfoFileNc    s¶|dk    r¦tj|dŠ‰‡fdd„ˆ ¡Dƒˆ_‡fdd„ˆ ¡Dƒ}ˆj |¡z.ˆ ˆ t¡¡}| ¡     d¡}t
  |¡ˆ_ Wnt k
r˜dˆ_ YnXW5QRXn iˆ_dˆ_ dS)N)Úfileobjcs6i|].}| ¡r|jtkr|jtˆ |¡|jd“qS))Úfilename)ÚisfileÚnameÚ METADATA_FNrÚ extractfile)Ú.0Úzf)Útfr rÚ
<dictcomp>"s
 
þz)ZoneInfoFile.__init__.<locals>.<dictcomp>cs,i|]$}| ¡s| ¡r|jˆj|j“qSr )ÚislnkÚissymr ÚzonesÚlinkname)r#Zzlr r rr&'s
þzUTF-8)rÚopenÚ
getmembersr)Úupdater"Ú    getmemberr!ÚreadÚdecodeÚjsonÚloadsÚmetadataÚKeyError)r Zzonefile_streamÚlinksZ metadata_jsonZ metadata_strr )r r%rÚ__init__s"
ÿ
ÿ zZoneInfoFile.__init__cCs|j ||¡S)ak
        Wrapper for :func:`ZoneInfoFile.zones.get`. This is a convenience method
        for retrieving zones from the zone dictionary.
 
        :param name:
            The name of the zone to retrieve. (Generally IANA zone names)
 
        :param default:
            The value to return in the event of a missing key.
 
        .. versionadded:: 2.6.0
 
        )r)Úget)r r Údefaultr r rr76szZoneInfoFile.get)N)N)rrrr6r7r r r rrs
rFcCs2|r
d}n ttddƒ}|dkr.ttƒƒ}|t_|S)a%
    This is a convenience function which provides a :class:`ZoneInfoFile`
    instance using the data provided by the ``dateutil`` package. By default, it
    caches a single instance of the ZoneInfoFile object and returns that.
 
    :param new_instance:
        If ``True``, a new instance of :class:`ZoneInfoFile` is instantiated and
        used as the cached instance for the next call. Otherwise, new instances
        are created only as necessary.
 
    :return:
        Returns a :class:`ZoneInfoFile` object.
 
    .. versionadded:: 2.6
    NÚ_cached_instance)Úgetattrrrrr9)Z new_instanceZzifr r rrPs 
cCs8t dt¡ttƒdkr(t ttƒƒ¡tdj     |¡S)a+
    This retrieves a time zone from the local zoneinfo tarball that is packaged
    with dateutil.
 
    :param name:
        An IANA-style time zone name, as found in the zoneinfo file.
 
    :return:
        Returns a :class:`dateutil.tz.tzfile` time zone object.
 
    .. warning::
        It is generally inadvisable to use this function, and it is only
        provided for API compatibility with earlier versions. This is *not*
        equivalent to ``dateutil.tz.gettz()``, which selects an appropriate
        time zone based on the inputs, favoring system zoneinfo. This is ONLY
        for accessing the dateutil-specific zoneinfo (which may be out of
        date compared to the system zoneinfo).
 
    .. deprecated:: 2.6
        If you need to use a specific zoneinfofile over the system zoneinfo,
        instantiate a :class:`dateutil.zoneinfo.ZoneInfoFile` object and call
        :func:`dateutil.zoneinfo.ZoneInfoFile.get(name)` instead.
 
        Use :func:`get_zonefile_instance` to retrieve an instance of the
        dateutil-provided zoneinfo.
    zÐzoneinfo.gettz() will be removed in future versions, to use the dateutil-provided zoneinfo files, instantiate a ZoneInfoFile object and use ZoneInfoFile.zones.get() instead. See the documentation for details.r)
rrÚDeprecationWarningÚlenÚ_CLASS_ZONE_INSTANCEÚappendrrr)r7)r r r rrms ü cCs2t dt¡ttƒdkr(t ttƒƒ¡tdjS)a! Get the zonefile metadata
 
    See `zonefile_metadata`_
 
    :returns:
        A dictionary with the database metadata
 
    .. deprecated:: 2.6
        See deprecation warning in :func:`zoneinfo.gettz`. To get metadata,
        query the attribute ``zoneinfo.ZoneInfoFile.metadata``.
    zÐzoneinfo.gettz_db_metadata() will be removed in future versions, to use the dateutil-provided zoneinfo files, ZoneInfoFile object and query the 'metadata' attribute instead. See the documentation for details.r)    rrr;r<r=r>rrr3r r r rr“s ü )F)rr1ÚtarfilerÚpkgutilrÚiorZ dateutil.tzrZ_tzfileÚ__all__rr!rÚobjectrr=rrrr r r rÚ<module>s    
/
&