zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
U
Z±dùã
@sîUddlZddlZddlmZmZmZddlZddlmZm    Z    ddl
m Z m Z dZ eeed<dZeeed<er’Gdd    „d    e ƒZGd
d „d e ƒZd dd œdd„Zed    efdœdd„Zed efdœdd„ZzTejdkrèddlmZn8ejdkreseedƒrddlmZn ddlmZWn(ek
rJZzeZ W5dZ[XYnXzterVnhejdkrtdd„Zdd„ZnJejdkr¶ddlmZm Z ddl!m"Z#ddl$Z$d d„Zd!d„Zned"ƒ‚Wn(ek
rèZzeZW5dZ[XYnXdS)#éN)ÚOptionalÚTupleÚ TYPE_CHECKINGé)Ú_coreÚ _subprocess)Ú
SendStreamÚ ReceiveStreamÚ_wait_child_exiting_errorÚ_create_child_pipe_errorc@seZdZddœdd„ZdS)ÚClosableSendStreamN©ÚreturncCsdS©N©©ÚselfrrúYd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\trio/_subprocess_platform/__init__.pyÚcloseszClosableSendStream.close©Ú__name__Ú
__module__Ú __qualname__rrrrrr sr c@seZdZddœdd„ZdS)ÚClosableReceiveStreamNr cCsdSrrrrrrrszClosableReceiveStream.closerrrrrrsrz_subprocess.Process)ÚprocessrcÃs
tt‚dS)aîBlock until the child process managed by ``process`` is exiting.
 
    It is invalid to call this function if the process has already
    been waited on; that is, ``process.returncode`` must be None.
 
    When this function returns, it indicates that a call to
    :meth:`subprocess.Popen.wait` will immediately be able to
    return the process's exit status. The actual exit status is not
    consumed by this call, since :class:`~subprocess.Popen` wants
    to be able to do that itself.
    N)ÚNotImplementedErrorr
)rrrrÚwait_child_exitings rr cCs
tt‚dS)apCreate a new pipe suitable for sending data from this
    process to the standard input of a child we're about to spawn.
 
    Returns:
      A pair ``(trio_end, subprocess_end)`` where ``trio_end`` is a
      :class:`~trio.abc.SendStream` and ``subprocess_end`` is
      something suitable for passing as the ``stdin`` argument of
      :class:`subprocess.Popen`.
    N©rr rrrrÚcreate_pipe_to_child_stdin,s
rcCs
tt‚dS)aŒCreate a new pipe suitable for receiving data into this
    process from the standard output or error stream of a child
    we're about to spawn.
 
    Returns:
      A pair ``(trio_end, subprocess_end)`` where ``trio_end`` is a
      :class:`~trio.abc.ReceiveStream` and ``subprocess_end`` is
      something suitable for passing as the ``stdin`` argument of
      :class:`subprocess.Popen`.
    NrrrrrÚcreate_pipe_from_child_output9s rÚwin32é)rÚlinuxZ wait_keventÚposixcCst ¡\}}tj |¡|fSr©ÚosÚpipeÚtrioZlowlevelZFdStream©ZrfdZwfdrrrrXs cCst ¡\}}tj |¡|fSrr$r(rrrr\s Únt)ÚPipeSendStreamÚPipeReceiveStream)r&cCs$tdd\}}t|ƒt |tj¡fS)N)FT©Z
overlapped)Ú windows_piper*ÚmsvcrtÚopen_osfhandler%ÚO_RDONLY©ZrhZwhrrrrlscCs"tdd\}}t|ƒt |d¡fS)N)TFr,r)r-r+r.r/r1rrrrqsz&pipes not implemented on this platform)%r%ÚsysÚtypingrrrr'ÚrrÚ_abcrr    r
Ú ImportErrorÚ__annotations__r r rrÚintrrÚplatformZwindowsÚhasattrZkqueueZwaitidÚexÚnameZ_windows_pipesr*r+Zasyncio.windows_utilsr&r-r.rrrrÚ<module>sJ