+
    
4ix1                         ^ RI Ht ^ RIHtHtHt ]! ^ 4      tRR.tR t]! ]R4      '       d   RR lt	M ! R R	]4      t
RR
 lt	R t ! R R]4      t ! R R]4      tR# )    wraps)datetime	timedeltatzinfotzname_in_python2enfoldc                    V # )zChange unicode output into bytestrings in Python 2

tzname() API changed in Python 3. It used to return bytes, but was changed
to unicode strings
 )namefuncs   &5/usr/lib/python3/dist-packages/dateutil/tz/_common.pyr   r      s	     O    foldc                &    V P                  VR7      # )F  
Provides a unified interface for assigning the ``fold`` attribute to
datetimes both before and after the implementation of PEP-495.

:param fold:
    The value for the ``fold`` attribute in the returned datetime. This
    should be either 0 or 1.

:return:
    Returns an object for which ``getattr(dt, 'fold', 0)`` returns
    ``fold`` for all versions of Python. In versions prior to
    Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
    subclass of :py:class:`datetime.datetime` with the ``fold``
    attribute added, if ``fold`` is 1.

.. versionadded:: 2.6.0
r   replace)dtr   s   &&r   r	   r	      s    $ zztz$$r   c                   >   a  ] tR t^-t o RtRtR t]R 4       tRt	V t
R# )_DatetimeWithFoldz
This is a class designed to provide a PEP 495-compliant interface for
Python versions before 3.6. It is used only for dates in a fold, so
the ``fold`` attribute is fixed at ``1``.

.. versionadded:: 2.6.0
c                   Rp\        W4       F)  w  rEWR9   d   \        RP                  V4      4      hWBV&   K+  	  V F  pWR9  g   K  \        W4      W%&   K  	  VP	                  R^4      '       d   V P
                  M\        pV! R/ VB # )a  
Return a datetime with the same attributes, except for those
attributes given new values by whichever keyword arguments are
specified. Note that tzinfo=None can be specified to create a naive
datetime from an aware datetime with no conversion of date and time
data.

This is reimplemented in ``_DatetimeWithFold`` because pypy3 will
return a ``datetime.datetime`` even if ``fold`` is unchanged.
zDuplicate argument: {}r   )yearmonthdayhourminutesecondmicrosecondr   r   )zip	TypeErrorformatgetattrget	__class__r   )selfargskwargsargnamesargargnamedt_classs   &*,    r   r   _DatetimeWithFold.replace7   s    H
 !$D 3$#$<$C$CG$LMM"%w	 !4 $(&-d&<FO $ *0FA)>)>t~~HH%f%%r   c                    ^#    r   r&   s   &r   r   _DatetimeWithFold.foldU   s    r   r   N)__name__
__module____qualname____firstlineno____doc__	__slots__r   propertyr   __static_attributes____classdictcell____classdict__s   @r   r   r   -   s*     	 		&< 
	 
	r   r   c                    \        V R^ 4      V8X  d   V # V P                  4       R,          pW P                  V P                  3,          pV'       d
   \	        V!  # \        V!  # )r   r   :N   N)r#   	timetupler   r   r   r   )r   r   r'   s   && r   r	   r	   Y   sW    $ 2vq!T)I||~b!++$d++T?"r   c                0   a  \        S 4      V 3R l4       pV# )z
The CPython version of ``fromutc`` checks that the input is a ``datetime``
object and that ``self`` is attached as its ``tzinfo``.
c                    < \        V\        4      '       g   \        R 4      hVP                  V Jd   \	        R4      hS! W4      # )&fromutc() requires a datetime argumentdt.tzinfo is not self)
isinstancer   r!   r   
ValueError)r&   r   fs   &&r   fromutc)_validate_fromutc_inputs.<locals>.fromutc|   s>    "h''DEE99D 455{r   r   )rG   rH   s   f r   _validate_fromutc_inputsrJ   w   s"    
 1X  Nr   c                   L   a  ] tR t^t o RtR tR tR tR t]	R 4       t
RtV tR# )	_tzinfoz5
Base class for all ``dateutil`` ``tzinfo`` objects.
c                   VP                  V R7      p\        V^ R7      p\        V^R7      pVP                  4       VP                  4       8H  pVP                  RR7      VP                  RR7      8H  pT;'       d    V'       * # )
Whether or not the "wall time" of a given datetime is ambiguous in this
zone.

:param dt:
    A :py:class:`datetime.datetime`, naive or time zone aware.


:return:
    Returns ``True`` if ambiguous, ``False`` otherwise.

.. versionadded:: 2.6.0
r   r   N)r   r	   	utcoffset)r&   r   wall_0wall_1same_offsetsame_dts   &&    r   is_ambiguous_tzinfo.is_ambiguous   sx     ZZtZ$##&&(F,<,<,>>...-t1LL**{?*r   c                    V P                  V4      '       d;   W!,
          p\        W1P                  4       VP                  4       ,
          8H  4      pV# ^ pV# )aX  
Determine the fold status of a "wall" datetime, given a representation
of the same datetime as a (naive) UTC datetime. This is calculated based
on the assumption that ``dt.utcoffset() - dt.dst()`` is constant for all
datetimes, and that this offset is the actual number of hours separating
``dt_utc`` and ``dt_wall``.

:param dt_utc:
    Representation of the datetime as UTC

:param dt_wall:
    Representation of the datetime as "wall time". This parameter must
    either have a `fold` attribute or have a fold-naive
    :class:`datetime.tzinfo` attached, otherwise the calculation may
    fail.
)rU   intrP   dst)r&   dt_utcdt_wall
delta_wall_folds   &&&  r   _fold_status_tzinfo._fold_status   sQ    " W%% )J
'7'7'9FJJL'HIJE  Er   c                    \        VR ^ 4      # r   )r#   r&   r   s   &&r   r]   _tzinfo._fold   s    r61%%r   c                   VP                  4       pVf   \        R4      hVP                  4       pVf   \        R4      hW#,
          pW,          p\        V^R7      P                  4       pVf   \        R4      hW,           # )  
Given a timezone-aware datetime in a given timezone, calculates a
timezone-aware datetime in a new timezone.

Since this is the one time that we *know* we have an unambiguous
datetime object, we take this opportunity to determine whether the
datetime is ambiguous and in a "fold" state (e.g. if it's the first
occurrence, chronologically, of the ambiguous datetime).

:param dt:
    A timezone-aware :class:`datetime.datetime` object.
z0fromutc() requires a non-None utcoffset() resultz*fromutc() requires a non-None dst() resultr   z;fromutc(): dt.dst gave inconsistent results; cannot convert)rP   rF   rY   r	   )r&   r   dtoffdtdstdeltas   &&   r   _fromutc_tzinfo._fromutc   s     = & ' ' =IJJ
 r"&&(= 7 8 8zr   c                ^    V P                  V4      pV P                  W4      p\        W#R7      # )rd   r   )rh   r^   r	   )r&   r   r[   r]   s   &&  r   rH   _tzinfo.fromutc   s1     --# !!". g**r   r   N)r3   r4   r5   r6   r7   rU   r^   r]   rh   rJ   rH   r:   r;   r<   s   @r   rL   rL      s3     +22&#J + +r   rL   c                      a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	 t]R
 4       tRtR tR t]P&                  tRtV tR# )tzrangebaseaG  
This is an abstract base class for time zones represented by an annual
transition into and out of DST. Child classes should implement the following
methods:

    * ``__init__(self, *args, **kwargs)``
    * ``transitions(self, year)`` - this is expected to return a tuple of
      datetimes representing the DST on and off transitions in standard
      time.

A fully initialized ``tzrangebase`` subclass should also provide the
following attributes:
    * ``hasdst``: Boolean whether or not the zone uses DST.
    * ``_dst_offset`` / ``_std_offset``: :class:`datetime.timedelta` objects
      representing the respective UTC offsets.
    * ``_dst_abbr`` / ``_std_abbr``: Strings representing the timezone short
      abbreviations in DST and STD, respectively.
    * ``_hasdst``: Whether or not the zone has DST.

.. versionadded:: 2.6.0
c                    \        R 4      h)z%tzrangebase is an abstract base class)NotImplementedErrorr1   s   &r   __init__tzrangebase.__init__  s    !"IJJr   c                p    V P                  V4      pVf   R # V'       d   V P                  # V P                  # N)_isdst_dst_offset_std_offsetr&   r   isdsts   && r   rP   tzrangebase.utcoffset  s2    B=######r   c                d    V P                  V4      pVf   R # V'       d   V P                  # \        # rs   )rt   _dst_base_offsetZEROrw   s   && r   rY   tzrangebase.dst!  s+    B=(((Kr   c                `    V P                  V4      '       d   V P                  # V P                  # rs   )rt   	_dst_abbr	_std_abbrra   s   &&r   tznametzrangebase.tzname+  s#    ;;r??>>!>>!r   c                F   \        V\        4      '       g   \        R4      hVP                  V Jd   \	        R4      hV P                  VP                  4      pVf   WP                  V4      ,           # Vw  r4W0P                  ,          pW@P                  ,          pW43pVP                  RR7      pV P                  We4      pV'       d   WP                  ,           pMWP                  ,           p\        V'       * ;'       d    V P                  V4      4      p	\        WR7      # )z+Given a datetime in UTC, return local time rC   rD   NrO   r   )rE   r   r!   r   rF   transitionsr   rP   rv   r   _naive_isdstru   rX   rU   r	   )
r&   r   r   dstondstoffutc_transitionsrZ   rx   r[   r]   s
   &&        r   rH   tzrangebase.fromutc1  s    "h''DEE99D 455 &&rww/r*** $!!!""" /4(!!&:+++G+++GI<<$"3"3G"<=g**r   c                    V P                   '       g   R# V P                  VP                  4      w  r#VP                  RR7      pY1u;8*  ;'       d    W0P                  ,           8  # u # )rN   FNrO   )hasdstr   r   r   r{   )r&   r   startends   &&  r   rU   tzrangebase.is_ambiguousR  sV     {{{%%bgg.
ZZtZ$77C"7"777878r   c                ,   V P                   '       g   R # Vf   R# V P                  VP                  4      pVf   R # VP                  RR7      pV P	                  W4      pV'       g.   V P                  V4      '       d   V P                  V4      '       * # V# )FNrO   )r   r   r   r   r   rU   r]   )r&   r   r   rx   s   &&  r   rt   tzrangebase._isdsth  s~    {{{Z&&rww/ZZtZ$!!"2 **2..zz"~%%Lr   c                    Vw  r4VP                  R R7      pW48  d   Y1u;8*  ;'       d    V8  pV# u pV# YAu;8*  ;'       d    V8  Mu '       * pV# )NrO   r   )r&   r   r   r   r   rx   s   &&&   r   r   tzrangebase._naive_isdst}  s]    #ZZtZ$>((&(E 	 )E  ,,u,,Er   c                <    V P                   V P                  ,
          # rs   )ru   rv   r1   s   &r   r{   tzrangebase._dst_base_offset  s    $"2"222r   Nc                    W8X  * # rs   r   )r&   others   &&r   __ne__tzrangebase.__ne__  s    ""r   c                <    R V P                   P                  ,          # )z%s(...))r%   r3   r1   s   &r   __repr__tzrangebase.__repr__  s    4>>2222r   r   )r3   r4   r5   r6   r7   rp   rP   rY   r   rH   rU   rt   r   r9   r{   __hash__r   r   object
__reduce__r:   r;   r<   s   @r   rm   rm      sf     *K$"+B9,*
 3 3 H#3 ""Jr   rm   Nr/   )	functoolsr   r   r   r   r|   __all__r   hasattrr	   r   rJ   rL   rm   r   r   r   <module>r      sp     0 0 |
) 8V%**H *X#<"s+f s+lW#' W#r   