Repository navigation
Expand file tree
/
Copy pathdevmode.po
More file actions
305 lines (247 loc) · 18.5 KB
/
Copy pathdevmode.po
File metadata and controls
305 lines (247 loc) · 18.5 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Danial Behzadi <dani.behzi@ubuntu.com>, 2025
# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
# Revisto <theRevisto@gmail.com>, 2025
# Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-14 15:52+0330\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.6\n"
msgid "Python Development Mode"
msgstr "حالت توسعه پایتون"
msgid "The Python Development Mode introduces additional runtime checks that are too expensive to be enabled by default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected."
msgstr "حالت توسعه پایتون، بررسیهای رانتایم اضافیای را ارائه میدهد که فعال بودن آنها بهطور پیشفرض بیش از حد پرهزینه است. اگر کد صحیح باشد، نباید پرجزئیاتتر از حالت پیشفرض باشد؛ هشدارهای جدید تنها زمانی نشان داده میشوند که مشکلی شناسایی شود."
msgid "It can be enabled using the :option:`-X dev <-X>` command line option or by setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``."
msgstr "میتوان آن را با استفاده از گزینهی خط فرمان :option:`-X dev <-X>` یا با تنظیم متغیر محیطی :envvar:`PYTHONDEVMODE` روی ``1`` فعال کرد."
msgid "See also :ref:`Python debug build <debug-build>`."
msgstr "همچنین ببینید :ref:`ساخت اشکالزدایی پایتون <debug-build>`."
msgid "Effects of the Python Development Mode"
msgstr "اثرات حالت توسعه پایتون"
msgid "Enabling the Python Development Mode is similar to the following command, but with additional effects described below::"
msgstr "فعالسازی حالت توسعه پایتون مشابه دستور زیر است، اما با اثرات اضافی که در زیر شرح داده شدهاند::"
msgid "PYTHONMALLOC=debug PYTHONASYNCIODEBUG=1 python -W default -X faulthandler"
msgstr "PYTHONMALLOC=debug PYTHONASYNCIODEBUG=1 python -W default -X faulthandler"
msgid "Effects of the Python Development Mode:"
msgstr "تأثیرات حالت توسعه پایتون:"
msgid "Add ``default`` :ref:`warning filter <describing-warning-filters>`. The following warnings are shown:"
msgstr "افزودن :ref:`فیلتر هشدار <describing-warning-filters>` ``default``. هشدارهای زیر نمایش داده میشوند:"
msgid ":exc:`DeprecationWarning`"
msgstr ":exc:`DeprecationWarning`"
msgid ":exc:`ImportWarning`"
msgstr ":exc:`ImportWarning`"
msgid ":exc:`PendingDeprecationWarning`"
msgstr ":exc:`PendingDeprecationWarning`"
msgid ":exc:`ResourceWarning`"
msgstr ":exc:`ResourceWarning`"
msgid "Normally, the above warnings are filtered by the default :ref:`warning filters <describing-warning-filters>`."
msgstr "معمولاً :ref:`فیلترهای هشدار <describing-warning-filters>` پیشفرض، هشدارهای بالا را فیلتر میکنند."
msgid "It behaves as if the :option:`-W default <-W>` command line option is used."
msgstr "اینگونه رفتار میکند که گویی گزینه خط فرمان :option:`-W default <-W>` استفاده شده است."
msgid "Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors."
msgstr "برای در نظر گرفتن هشدارها بهعنوان خطا، از گزینهی خط فرمان :option:`-W error <-W>` استفاده کنید یا متغیر محیطی :envvar:`PYTHONWARNINGS` را روی ``error`` تنظیم کنید."
msgid "Install debug hooks on memory allocators to check for:"
msgstr "برای بررسی، قلابهای اشکالزدایی را روی تخصیصدهندههای حافظه نصب کنید:"
msgid "Buffer underflow"
msgstr "زیرریز بافر (Buffer underflow)"
msgid "Buffer overflow"
msgstr "سرریز بافر"
msgid "Memory allocator API violation"
msgstr "نقض API تخصیصدهنده حافظه"
msgid "Unsafe usage of the GIL"
msgstr "استفادهی ناایمن از GIL"
msgid "See the :c:func:`PyMem_SetupDebugHooks` C function."
msgstr "به تابع C :c:func:`PyMem_SetupDebugHooks` مراجعه کنید."
msgid "It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to ``debug``."
msgstr "بهگونهای رفتار میکند که گویی متغیر محیطی :envvar:`PYTHONMALLOC` روی ``debug`` تنظیم شده است."
msgid "To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``."
msgstr "برای فعال کردن حالت توسعه پایتون بدون نصب قلابهای اشکالزدایی روی تخصیصدهندههای حافظه، متغیر محیطی :envvar:`PYTHONMALLOC` را روی ``default`` تنظیم کنید."
msgid "Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback on a crash."
msgstr "در زمان راهاندازی پایتون، :func:`faulthandler.enable` را فراخوانی کنید تا هندلرهایی برای سیگنالهای :const:`~signal.SIGSEGV`، :const:`~signal.SIGFPE`، :const:`~signal.SIGABRT`، :const:`~signal.SIGBUS` و :const:`~signal.SIGILL` نصب شوند که در صورت فروپاشی، ردگیری پشته پایتون را برونریزی میکنند."
msgid "It behaves as if the :option:`-X faulthandler <-X>` command line option is used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to ``1``."
msgstr "این بهگونهای رفتار میکند که گویی از گزینهی خط فرمان :option:`-X faulthandler <-X>` استفاده شده باشد یا متغیر محیطی :envvar:`PYTHONFAULTHANDLER` روی ``1`` تنظیم شده باشد."
msgid "Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them."
msgstr ":ref:`حالت اشکالزدایی asyncio <asyncio-debug-mode>` را فعال کنید. برای مثال، :mod:`asyncio` همروالهایی را که await نشدهاند بررسی میکند و آنها را ثبت میکند."
msgid "It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``."
msgstr "این بهگونهای رفتار میکند که گویی متغیر محیطی :envvar:`PYTHONASYNCIODEBUG` روی ``1`` تنظیم شده است."
msgid "Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`."
msgstr "آرگومانهای *encoding* و *errors* را برای عملیات کدگذاری و کدگشایی رشته بررسی کنید. مثالها: :func:`open`، :meth:`str.encode` و :meth:`bytes.decode`."
msgid "By default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored for empty strings."
msgstr "بهطور پیشفرض، برای بهترین عملکرد، آرگومان *errors* فقط در اولین خطای کدگذاری/کدگشایی بررسی میشود و آرگومان *encoding* گاهی برای رشتههای خالی نادیده گرفته میشود."
msgid "The :class:`io.IOBase` destructor logs ``close()`` exceptions."
msgstr "تخریبکنندهی :class:`io.IOBase` استثناهای ``close()`` را ثبت میکند."
msgid "Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``."
msgstr "ویژگی :attr:`~sys.flags.dev_mode` از :data:`sys.flags` را روی ``True`` تنظیم کنید."
msgid "The Python Development Mode does not enable the :mod:`tracemalloc` module by default, because the overhead cost (to performance and memory) would be too large. Enabling the :mod:`tracemalloc` module provides additional information on the origin of some errors. For example, :exc:`ResourceWarning` logs the traceback where the resource was allocated, and a buffer overflow error logs the traceback where the memory block was allocated."
msgstr "حالت توسعه پایتون بهطور پیشفرض ماژول :mod:`tracemalloc` را فعال نمیکند، زیرا هزینه سربار (برای عملکرد و حافظه) بیش از حد زیاد خواهد بود. فعالسازی ماژول :mod:`tracemalloc` اطلاعات بیشتری درباره منشأ برخی خطاها فراهم میکند. برای مثال، :exc:`ResourceWarning` ردگیری پشته محل تخصیص منبع را ثبت میکند، و یک خطای سرریز بافر ردگیری پشته محل تخصیص بلوک حافظه را ثبت میکند."
msgid "The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :const:`__debug__` to ``False``."
msgstr "حالت توسعه پایتون مانع از آن نمیشود که گزینه خط فرمان :option:`-O` دستورهای :keyword:`assert` را حذف کند یا :const:`__debug__` را روی ``False`` تنظیم کند."
msgid "The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`."
msgstr "حالت توسعه پایتون را فقط میتوان در هنگام راهاندازی پایتون فعال کرد. مقدار آن را میتوان از :data:`sys.flags.dev_mode <sys.flags>` خواند."
msgid "The :class:`io.IOBase` destructor now logs ``close()`` exceptions."
msgstr "تخریبکنندهی :class:`io.IOBase` اکنون استثناهای ``close()`` را ثبت میکند."
msgid "The *encoding* and *errors* arguments are now checked for string encoding and decoding operations."
msgstr "آرگومانهای *encoding* و *errors* اکنون برای عملیات کدگذاری و کدگشایی رشته بررسی میشوند."
msgid "ResourceWarning Example"
msgstr "مثال ResourceWarning"
msgid "Example of a script counting the number of lines of the text file specified in the command line::"
msgstr "مثالی از یک اسکریپت برای شمارش تعداد سطرهای پرونده متنی مشخصشده در خط فرمان::"
msgid ""
"import sys\n"
"\n"
"def main():\n"
" fp = open(sys.argv[1])\n"
" nlines = len(fp.readlines())\n"
" print(nlines)\n"
" # The file is closed implicitly\n"
"\n"
"if __name__ == \"__main__\":\n"
" main()"
msgstr ""
"import sys\n"
"\n"
"def main():\n"
" fp = open(sys.argv[1])\n"
" nlines = len(fp.readlines())\n"
" print(nlines)\n"
" # The file is closed implicitly\n"
"\n"
"if __name__ == \"__main__\":\n"
" main()"
msgid "The script does not close the file explicitly. By default, Python does not emit any warning. Example using README.txt, which has 269 lines:"
msgstr "اسکریپت پرونده را بهصراحت نمیبندد. بهطور پیشفرض، پایتون هیچ هشداری نشان نمیدهند. مثالی با استفاده از README.txt که ۲۶۹ خط دارد:"
msgid ""
"$ python script.py README.txt\n"
"269"
msgstr ""
"$ python script.py README.txt\n"
"269"
msgid "Enabling the Python Development Mode displays a :exc:`ResourceWarning` warning:"
msgstr "فعالسازی حالت توسعه پایتون یک هشدار :exc:`ResourceWarning` را نمایش میدهد:"
msgid ""
"$ python -X dev script.py README.txt\n"
"269\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>\n"
" main()\n"
"ResourceWarning: Enable tracemalloc to get the object allocation traceback"
msgstr ""
"$ python -X dev script.py README.txt\n"
"269\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>\n"
" main()\n"
"ResourceWarning: Enable tracemalloc to get the object allocation traceback"
msgid "In addition, enabling :mod:`tracemalloc` shows the line where the file was opened:"
msgstr "علاوه بر این، فعالسازی :mod:`tracemalloc` سطری را نشان میدهد که پرونده در آن باز شده است:"
msgid ""
"$ python -X dev -X tracemalloc=5 script.py README.rst\n"
"269\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>\n"
" main()\n"
"Object allocated at (most recent call last):\n"
" File \"script.py\", lineno 10\n"
" main()\n"
" File \"script.py\", lineno 4\n"
" fp = open(sys.argv[1])"
msgstr ""
"$ python -X dev -X tracemalloc=5 script.py README.rst\n"
"269\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>\n"
" main()\n"
"Object allocated at (most recent call last):\n"
" File \"script.py\", lineno 10\n"
" main()\n"
" File \"script.py\", lineno 4\n"
" fp = open(sys.argv[1])"
msgid "The fix is to close explicitly the file. Example using a context manager::"
msgstr "راهحل این است که پرونده را بهصورت صریح ببندید. مثال با استفاده از یک مدیر زمینه::"
msgid ""
"def main():\n"
" # Close the file explicitly when exiting the with block\n"
" with open(sys.argv[1]) as fp:\n"
" nlines = len(fp.readlines())\n"
" print(nlines)"
msgstr ""
"def main():\n"
" # Close the file explicitly when exiting the with block\n"
" with open(sys.argv[1]) as fp:\n"
" nlines = len(fp.readlines())\n"
" print(nlines)"
msgid "Not closing a resource explicitly can leave a resource open for way longer than expected; it can cause severe issues upon exiting Python. It is bad in CPython, but it is even worse in PyPy. Closing resources explicitly makes an application more deterministic and more reliable."
msgstr "نبستن یک منبع بهطور صریح میتواند باعث شود آن منبع بسیار بیشتر از حد انتظار باز بماند؛ این موضوع میتواند هنگام خروج از Python مشکلات شدیدی ایجاد کند. این موضوع در CPython بد است، اما در PyPy حتی بدتر است. بستن منابع بهطور صریح، یک برنامه را قطعیتر و قابلاعتمادتر میکند."
msgid "Bad file descriptor error example"
msgstr "مثال خطای توصیفگر پرونده نامعتبر"
msgid "Script displaying the first line of itself::"
msgstr "اسکریپتی که خط نخست خود را نمایش میدهد::"
msgid ""
"import os\n"
"\n"
"def main():\n"
" fp = open(__file__)\n"
" firstline = fp.readline()\n"
" print(firstline.rstrip())\n"
" os.close(fp.fileno())\n"
" # The file is closed implicitly\n"
"\n"
"main()"
msgstr ""
"import os\n"
"\n"
"def main():\n"
" fp = open(__file__)\n"
" firstline = fp.readline()\n"
" print(firstline.rstrip())\n"
" os.close(fp.fileno())\n"
" # The file is closed implicitly\n"
"\n"
"main()"
msgid "By default, Python does not emit any warning:"
msgstr "بهطور پیشفرض، پایتون هیچ هشداری نشان نمیدهد:"
msgid ""
"$ python script.py\n"
"import os"
msgstr ""
"$ python script.py\n"
"import os"
msgid "The Python Development Mode shows a :exc:`ResourceWarning` and logs a \"Bad file descriptor\" error when finalizing the file object:"
msgstr "حالت توسعه پایتون هنگام نهاییسازی شیء پرونده، یک :exc:`ResourceWarning` را نمایش میدهد و خطای «Bad file descriptor» را ثبت میکند:"
msgid ""
"$ python -X dev script.py\n"
"import os\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>\n"
" main()\n"
"ResourceWarning: Enable tracemalloc to get the object allocation traceback\n"
"Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>\n"
"Traceback (most recent call last):\n"
" File \"script.py\", line 10, in <module>\n"
" main()\n"
"OSError: [Errno 9] Bad file descriptor"
msgstr ""
"$ python -X dev script.py\n"
"import os\n"
"script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>\n"
" main()\n"
"ResourceWarning: Enable tracemalloc to get the object allocation traceback\n"
"Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>\n"
"Traceback (most recent call last):\n"
" File \"script.py\", line 10, in <module>\n"
" main()\n"
"OSError: [Errno 9] Bad file descriptor"
msgid "``os.close(fp.fileno())`` closes the file descriptor. When the file object finalizer tries to close the file descriptor again, it fails with the ``Bad file descriptor`` error. A file descriptor must be closed only once. In the worst case scenario, closing it twice can lead to a crash (see :issue:`18748` for an example)."
msgstr "``os.close(fp.fileno())`` توصیفگر پرونده را میبندد. هنگامی که نهاییساز شیء پرونده تلاش میکند توصیفگر پرونده را دوباره ببندد، با خطای ``Bad file descriptor`` مواجه میشود. توصیفگر پرونده باید تنها یک بار بسته شود. در بدترین حالت، دو بار بستن آن میتواند منجر به فروپاشی شود (برای نمونه :issue:`18748` را ببینید)."
msgid "The fix is to remove the ``os.close(fp.fileno())`` line, or open the file with ``closefd=False``."
msgstr "راهحل، حذف خط ``os.close(fp.fileno())`` یا باز کردن پرونده با ``closefd=False`` است."