88msgstr ""
99"Project-Id-Version : Python 3.11\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2022-12-07 00:17 +0000\n "
11+ "POT-Creation-Date : 2023-01-11 00:15 +0000\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1414"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -145,47 +145,47 @@ msgstr ""
145145msgid "On Windows, :class:`ProactorEventLoop` is now used by default."
146146msgstr ""
147147
148- #: ../../library/asyncio-policy.rst:115
148+ #: ../../library/asyncio-policy.rst:116
149149msgid ""
150- ":meth:`get_event_loop` now emits a :exc:`DeprecationWarning` if there is no "
151- "current event loop set and a new event loop has been implicitly created. In "
152- "Python 3.12 it will be an error."
150+ "In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc: "
151+ "`DeprecationWarning` if there is no running event loop and no current loop "
152+ "is set. In some future Python release this will become an error."
153153msgstr ""
154154
155- #: ../../library/asyncio-policy.rst:123
155+ #: ../../library/asyncio-policy.rst:124
156156msgid ""
157157"An alternative event loop policy that uses the :class:`SelectorEventLoop` "
158158"event loop implementation."
159159msgstr ""
160160
161- #: ../../library/asyncio-policy.rst:126 ../../library/asyncio-policy.rst:134
161+ #: ../../library/asyncio-policy.rst:127 ../../library/asyncio-policy.rst:135
162162msgid ":ref:`Availability <availability>`: Windows."
163163msgstr ":ref:`適用 <availability>`:Windows。"
164164
165- #: ../../library/asyncio-policy.rst:131
165+ #: ../../library/asyncio-policy.rst:132
166166msgid ""
167167"An alternative event loop policy that uses the :class:`ProactorEventLoop` "
168168"event loop implementation."
169169msgstr ""
170170
171- #: ../../library/asyncio-policy.rst:140
171+ #: ../../library/asyncio-policy.rst:141
172172msgid "Process Watchers"
173173msgstr ""
174174
175- #: ../../library/asyncio-policy.rst:142
175+ #: ../../library/asyncio-policy.rst:143
176176msgid ""
177177"A process watcher allows customization of how an event loop monitors child "
178178"processes on Unix. Specifically, the event loop needs to know when a child "
179179"process has exited."
180180msgstr ""
181181
182- #: ../../library/asyncio-policy.rst:146
182+ #: ../../library/asyncio-policy.rst:147
183183msgid ""
184184"In asyncio, child processes are created with :func:`create_subprocess_exec` "
185185"and :meth:`loop.subprocess_exec` functions."
186186msgstr ""
187187
188- #: ../../library/asyncio-policy.rst:150
188+ #: ../../library/asyncio-policy.rst:151
189189msgid ""
190190"asyncio defines the :class:`AbstractChildWatcher` abstract base class, which "
191191"child watchers should implement, and has four different implementations: :"
@@ -194,176 +194,176 @@ msgid ""
194194"`FastChildWatcher`."
195195msgstr ""
196196
197- #: ../../library/asyncio-policy.rst:156
197+ #: ../../library/asyncio-policy.rst:157
198198msgid ""
199199"See also the :ref:`Subprocess and Threads <asyncio-subprocess-threads>` "
200200"section."
201201msgstr ""
202202
203- #: ../../library/asyncio-policy.rst:159
203+ #: ../../library/asyncio-policy.rst:160
204204msgid ""
205205"The following two functions can be used to customize the child process "
206206"watcher implementation used by the asyncio event loop:"
207207msgstr ""
208208
209- #: ../../library/asyncio-policy.rst:164
209+ #: ../../library/asyncio-policy.rst:165
210210msgid "Return the current child watcher for the current policy."
211211msgstr ""
212212
213- #: ../../library/asyncio-policy.rst:168
213+ #: ../../library/asyncio-policy.rst:169
214214msgid ""
215215"Set the current child watcher to *watcher* for the current policy. "
216216"*watcher* must implement methods defined in the :class:"
217217"`AbstractChildWatcher` base class."
218218msgstr ""
219219
220- #: ../../library/asyncio-policy.rst:173
220+ #: ../../library/asyncio-policy.rst:174
221221msgid ""
222222"Third-party event loops implementations might not support custom child "
223223"watchers. For such event loops, using :func:`set_child_watcher` might be "
224224"prohibited or have no effect."
225225msgstr ""
226226
227- #: ../../library/asyncio-policy.rst:181
227+ #: ../../library/asyncio-policy.rst:182
228228msgid "Register a new child handler."
229229msgstr ""
230230
231- #: ../../library/asyncio-policy.rst:183
231+ #: ../../library/asyncio-policy.rst:184
232232msgid ""
233233"Arrange for ``callback(pid, returncode, *args)`` to be called when a process "
234234"with PID equal to *pid* terminates. Specifying another callback for the "
235235"same process replaces the previous handler."
236236msgstr ""
237237
238- #: ../../library/asyncio-policy.rst:188
238+ #: ../../library/asyncio-policy.rst:189
239239msgid "The *callback* callable must be thread-safe."
240240msgstr ""
241241
242- #: ../../library/asyncio-policy.rst:192
242+ #: ../../library/asyncio-policy.rst:193
243243msgid "Removes the handler for process with PID equal to *pid*."
244244msgstr ""
245245
246- #: ../../library/asyncio-policy.rst:194
246+ #: ../../library/asyncio-policy.rst:195
247247msgid ""
248248"The function returns ``True`` if the handler was successfully removed, "
249249"``False`` if there was nothing to remove."
250250msgstr ""
251251
252- #: ../../library/asyncio-policy.rst:199
252+ #: ../../library/asyncio-policy.rst:200
253253msgid "Attach the watcher to an event loop."
254254msgstr ""
255255
256- #: ../../library/asyncio-policy.rst:201
256+ #: ../../library/asyncio-policy.rst:202
257257msgid ""
258258"If the watcher was previously attached to an event loop, then it is first "
259259"detached before attaching to the new loop."
260260msgstr ""
261261
262- #: ../../library/asyncio-policy.rst:204
262+ #: ../../library/asyncio-policy.rst:205
263263msgid "Note: loop may be ``None``."
264264msgstr ""
265265
266- #: ../../library/asyncio-policy.rst:208
266+ #: ../../library/asyncio-policy.rst:209
267267msgid "Return ``True`` if the watcher is ready to use."
268268msgstr ""
269269
270- #: ../../library/asyncio-policy.rst:210
270+ #: ../../library/asyncio-policy.rst:211
271271msgid ""
272272"Spawning a subprocess with *inactive* current child watcher raises :exc:"
273273"`RuntimeError`."
274274msgstr ""
275275
276- #: ../../library/asyncio-policy.rst:217
276+ #: ../../library/asyncio-policy.rst:218
277277msgid "Close the watcher."
278278msgstr ""
279279
280- #: ../../library/asyncio-policy.rst:219
280+ #: ../../library/asyncio-policy.rst:220
281281msgid ""
282282"This method has to be called to ensure that underlying resources are cleaned-"
283283"up."
284284msgstr ""
285285
286- #: ../../library/asyncio-policy.rst:224
286+ #: ../../library/asyncio-policy.rst:225
287287msgid ""
288288"This implementation starts a new waiting thread for every subprocess spawn."
289289msgstr ""
290290
291- #: ../../library/asyncio-policy.rst:226
291+ #: ../../library/asyncio-policy.rst:227
292292msgid ""
293293"It works reliably even when the asyncio event loop is run in a non-main OS "
294294"thread."
295295msgstr ""
296296
297- #: ../../library/asyncio-policy.rst:228
297+ #: ../../library/asyncio-policy.rst:229
298298msgid ""
299299"There is no noticeable overhead when handling a big number of children "
300300"(*O(1)* each time a child terminates), but starting a thread per process "
301301"requires extra memory."
302302msgstr ""
303303
304- #: ../../library/asyncio-policy.rst:231
304+ #: ../../library/asyncio-policy.rst:232
305305msgid "This watcher is used by default."
306306msgstr ""
307307
308- #: ../../library/asyncio-policy.rst:237
308+ #: ../../library/asyncio-policy.rst:238
309309msgid ""
310310"This implementation registers a :py:data:`SIGCHLD` signal handler on "
311311"instantiation. That can break third-party code that installs a custom "
312312"handler for :py:data:`SIGCHLD` signal."
313313msgstr ""
314314
315- #: ../../library/asyncio-policy.rst:241 ../../library/asyncio-policy.rst:259
315+ #: ../../library/asyncio-policy.rst:242 ../../library/asyncio-policy.rst:260
316316msgid ""
317317"The watcher avoids disrupting other code spawning processes by polling every "
318318"process explicitly on a :py:data:`SIGCHLD` signal."
319319msgstr ""
320320
321- #: ../../library/asyncio-policy.rst:244
321+ #: ../../library/asyncio-policy.rst:245
322322msgid ""
323323"There is no limitation for running subprocesses from different threads once "
324324"the watcher is installed."
325325msgstr ""
326326
327- #: ../../library/asyncio-policy.rst:247
327+ #: ../../library/asyncio-policy.rst:248
328328msgid ""
329329"The solution is safe but it has a significant overhead when handling a big "
330330"number of processes (*O(n)* each time a :py:data:`SIGCHLD` is received)."
331331msgstr ""
332332
333- #: ../../library/asyncio-policy.rst:255
333+ #: ../../library/asyncio-policy.rst:256
334334msgid ""
335335"This implementation uses active event loop from the main thread to handle :"
336336"py:data:`SIGCHLD` signal. If the main thread has no running event loop "
337337"another thread cannot spawn a subprocess (:exc:`RuntimeError` is raised)."
338338msgstr ""
339339
340- #: ../../library/asyncio-policy.rst:262
340+ #: ../../library/asyncio-policy.rst:263
341341msgid ""
342342"This solution is as safe as :class:`MultiLoopChildWatcher` and has the same "
343343"*O(N)* complexity but requires a running event loop in the main thread to "
344344"work."
345345msgstr ""
346346
347- #: ../../library/asyncio-policy.rst:267
347+ #: ../../library/asyncio-policy.rst:268
348348msgid ""
349349"This implementation reaps every terminated processes by calling ``os."
350350"waitpid(-1)`` directly, possibly breaking other code spawning processes and "
351351"waiting for their termination."
352352msgstr ""
353353
354- #: ../../library/asyncio-policy.rst:271
354+ #: ../../library/asyncio-policy.rst:272
355355msgid ""
356356"There is no noticeable overhead when handling a big number of children "
357357"(*O(1)* each time a child terminates)."
358358msgstr ""
359359
360- #: ../../library/asyncio-policy.rst:274
360+ #: ../../library/asyncio-policy.rst:275
361361msgid ""
362362"This solution requires a running event loop in the main thread to work, as :"
363363"class:`SafeChildWatcher`."
364364msgstr ""
365365
366- #: ../../library/asyncio-policy.rst:279
366+ #: ../../library/asyncio-policy.rst:280
367367msgid ""
368368"This implementation polls process file descriptors (pidfds) to await child "
369369"process termination. In some respects, :class:`PidfdChildWatcher` is a "
@@ -374,11 +374,11 @@ msgid ""
374374"only work on recent (5.3+) kernels."
375375msgstr ""
376376
377- #: ../../library/asyncio-policy.rst:293
377+ #: ../../library/asyncio-policy.rst:294
378378msgid "Custom Policies"
379379msgstr ""
380380
381- #: ../../library/asyncio-policy.rst:295
381+ #: ../../library/asyncio-policy.rst:296
382382msgid ""
383383"To implement a new event loop policy, it is recommended to subclass :class:"
384384"`DefaultEventLoopPolicy` and override the methods for which custom behavior "
0 commit comments