§
    Ètºf$  ã                   ó°   — g d ¢Z ddlZddlZddlZddlmZ ddlmZ defd„Z	dddd	d	d
œZ
 G d„ d¦  «        Z e¦   «         Ze                     ¦   «         ZdS ))ÚsecondsÚshortPythonVersionÚPlatformÚplatformÚplatformTypeé    N)Útime)ÚOptionalÚreturnc                  ó0   — dt           j        dd…         z  S )z?
    Returns the Python version as a dot-separated string.
    z%s.%s.%sNé   )ÚsysÚversion_info© ó    úU/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/python/runtime.pyr   r      s   € ð �Ô(¨¨!¨Ô,Ñ,Ð,r   Úwin32ÚposixÚjava)ÚntÚcer   r   zorg.python.modules.osc                   óH  — e Zd ZU dZe                     ej        ¦  «        Ze	e
         ed<    ee¦  «        Zej        Z	 dde	e
         de	e
         ddfd„Zdefd„Zde	e
         fd	„Zdefd
„Zdefd„Zdefd„Zdefd„Zdefd„Zdde
defd„Zdefd„Zdefd„Zdefd„ZdS )r   zC
    Gives us information about the platform we're running on.
    ÚtypeNÚnamer   r
   c                 ó^   — |�t                                |¦  «        | _        |�	|| _        d S d S )N)ÚknownPlatformsÚgetr   Ú	_platform)Úselfr   r   s      r   Ú__init__zPlatform.__init__,   s8   € ð ÐÝ&×*Ò*¨4Ñ0Ô0ˆDŒIØÐØ%ˆDŒNˆNˆNð  Ðr   c                 ó   — | j         dk    S )z
        Do we know about this platform?

        @return: Boolean indicating whether this is a known platform or not.
        N©r   ©r   s    r   ÚisKnownzPlatform.isKnown4   s   € ð Œy˜DÒ Ð r   c                 ó   — | j         S )zX
        Get platform type.

        @return: Either 'posix', 'win32' or 'java'
        r!   r"   s    r   ÚgetTypezPlatform.getType<   s   € ð ŒyÐr   c                 ó   — | j         dk    S )zƒ
        Check if current platform is macOS.

        @return: C{True} if the current platform has been detected as macOS.
        Údarwin)r   r"   s    r   ÚisMacOSXzPlatform.isMacOSXD   s   € ð Œ~ Ò)Ð)r   c                 ób   — t          j        dt          d¬¦  «         |                      ¦   «         S )a   
        Are we running in Windows NT?

        This is deprecated and always returns C{True} on win32 because
        Twisted only supports Windows NT-derived platforms at this point.

        @return: C{True} if the current platform has been detected as
            Windows NT.
        zgtwisted.python.runtime.Platform.isWinNT was deprecated in Twisted 13.0. Use Platform.isWindows instead.é   )Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarningÚ	isWindowsr"   s    r   ÚisWinNTzPlatform.isWinNTL   s:   € õ 	Œð<åØð		
ñ 	
ô 	
ð 	
ð �~Š~ÑÔÐr   c                 ó2   — |                       ¦   «         dk    S )zˆ
        Are we running in Windows?

        @return: C{True} if the current platform has been detected as
            Windows.
        r   )r%   r"   s    r   r/   zPlatform.isWindows^   s   € ð �|Š|‰~Œ~ Ò(Ð(r   c                 óZ   — t           j        dk    ot          j        ¦   «         j        dk    S )z¡
        Check if current platform is Windows Vista or Windows Server 2008.

        @return: C{True} if the current platform has been detected as Vista
        r   é   )r   r   ÚgetwindowsversionÚmajorr"   s    r   ÚisVistazPlatform.isVistag   s'   € õ Œ|˜wÒ&ÐM­3Ô+@Ñ+BÔ+BÔ+HÈAÒ+MÐMr   c                 ó6   — | j                              d¦  «        S )zƒ
        Check if current platform is Linux.

        @return: C{True} if the current platform has been detected as Linux.
        Úlinux)r   Ú
startswithr"   s    r   ÚisLinuxzPlatform.isLinuxo   s   € ð Œ~×(Ò(¨Ñ1Ô1Ð1r   ú/proc/1/cgroupÚ_initCGroupLocationc                 óJ  — |                       ¦   «         sdS ddlm}  ||¦  «        }|                     ¦   «         rgd„ |                     ¦   «                              d¦  «        D ¦   «         }|D ]3}t          |¦  «        dk    r|d                              d¦  «        r d	S Œ4dS )
zÃ
        Check if the current platform is Linux in a Docker container.

        @return: C{True} if the current platform has been detected as Linux
            inside a Docker container.
        Fr   )ÚFilePathc                 ó8   — g | ]}|                      d ¦  «        ‘ŒS )ó   :)Úsplit)Ú.0Úxs     r   ú
<listcomp>z%Platform.isDocker.<locals>.<listcomp>ˆ   s/   € ð ð ð Ø"#�—’˜‘”ðð ð r   ó   
r   r*   s   /docker/T)r:   Útwisted.python.filepathr>   ÚexistsÚ
getContentrA   Úlenr9   )r   r<   r>   ÚinitCGroupsÚcontrolGroupsÚgroups         r   ÚisDockerzPlatform.isDockerw   sÌ   € ð �|Š|‰~Œ~ð 	Ø�5à4Ð4Ð4Ð4Ð4Ð4ð �hÐ2Ñ3Ô3ˆØ×ÒÑÔð 
	 ðð Ø'2×'=Ò'=Ñ'?Ô'?×'EÒ'EÀeÑ'LÔ'Lðñ ô ˆMð 'ð  ð  �Ý�u‘:”: ’?�? u¨Q¤x×':Ò':¸;Ñ'GÔ'G�?à˜4˜4øàˆur   c                 ón   — |                       ¦   «         rdS 	 t          j         dS # t          $ r Y dS w xY w)z¼
        Check for symlink support usable for Twisted's purposes.

        @return: C{True} if symlinks are supported on the current platform,
                 otherwise C{False}.
        FT)r/   ÚosÚsymlinkÚAttributeErrorr"   s    r   Ú_supportsSymlinkszPlatform._supportsSymlinks“   sT   € ð �>Š>ÑÔð 	ð �5ðÝ”
�
ð �tøõ "ð ð ð Ø�u�uðøøøs   ˜& ¦
4³4c                 ó6   — 	 ddl }|duS # t          $ r Y dS w xY w)zy
        Can threads be created?

        @return: C{True} if the threads are supported on the current platform.
        r   NF)Ú	threadingÚImportError)r   rT   s     r   ÚsupportsThreadszPlatform.supportsThreads¬   s@   € ð	ØÐÐÐà DÐ(Ð(øÝð 	ð 	ð 	Ø�5�5ð	øøøs   ‚
 Š
—c                 ó�   — 	 ddl m}m} n# t          $ r Y dS w xY w	 t	          j         |¦   «         ¦  «         n# |$ r Y dS w xY wdS )zf
        Return C{True} if we can use the inotify API on this platform.

        @since: 10.1
        r   )ÚINotifyErrorÚinitFT)Útwisted.python._inotifyrX   rY   rU   rO   Úclose)r   rX   rY   s      r   ÚsupportsINotifyzPlatform.supportsINotify¹   s‰   € ð	ØBÐBÐBÐBÐBÐBÐBÐBÐBøÝð 	ð 	ð 	Ø�5�5ð	øøøð	ÝŒH�T�T‘V”VÑÔÐÐøØð 	ð 	ð 	Ø�5�5ð	øøøàˆts   ‚ ‹
˜�: ºAÁA)NN)r;   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   rO   r   r   r	   ÚstrÚ__annotations__Ústaticmethodr   r   r   r   r   Úboolr#   r%   r(   r0   r/   r6   r:   rM   rR   rV   r\   r   r   r   r   r   #   sÚ  € € € € € € ðð ð )×,Ò,¨R¬WÑ5Ô5€Dˆ(�3Œ-Ð5Ð5Ñ5Øˆl˜7Ñ#Ô#€GØ”€Ið EIð&ð &Ø˜S”Mð&Ø4<¸S´Mð&à	ð&ð &ð &ð &ð!˜ð !ð !ð !ð !ð˜ #œð ð ð ð ð*˜$ð *ð *ð *ð *ð ˜ð  ð  ð  ð  ð$)˜4ð )ð )ð )ð )ðN˜ð Nð Nð Nð Nð2˜ð 2ð 2ð 2ð 2ðð ¨Cð Àtð ð ð ð ð8 4ð ð ð ð ð2 ð ð ð ð ð ð ð ð ð ð ð r   r   )Ú__all__rO   r   r,   r   r   Útypingr	   ra   r   r   r   r   r%   r   r   r   r   ú<module>rg      sâ   ðð
ð ð €ð 
€	€	€	Ø 
€
€
€
Ø €€€Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð ð-˜Cð -ð -ð -ð -ð Ø
ØØØ#ðð €ðeð eð eð eð eñ eô eð eðP ˆ8‰:Œ:€Ø×ÒÑ!Ô!€€€r   