Skip to content

Commit bb25ab3

Browse files
[po] auto sync
1 parent 0b8c510 commit bb25ab3

9 files changed

Lines changed: 173 additions & 97 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "0.18%", "updated_at": "2025-08-27T15:22:06Z"}
1+
{"translation": "0.18%", "updated_at": "2025-08-29T15:19:04Z"}

c-api/init.mo

-28 Bytes
Binary file not shown.

c-api/init.po

Lines changed: 99 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
7+
# python-doc bot, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.14\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-06-27 14:20+0000\n"
15-
"PO-Revision-Date: 2025-07-18 18:48+0000\n"
16-
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
14+
"POT-Creation-Date: 2025-08-29 14:17+0000\n"
15+
"PO-Revision-Date: 2025-08-02 17:33+0000\n"
16+
"Last-Translator: python-doc bot, 2025\n"
1717
"Language-Team: Russian (https://app.transifex.com/python-doc/teams/5390/ru/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -2959,38 +2959,68 @@ msgid ""
29592959
"issue a fatal error."
29602960
msgstr ""
29612961

2962-
#: ../../c-api/init.rst:2447
2962+
#: ../../c-api/init.rst:2446
2963+
msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise."
2964+
msgstr ""
2965+
2966+
#: ../../c-api/init.rst:2450
2967+
msgid ""
2968+
"This function is intended for use in assertions and debugging only and "
2969+
"should not be used to make concurrency control decisions, as the lock state "
2970+
"may change immediately after the check."
2971+
msgstr ""
2972+
2973+
#: ../../c-api/init.rst:2459
29632974
msgid "Python Critical Section API"
29642975
msgstr ""
29652976

2966-
#: ../../c-api/init.rst:2449
2977+
#: ../../c-api/init.rst:2461
29672978
msgid ""
29682979
"The critical section API provides a deadlock avoidance layer on top of per-"
29692980
"object locks for :term:`free-threaded <free threading>` CPython. They are "
29702981
"intended to replace reliance on the :term:`global interpreter lock`, and are"
29712982
" no-ops in versions of Python with the global interpreter lock."
29722983
msgstr ""
29732984

2974-
#: ../../c-api/init.rst:2454
2985+
#: ../../c-api/init.rst:2466
2986+
msgid ""
2987+
"Critical sections are intended to be used for custom types implemented in "
2988+
"C-API extensions. They should generally not be used with built-in types like"
2989+
" :class:`list` and :class:`dict` because their public C-APIs already use "
2990+
"critical sections internally, with the notable exception of "
2991+
":c:func:`PyDict_Next`, which requires critical section to be acquired "
2992+
"externally."
2993+
msgstr ""
2994+
2995+
#: ../../c-api/init.rst:2473
29752996
msgid ""
29762997
"Critical sections avoid deadlocks by implicitly suspending active critical "
2977-
"sections and releasing the locks during calls to "
2978-
":c:func:`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, "
2979-
"the most recent critical section is resumed, and its locks reacquired. This"
2980-
" means the critical section API provides weaker guarantees than traditional "
2981-
"locks -- they are useful because their behavior is similar to the "
2982-
":term:`GIL`."
2998+
"sections, hence, they do not provide exclusive access such as provided by "
2999+
"traditional locks like :c:type:`PyMutex`. When a critical section is "
3000+
"started, the per-object lock for the object is acquired. If the code "
3001+
"executed inside the critical section calls C-API functions then it can "
3002+
"suspend the critical section thereby releasing the per-object lock, so other"
3003+
" threads can acquire the per-object lock for the same object."
29833004
msgstr ""
29843005

2985-
#: ../../c-api/init.rst:2461
3006+
#: ../../c-api/init.rst:2481
3007+
msgid ""
3008+
"Variants that accept :c:type:`PyMutex` pointers rather than Python objects "
3009+
"are also available. Use these variants to start a critical section in a "
3010+
"situation where there is no :c:type:`PyObject` -- for example, when working "
3011+
"with a C type that does not extend or wrap :c:type:`PyObject` but still "
3012+
"needs to call into the C API in a manner that might lead to deadlocks."
3013+
msgstr ""
3014+
3015+
#: ../../c-api/init.rst:2487
29863016
msgid ""
29873017
"The functions and structs used by the macros are exposed for cases where C "
29883018
"macros are not available. They should only be used as in the given macro "
29893019
"expansions. Note that the sizes and contents of the structures may change in"
29903020
" future Python versions."
29913021
msgstr ""
29923022

2993-
#: ../../c-api/init.rst:2468
3023+
#: ../../c-api/init.rst:2494
29943024
msgid ""
29953025
"Operations that need to lock two objects at once must use "
29963026
":c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical "
@@ -2999,11 +3029,11 @@ msgid ""
29993029
"a way to lock more than two objects at once."
30003030
msgstr ""
30013031

3002-
#: ../../c-api/init.rst:2474
3032+
#: ../../c-api/init.rst:2500
30033033
msgid "Example usage::"
30043034
msgstr ""
30053035

3006-
#: ../../c-api/init.rst:2476
3036+
#: ../../c-api/init.rst:2502
30073037
msgid ""
30083038
"static PyObject *\n"
30093039
"set_field(MyObject *self, PyObject *value)\n"
@@ -3015,7 +3045,7 @@ msgid ""
30153045
"}"
30163046
msgstr ""
30173047

3018-
#: ../../c-api/init.rst:2485
3048+
#: ../../c-api/init.rst:2511
30193049
msgid ""
30203050
"In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which"
30213051
" can call arbitrary code through an object's deallocation function. The "
@@ -3025,61 +3055,100 @@ msgid ""
30253055
":c:func:`PyEval_SaveThread`."
30263056
msgstr ""
30273057

3028-
#: ../../c-api/init.rst:2493
3058+
#: ../../c-api/init.rst:2519
30293059
msgid ""
30303060
"Acquires the per-object lock for the object *op* and begins a critical "
30313061
"section."
30323062
msgstr ""
30333063

3034-
#: ../../c-api/init.rst:2496 ../../c-api/init.rst:2510
3035-
#: ../../c-api/init.rst:2525 ../../c-api/init.rst:2539
3064+
#: ../../c-api/init.rst:2522 ../../c-api/init.rst:2536
3065+
#: ../../c-api/init.rst:2553 ../../c-api/init.rst:2568
3066+
#: ../../c-api/init.rst:2582 ../../c-api/init.rst:2599
30363067
msgid "In the free-threaded build, this macro expands to::"
30373068
msgstr ""
30383069

3039-
#: ../../c-api/init.rst:2498
3070+
#: ../../c-api/init.rst:2524
30403071
msgid ""
30413072
"{\n"
30423073
" PyCriticalSection _py_cs;\n"
30433074
" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))"
30443075
msgstr ""
30453076

3046-
#: ../../c-api/init.rst:2502 ../../c-api/init.rst:2531
3077+
#: ../../c-api/init.rst:2528 ../../c-api/init.rst:2574
30473078
msgid "In the default build, this macro expands to ``{``."
30483079
msgstr ""
30493080

3050-
#: ../../c-api/init.rst:2508
3081+
#: ../../c-api/init.rst:2534
3082+
msgid "Locks the mutex *m* and begins a critical section."
3083+
msgstr ""
3084+
3085+
#: ../../c-api/init.rst:2538
3086+
msgid ""
3087+
"{\n"
3088+
" PyCriticalSection _py_cs;\n"
3089+
" PyCriticalSection_BeginMutex(&_py_cs, m)"
3090+
msgstr ""
3091+
3092+
#: ../../c-api/init.rst:2542
3093+
msgid ""
3094+
"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for "
3095+
"the argument of the macro - it must be a :c:type:`PyMutex` pointer."
3096+
msgstr ""
3097+
3098+
#: ../../c-api/init.rst:2545 ../../c-api/init.rst:2591
3099+
msgid "On the default build, this macro expands to ``{``."
3100+
msgstr ""
3101+
3102+
#: ../../c-api/init.rst:2551
30513103
msgid "Ends the critical section and releases the per-object lock."
30523104
msgstr ""
30533105

3054-
#: ../../c-api/init.rst:2512
3106+
#: ../../c-api/init.rst:2555
30553107
msgid ""
30563108
" PyCriticalSection_End(&_py_cs);\n"
30573109
"}"
30583110
msgstr ""
30593111

3060-
#: ../../c-api/init.rst:2515 ../../c-api/init.rst:2544
3112+
#: ../../c-api/init.rst:2558 ../../c-api/init.rst:2604
30613113
msgid "In the default build, this macro expands to ``}``."
30623114
msgstr ""
30633115

3064-
#: ../../c-api/init.rst:2521
3116+
#: ../../c-api/init.rst:2564
30653117
msgid ""
30663118
"Acquires the per-objects locks for the objects *a* and *b* and begins a "
30673119
"critical section. The locks are acquired in a consistent order (lowest "
30683120
"address first) to avoid lock ordering deadlocks."
30693121
msgstr ""
30703122

3071-
#: ../../c-api/init.rst:2527
3123+
#: ../../c-api/init.rst:2570
30723124
msgid ""
30733125
"{\n"
30743126
" PyCriticalSection2 _py_cs2;\n"
30753127
" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
30763128
msgstr ""
30773129

3078-
#: ../../c-api/init.rst:2537
3130+
#: ../../c-api/init.rst:2580
3131+
msgid "Locks the mutexes *m1* and *m2* and begins a critical section."
3132+
msgstr ""
3133+
3134+
#: ../../c-api/init.rst:2584
3135+
msgid ""
3136+
"{\n"
3137+
" PyCriticalSection2 _py_cs2;\n"
3138+
" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)"
3139+
msgstr ""
3140+
3141+
#: ../../c-api/init.rst:2588
3142+
msgid ""
3143+
"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for"
3144+
" the arguments of the macro - they must be :c:type:`PyMutex` pointers."
3145+
msgstr ""
3146+
3147+
#: ../../c-api/init.rst:2597
30793148
msgid "Ends the critical section and releases the per-object locks."
30803149
msgstr ""
30813150

3082-
#: ../../c-api/init.rst:2541
3151+
#: ../../c-api/init.rst:2601
30833152
msgid ""
30843153
" PyCriticalSection2_End(&_py_cs2);\n"
30853154
"}"

extending/extending.mo

-28 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)