§
    Uä�aÔ*  ã                   óì   — d Z ddlmZmZmZ ddlmZ  G d„ de¦  «        Z e¦   «         ZdZ	dZ
e	e
fd„Z	 	 	 	 	 dd„Zd„ Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Zd„ Zd„ Zd„ Zd	S )z2
internal gevent utilities, not for external use.
é    )Úprint_functionÚabsolute_importÚdivision)Ú	iteritemsc                   ó   — e Zd ZdZdZd„ ZdS )Ú_NONEzÀ
    A special object you must never pass to any gevent API.
    Used as a marker object for keyword arguments that cannot have the
    builtin None (because that might be a valid value).
    © c                 ó   — dS )Nz<default value>r	   )Úselfs    ú./usr/lib/python3/dist-packages/gevent/_util.pyÚ__repr__z_NONE.__repr__   s   € Ø Ð ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r	   r   r   r   r      s4   € € € € € ðð ð
 €Ið!ð !ð !ð !ð !r   r   )r   r   r   r   Ú__annotations__)Ú__dict__c                 óð   — |D ]4}	 t          ||¦  «        }t          | ||¦  «         Œ%# t          $ r Y Œ1w xY w|D ]4}t          | |¦  «                             t          ||i ¦  «        ¦  «         Œ5|| _        | S )a7  
    Based on code from the standard library ``functools``, but
    doesn't perform any of the troublesome imports.

    functools imports RLock from _thread for purposes of the
    ``lru_cache``, making it problematic to use from gevent.

    The other imports are somewhat heavy: abc, collections, types.
    )ÚgetattrÚsetattrÚAttributeErrorÚupdateÚ__wrapped__)ÚwrapperÚwrappedÚassignedÚupdatedÚattrÚvalues         r   Úupdate_wrapperr"      s¯   € ð ð *ð *ˆð	*Ý˜G TÑ*Ô*ˆEõ �G˜T 5Ñ)Ô)Ð)Ð)øõ ð 	ð 	ð 	ØˆDð	øøøð ð Bð BˆÝ�˜ÑÔ×%Ò%¥g¨g°t¸RÑ&@Ô&@ÑAÔAÐAÐAð "€GÔà€Ns   †(¨
5´5NFr	   ©Ú__implements__Ú__all__Ú__imports__Tc                 ó   ‡ — |r |rˆ fd„|D ¦   «         }n#ˆ fd„|D ¦   «         }nt          ‰ j        ¦  «        }g }|D ]H\  }	}
|
t          u rŒ|	|v rŒ|	                     d¦  «        r|	|vrŒ.|
||	<   |                     |	¦  «         ŒI|rd|v r|d= |S )aÒ  
    Copy attributes defined in ``source.__dict__`` to the dictionary
    in globs (which should be the caller's :func:`globals`).

    Names that start with ``__`` are ignored (unless they are in
    *dunder_names_to_keep*). Anything found in *names_to_ignore* is
    also ignored.

    If *only_names* is given, only those attributes will be
    considered. In this case, *ignore_missing_names* says whether or
    not to raise an :exc:`AttributeError` if one of those names can't
    be found.

    If *cleanup_globs* has a true value, then common things imported but
    not used at runtime are removed, including this function.

    Returns a list of the names copied; this should be assigned to ``__imports__``.
    c              3   óH   •K  — | ]}|t          ‰|t          ¦  «        fV — Œd S ©N)r   r   ©Ú.0ÚkÚsources     €r   ú	<genexpr>zcopy_globals.<locals>.<genexpr>V   s4   øè è € ÐHÐH¸�a� ¨­EÑ2Ô2Ð3ÐHÐHÐHÐHÐHÐHr   c              3   ó<   •K  — | ]}|t          ‰|¦  «        fV — Œd S r)   )r   r*   s     €r   r.   zcopy_globals.<locals>.<genexpr>X   s2   øè è € ÐAÐA°�a� ¨Ñ+Ô+Ð,ÐAÐAÐAÐAÐAÐAr   Ú__Úcopy_globals)r   r   r   Ú
startswithÚappend)r-   ÚglobsÚ
only_namesÚignore_missing_namesÚnames_to_ignoreÚdunder_names_to_keepÚcleanup_globsÚitemsÚcopiedÚkeyr!   s   `          r   r1   r1   ;   sí   ø€ ð2 ð +Øð 	BØHÐHÐHÐH¸ZÐHÑHÔHˆEˆEàAÐAÐAÐA°jÐAÑAÔAˆEˆEå˜&œ/Ñ*Ô*ˆà€FØð ð ‰
ˆˆUØ•Eˆ>ˆ>ØØ�/Ð!Ð!ØØ�>Š>˜$ÑÔð 	 CÐ/CÐ$CÐ$CØØˆˆc‰
Ø�Š�cÑÔÐÐàð &Ø˜UÐ"Ð"Ø�nÐ%à€Mr   c                 óä  — |                      d¦  «        s|                     dd¦  «        }|                      d¦  «        }|r||k    rdS ddlm} |rdS ddl}ddl}|                     ¦   «         5  |                     dt          ¦  «         | 
                    |¦  «        }ddd¦  «         n# 1 swxY w Y   |                      ¦   «          |                      |j        ¦  «         d| v r| d= dS dS )	a  
    Import the C-accelerator for the *cname*
    and copy its globals.

    The *cname* should be hardcoded to match the expected
    C accelerator module.

    Unless PURE_PYTHON is set (in the environment or automatically
    on PyPy), then the C-accelerator is required.
    zgevent._gevent_czgevent._r   Nr   )ÚPURE_PYTHONÚignoreÚimport_c_accel)r2   ÚreplaceÚgetÚgevent._compatr>   Ú	importlibÚwarningsÚcatch_warningsÚsimplefilterÚImportWarningÚimport_moduleÚclearr   r   )r4   ÚcnameÚnamer>   rD   rE   Úmods          r   r@   r@   m   sj  € ð ×ÒÐ.Ñ/Ô/ð 2à—’˜jØ0ñ2ô 2ˆð �9Š9�ZÑ Ô €Dàð �4˜5’=�=ð 	ˆð +Ð*Ð*Ð*Ð*Ð*Øð ØˆàÐÐÐØ€O€O€OØ	×	 Ò	 Ñ	"Ô	"ð 	-ð 	-ð 	×Ò˜h­Ñ6Ô6Ð6Ø×%Ò% eÑ,Ô,ˆð	-ð 	-ð 	-ñ 	-ô 	-ð 	-ð 	-ð 	-ð 	-ð 	-ð 	-øøøð 	-ð 	-ð 	-ð 	-ð 
‡K‚K�M„M€MØ	‡L‚L�”ÑÔÐà˜5Ð Ð ØÐ"Ð#Ð#Ð#ð !Ð s   Á11B.Â.B2Â5B2c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚLazyzù
    A non-data descriptor used just like @property. The
    difference is the function value is assigned to the instance
    dict the first time it is accessed and then the function is never
    called again.

    Contrast with `readproperty`.
    c                 óB   — ||j         f| _        t          | |¦  «         d S r)   )r   Údatar"   ©r   Úfuncs     r   Ú__init__zLazy.__init__©   s&   € Ø˜4œ=Ð)ˆŒ	Ý�t˜TÑ"Ô"Ð"Ð"Ð"r   c                 óL   — |€| S | j         \  }} ||¦  «        }||j        |<   |S r)   )rQ   r   )r   ÚinstÚclass_rS   rL   r!   s         r   Ú__get__zLazy.__get__­   s5   € Øˆ<ØˆKà”Y‰
ˆˆdØ��T‘
”
ˆØ#ˆŒ�dÑØˆr   N©r   r   r   r   rT   rX   r	   r   r   rO   rO       s<   € € € € € ðð ð#ð #ð #ðð ð ð ð r   rO   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚreadpropertyaÕ  
    A non-data descriptor similar to :class:`property`.

    The difference is that the property can be assigned to directly,
    without invoking a setter function. When the property is assigned
    to, it is cached in the instance and the function is not called on
    that instance again.

    Contrast with `Lazy`, which caches the result of the function in the
    instance the first time it is called and never calls the function on that
    instance again.
    c                 ó4   — || _         t          | |¦  «         d S r)   )rS   r"   rR   s     r   rT   zreadproperty.__init__Ä   s   € ØˆŒ	Ý�t˜TÑ"Ô"Ð"Ð"Ð"r   c                 ó4   — |€| S |                       |¦  «        S r)   )rS   )r   rV   rW   s      r   rX   zreadproperty.__get__È   s   € Øˆ<ØˆKà�yŠy˜‰ŒÐr   NrY   r	   r   r   r[   r[   ¶   s<   € € € € € ðð ð#ð #ð #ðð ð ð ð r   r[   c                   ó6   — e Zd ZdZed„ ¦   «         Zdd„Zd„ ZdS )ÚLazyOnClassa8  
    Similar to `Lazy`, but stores the value in the class.

    This is useful when the getter is expensive and conceptually
    a shared class value, but we don't want import-time side-effects
    such as expensive imports because it may not always be used.

    Probably doesn't mix well with inheritance?
    c                 ó,   —  | |¦  «        ||j         <   dS )zCPut a LazyOnClass object in *cls_dict* with the same name as *func*N)r   )ÚclsÚcls_dictrS   s      r   ÚlazyzLazyOnClass.lazyÙ   s   € ð #& # d¡)¤)ˆ�”ÑÐÐr   Nc                 ó0   — |p|j         | _        || _        d S r)   )r   rL   rS   )r   rS   rL   s      r   rT   zLazyOnClass.__init__Þ   s   € ØÐ)˜DœMˆŒ	ØˆŒ	ˆ	ˆ	r   c                 ód   — |€| S |                       |¦  «        }t          || j        |¦  «         |S r)   )rS   r   rL   )r   rV   ÚklassÚvals       r   rX   zLazyOnClass.__get__â   s4   € Øˆ<ØˆKà�iŠi˜‰oŒoˆÝ��t”y #Ñ&Ô&Ð&Øˆ
r   r)   )r   r   r   r   Úclassmethodrc   rT   rX   r	   r   r   r_   r_   Î   s\   € € € € € ðð ð ð,ð ,ñ „[ð,ðð ð ð ðð ð ð ð r   r_   c                  óZ   — ddl } |                      d|                      ¦   «         ¦  «        S )zA
    Returns the current time as a string in RFC3339 format.
    r   Nz%Y-%m-%dT%H:%M:%SZ)ÚtimeÚstrftimeÚgmtime)rj   s    r   Úgmctimerm   ë   s*   € ð €K€K€KØ�=Š=Ð-¨t¯{ª{©}¬}Ñ=Ô=Ð=r   c                 óR  — | d         dk    rdS ddl }ddl}ddl}ddlm} | d         }|                     ddd	| d         d
g¦  «         d| d<   |                     g d¢¦  «         |                     d¦  «        }t          |t          ¦  «        s| 	                    d¦  «        }n|}| 	                    d¦  «        }d|fz  }| 
                    |j                             | d         dd¦  «        ddddd¬¦  «        D ]©\  }	}
t          |	d¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   |                     ||¦  «        \  }}|rMt!          d|	¦  «         t          |	d¦  «        5 }|                     |¦  «         ddd¦  «         n# 1 swxY w Y   ŒªdS )aè  
    zest.releaser prerelease middle hook for gevent.

    The prerelease step:

        asks you for a version number
        updates the setup.py or version.txt and the
        CHANGES/HISTORY/CHANGELOG file (with either
        this new version
        number and offers to commit those changes to git

    The middle hook:

        All data dictionary items are available and some questions
        (like new version number) have been asked.
        No filesystem changes have been made yet.

    It is our job to finish up the filesystem changes needed, including:

    - Calling towncrier to handle CHANGES.rst
    - Add the version number to ``versionadded``, ``versionchanged`` and
      ``deprecated`` directives in Python source.
    rL   ÚgeventNr   )ÚmodulesÚnew_versionÚ	towncrierÚbuildz	--versionz--yesFÚupdate_history)ÚgitÚrestorez--stagedzCHANGES.rsts2   .. (versionchanged|versionadded|deprecated):: NEXTÚasciis
   .. \1:: %sÚreporootÚsrcTr	   )ÚbasedirÚ	recursiveÚinclude_testsÚexcluded_modulesÚ
include_soÚcheck_optionalÚrbzReplaced version NEXT inÚwb)ÚreÚosÚ
subprocessÚgevent.testingrp   Ú
check_callÚcompileÚ
isinstanceÚbytesÚencodeÚwalk_modulesÚpathÚjoinÚopenÚreadÚsubnÚprintÚwrite)rQ   r‚   rƒ   r„   rp   rq   ÚregexÚnew_version_bytesÚreplacementrŒ   Ú_ÚfÚcontentsÚnew_contentsÚcounts                  r   Úprereleaser_middler›   û   s•  € ð0 ˆF„|�xÒÐð 	ˆà€I€I€IØ€I€I€IØÐÐÐØ&Ð&Ð&Ð&Ð&Ð&à�}Ô%€Kð ×ÒØØØ�T˜-Ô(Øð	ñ ô ð ð #€DÐ	Ñð ×Òð ð ð ñ ô ð ð �JŠJÐLÑMÔM€EÝ�k¥5Ñ)Ô)ð (Ø'×.Ò.¨wÑ7Ô7ÐÐà'ÐØ#×*Ò*¨7Ñ3Ô3ÐØ Ð$5Ð#7Ñ7€Kð ×'Ò'à”G—L’L  jÔ!1°5¸(ÑCÔCààààà ð (ñ ô ð &ð &‰ˆˆaõ �$˜ÑÔð 	  Ø—v’v‘x”xˆHð	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 ð 	 ð 	 ð 	 ð 	 øøøð 	 ð 	 ð 	 ð 	 à#Ÿjšj¨°hÑ?Ô?Ñˆ�eØð 	&ÝÐ,¨dÑ3Ô3Ð3Ý�d˜DÑ!Ô!ð & QØ—’˜Ñ%Ô%Ð%ð&ð &ð &ñ &ô &ð &ð &ð &ð &ð &ð &øøøð &ð &ð &ð &øð'&ð &s$   ÄD3Ä3D7	Ä:D7	Å9FÆF	Æ"F	c                 ó,   — | d         dk    rdS d| d<   dS )z°
    Prevents zest.releaser from modifying the CHANGES.rst to add the
    'no changes yet' section; towncrier is in charge of CHANGES.rst.

    Needs zest.releaser 6.15.0.
    rL   ro   NFrt   r	   )rQ   s    r   Úpostreleaser_beforer�   R  s+   € ð ˆF„|�xÒÐð 	ˆà"€DÐ	ÑÐÐr   )NFr	   r#   T)r   Ú
__future__r   r   r   rC   r   Úobjectr   ÚWRAPPER_ASSIGNMENTSÚWRAPPER_UPDATESr"   r1   r@   rO   r[   r_   rm   r›   r�   r	   r   r   ú<module>r¢      s‘  ððð ð AÐ @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ð @à $Ð $Ð $Ð $Ð $Ð $ð	!ð 	!ð 	!ð 	!ð 	!ˆFñ 	!ô 	!ð 	!ð 	ˆ‰Œ€ð*Ð à€ð 0Ø*ðð ð ð ð> !Ø&+Ø!#Ø&RØ#ð0ð 0ð 0ð 0ðd0$ð 0$ð 0$ðfð ð ð ð ˆ6ñ ô ð ð,ð ð ð ð �6ñ ô ð ð0ð ð ð ð �&ñ ô ð ð:>ð >ð >ð U&ð U&ð U&ðn#ð #ð #ð #ð #r   