+
    Vß$g¹  ã                  óÈ   € R t ^ RIHt ^ RIt^ RIt^ RIHt ]'       d   ^ RIHt ^ RI	H
t
  ! R R]4      t ! R R	]4      t ! R
 R]P                  4      tR R ltR R ltR# )u  :module: watchdog.utils
:synopsis: Utility classes and functions.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (MickaÃ«l Schoentgen)

Classes
-------
.. autoclass:: BaseThread
   :members:
   :show-inheritance:
   :inherited-members:

)ÚannotationsN)ÚTYPE_CHECKING)Ú
ModuleType)ÚTrickc                  ó   € ] tR t^tRtR# )ÚUnsupportedLibcError© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú9/usr/lib/python3/dist-packages/watchdog/utils/__init__.pyr   r      s   † Ûr   r   c                  ó   € ] tR t^tRtRtR# )ÚWatchdogShutdownErrorz=Semantic exception used to signal an external shutdown event.r   N)r	   r
   r   r   Ú__doc__r   r   r   r   r   r      s   † ÝGr   r   c                  óx   € ] tR t^#tRtR R lt]R R l4       tR R ltR R	 lt	R
 R lt
R R ltR R ltRtR# )Ú
BaseThreadz1Convenience class for creating stoppable threads.c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNoner   )Úformats   "r   Ú__annotate__ÚBaseThread.__annotate__&   s   € ÷ 0ñ 0˜$ñ 0r   c                	óÎ   € \         P                  P                  V 4       \        V R 4      '       d	   RV n        MV P                  R4       \         P                  ! 4       V n        R# )ÚdaemonTN)Ú	threadingÚThreadÚ__init__Úhasattrr   Ú	setDaemonÚEventÚ_stopped_event©Úselfs   &r   r!   ÚBaseThread.__init__&   sE   € Ü×Ñ×!Ñ! $Ô'Ü�4˜×"Ò"ØˆD�Kà�N‰N˜4Ô Ü'ŸošoÓ/ˆÖr   c               ó   € V ^8„  d   QhRR/# )r   r   zthreading.Eventr   )r   s   "r   r   r   /   s   € ÷ #ñ #˜ñ #r   c                	ó   € V P                   # ©N)r%   r&   s   &r   Ústopped_eventÚBaseThread.stopped_event.   s   € à×"Ñ"Ð"r   c               ó   € V ^8„  d   QhRR/# )r   r   Úboolr   )r   s   "r   r   r   2   s   € ÷ 0ñ 0 Tñ 0r   c                ó@   € V P                   P                  4       '       * # )z6Determines whether the thread should continue running.)r%   Úis_setr&   s   &r   Úshould_keep_runningÚBaseThread.should_keep_running2   s   € à×&Ñ&×-Ñ-Ó/Ô/Ð/r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   6   s   € ÷ ñ  ñ r   c                ó   € R# )z›Override this method instead of :meth:`stop()`.
:meth:`stop()` calls this method.

This method is called immediately after the thread is signaled to stop.
Nr   r&   s   &r   Úon_thread_stopÚBaseThread.on_thread_stop6   ó   ‚ r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   =   s   € ÷ ñ �dñ r   c                óZ   € V P                   P                  4        V P                  4        R# )zSignals the thread to stop.N)r%   Úsetr6   r&   s   &r   ÚstopÚBaseThread.stop=   s    € à×Ñ×ÑÔ!Ø×ÑÖr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   B   s   € ÷ ñ  ñ r   c                ó   € R# )zºOverride this method instead of :meth:`start()`. :meth:`start()`
calls this method.

This method is called right before this thread is started and this
object's run() method is invoked.
Nr   r&   s   &r   Úon_thread_startÚBaseThread.on_thread_startB   r8   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   J   s   € ÷ %ñ %�tñ %r   c                	ód   € V P                  4        \        P                  P                  V 4       R # r+   )r@   r   r    Ústartr&   s   &r   rD   ÚBaseThread.startJ   s"   € Ø×ÑÔÜ×Ñ×Ñ˜tÖ$r   )r%   r   N)r	   r
   r   r   r   r!   Úpropertyr,   r2   r6   r<   r@   rD   r   r   r   r   r   r   #   s<   † Ù;õ0ð ô#ó ð#õ0õõõ
÷%ñ %r   r   c               ó    € V ^8„  d   QhRRRR/# )r   Úmodule_nameÚstrr   r   r   )r   s   "r   r   r   O   s   € ÷ $ñ $˜Sð $ Zñ $r   c                ó�   €  \        V 4       \        P                  T ,          #   \         d   pRT  2p\        T4      ThRp?ii ; i)z;Imports a module given its name and returns a handle to it.zNo module named N)Ú
__import__ÚImportErrorÚsysÚmodules)rH   ÚeÚerrors   &  r   Úload_modulerQ   O   sK   € ð(Ü�;Ôô �;‰;�{Õ#Ð#øô ô (Ø" ; -Ð0ˆÜ˜%Ó  aÐ'ûð(ús   ‚$ ¤A¯A Á Ac               ó    € V ^8„  d   QhRRRR/# )r   Údotted_pathrI   r   ztype[Trick]r   )r   s   "r   r   r   Y   s   € ÷ ! ñ ! ˜Cð !  Kñ ! r   c                ó  € V P                  R4      p\        V4      ^8:  d   RV  R2p\        V4      hVR,          pRP                  VRR 4      p\	        V4      p\        WS4      '       d   \        WS4      # RV RV 2p\        V4      h)aE  Loads and returns a class definition provided a dotted path
specification the last part of the dotted path is the class name
and there is at least one module name preceding the class name.

Notes
-----
You will need to ensure that the module you are trying to load
exists in the Python path.

Examples
--------
- module.name.ClassName    # Provided module.name is in the Python path.
- module.ClassName         # Provided module is in the Python path.

What won't work:
- ClassName
- modle.name.ClassName     # Typo in module name.
- module.name.ClasNam      # Typo in classname.

Ú.zDotted module path z+ must contain a module name and a classnameNzModule z does not have class attribute éÿÿÿÿ)ÚsplitÚlenÚ
ValueErrorÚjoinrQ   r"   ÚgetattrÚAttributeError)rS   Údotted_path_splitrP   Ú
klass_namerH   Úmodules   &     r   Ú
load_classr`   Y   s›   € ð* $×)Ñ)¨#Ó.ÐÜ
ÐÓ Ô"Ø% k ]Ð2]Ð^ˆÜ˜ÓÐØ" 2Õ&€JØ—(‘(Ð,¨S¨bÐ1Ó2€Kä˜Ó%€FÜˆv×"Ò"Ü�vÓ*Ð*à�k�]Ð"AÀ*ÀÐN€EÜ
˜Ó
Ðr   )r   Ú
__future__r   rM   r   Útypingr   Útypesr   Úwatchdog.tricksr   Ú	Exceptionr   r   r    r   rQ   r`   r   r   r   Ú<module>rf      sX   ðñõ #ã 
Û Ý  çÝ å%ô	˜9ô 	ôH˜Iô Hô)%�×!Ñ!ô )%õX$÷! r   