11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Transifex Bot <>, 2023
7+ # Stan U, 2024
88#
99#, fuzzy
1010msgid ""
1111msgstr ""
12- "Project-Id-Version : Python 3.11 \n "
12+ "Project-Id-Version : Python 3.13 \n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-05-19 14:13 +0000\n "
14+ "POT-Creation-Date : 2024-11-22 14:17 +0000\n "
1515"PO-Revision-Date : 2021-06-28 00:54+0000\n "
16- "Last-Translator : Transifex Bot <>, 2023 \n "
16+ "Last-Translator : Stan U, 2024 \n "
1717"Language-Team : Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n "
1818"MIME-Version : 1.0\n "
1919"Content-Type : text/plain; charset=UTF-8\n "
@@ -63,10 +63,13 @@ msgstr ""
6363
6464msgid ""
6565"setting the log level of the :ref:`asyncio logger <asyncio-logger>` to :py:"
66- "data :`logging.DEBUG`, for example the following snippet of code can be run "
66+ "const :`logging.DEBUG`, for example the following snippet of code can be run "
6767"at startup of the application::"
6868msgstr ""
6969
70+ msgid "logging.basicConfig(level=logging.DEBUG)"
71+ msgstr ""
72+
7073msgid ""
7174"configuring the :mod:`warnings` module to display :exc:`ResourceWarning` "
7275"warnings. One way of doing that is by using the :option:`-W` ``default`` "
@@ -115,22 +118,37 @@ msgid ""
115118"call_soon_threadsafe` method should be used. Example::"
116119msgstr ""
117120
121+ msgid "loop.call_soon_threadsafe(callback, *args)"
122+ msgstr ""
123+
118124msgid ""
119125"Almost all asyncio objects are not thread safe, which is typically not a "
120126"problem unless there is code that works with them from outside of a Task or "
121127"a callback. If there's a need for such code to call a low-level asyncio "
122128"API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::"
123129msgstr ""
124130
131+ msgid "loop.call_soon_threadsafe(fut.cancel)"
132+ msgstr ""
133+
125134msgid ""
126135"To schedule a coroutine object from a different OS thread, the :func:"
127136"`run_coroutine_threadsafe` function should be used. It returns a :class:"
128137"`concurrent.futures.Future` to access the result::"
129138msgstr ""
130139
131140msgid ""
132- "To handle signals and to execute subprocesses, the event loop must be run in "
133- "the main thread."
141+ "async def coro_func():\n"
142+ " return await asyncio.sleep(1, 42)\n"
143+ "\n"
144+ "# Later in another OS thread:\n"
145+ "\n"
146+ "future = asyncio.run_coroutine_threadsafe(coro_func(), loop)\n"
147+ "# Wait for the result:\n"
148+ "result = future.result()"
149+ msgstr ""
150+
151+ msgid "To handle signals the event loop must be run in the main thread."
134152msgstr ""
135153
136154msgid ""
@@ -168,18 +186,21 @@ msgid ""
168186msgstr ""
169187
170188msgid "Logging"
171- msgstr ""
189+ msgstr "Logowanie "
172190
173191msgid ""
174192"asyncio uses the :mod:`logging` module and all logging is performed via the "
175193"``\" asyncio\" `` logger."
176194msgstr ""
177195
178196msgid ""
179- "The default log level is :py:data :`logging.INFO`, which can be easily "
197+ "The default log level is :py:const :`logging.INFO`, which can be easily "
180198"adjusted::"
181199msgstr ""
182200
201+ msgid "logging.getLogger(\" asyncio\" ).setLevel(logging.WARNING)"
202+ msgstr ""
203+
183204msgid ""
184205"Network logging can block the event loop. It is recommended to use a "
185206"separate thread for handling logs or use non-blocking IO. For example, see :"
@@ -195,17 +216,52 @@ msgid ""
195216"`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::"
196217msgstr ""
197218
219+ msgid ""
220+ "import asyncio\n"
221+ "\n"
222+ "async def test():\n"
223+ " print(\" never scheduled\" )\n"
224+ "\n"
225+ "async def main():\n"
226+ " test()\n"
227+ "\n"
228+ "asyncio.run(main())"
229+ msgstr ""
230+
198231msgid "Output::"
199232msgstr ""
200233
234+ msgid ""
235+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
236+ " test()"
237+ msgstr ""
238+
201239msgid "Output in debug mode::"
202240msgstr ""
203241
242+ msgid ""
243+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
244+ "Coroutine created at (most recent call last)\n"
245+ " File \" ../t.py\" , line 9, in <module>\n"
246+ " asyncio.run(main(), debug=True)\n"
247+ "\n"
248+ " < .. >\n"
249+ "\n"
250+ " File \" ../t.py\" , line 7, in main\n"
251+ " test()\n"
252+ " test()"
253+ msgstr ""
254+
204255msgid ""
205256"The usual fix is to either await the coroutine or call the :meth:`asyncio."
206257"create_task` function::"
207258msgstr ""
208259
260+ msgid ""
261+ "async def main():\n"
262+ " await test()"
263+ msgstr ""
264+
209265msgid "Detect never-retrieved exceptions"
210266msgstr ""
211267
@@ -219,7 +275,50 @@ msgstr ""
219275msgid "Example of an unhandled exception::"
220276msgstr ""
221277
278+ msgid ""
279+ "import asyncio\n"
280+ "\n"
281+ "async def bug():\n"
282+ " raise Exception(\" not consumed\" )\n"
283+ "\n"
284+ "async def main():\n"
285+ " asyncio.create_task(bug())\n"
286+ "\n"
287+ "asyncio.run(main())"
288+ msgstr ""
289+
290+ msgid ""
291+ "Task exception was never retrieved\n"
292+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
293+ " exception=Exception('not consumed')>\n"
294+ "\n"
295+ "Traceback (most recent call last):\n"
296+ " File \" test.py\" , line 4, in bug\n"
297+ " raise Exception(\" not consumed\" )\n"
298+ "Exception: not consumed"
299+ msgstr ""
300+
222301msgid ""
223302":ref:`Enable the debug mode <asyncio-debug-mode>` to get the traceback where "
224303"the task was created::"
225304msgstr ""
305+
306+ msgid "asyncio.run(main(), debug=True)"
307+ msgstr ""
308+
309+ msgid ""
310+ "Task exception was never retrieved\n"
311+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
312+ " exception=Exception('not consumed') created at asyncio/tasks.py:321>\n"
313+ "\n"
314+ "source_traceback: Object created at (most recent call last):\n"
315+ " File \" ../t.py\" , line 9, in <module>\n"
316+ " asyncio.run(main(), debug=True)\n"
317+ "\n"
318+ "< .. >\n"
319+ "\n"
320+ "Traceback (most recent call last):\n"
321+ " File \" ../t.py\" , line 4, in bug\n"
322+ " raise Exception(\" not consumed\" )\n"
323+ "Exception: not consumed"
324+ msgstr ""
0 commit comments