@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.14\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2025-10-09 14:15 +0000\n "
14+ "POT-Creation-Date : 2026-05-01 14:49 +0000\n "
1515"PO-Revision-Date : 2025-09-16 00:01+0000\n "
1616"Last-Translator : python-doc bot, 2025\n "
1717"Language-Team : Russian (https://app.transifex.com/python-doc/teams/5390/ru/)\n "
@@ -64,16 +64,12 @@ msgstr ""
6464
6565#: ../../library/importlib.resources.rst:36
6666msgid ""
67- "This module provides functionality similar to `pkg_resources "
68- "<https://setuptools.readthedocs.io/en/latest/pkg_resources.html>`_ `Basic "
69- "Resource Access "
70- "<https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-"
71- "resource-access>`_ without the performance overhead of that package. This "
72- "makes reading resources included in packages easier, with more stable and "
73- "consistent semantics."
67+ ":mod:`importlib.resources` follows the same security model as the built-in "
68+ ":func:`open` function. Passing untrusted inputs to the functions in this "
69+ "module is unsafe."
7470msgstr ""
7571
76- #: ../../library/importlib.resources.rst:44
72+ #: ../../library/importlib.resources.rst:42
7773msgid ""
7874"The standalone backport of this module provides more information on `using "
7975"importlib.resources <https://importlib-"
@@ -82,36 +78,36 @@ msgid ""
8278"resources.readthedocs.io/en/latest/migration.html>`_."
8379msgstr ""
8480
85- #: ../../library/importlib.resources.rst:50
81+ #: ../../library/importlib.resources.rst:48
8682msgid ""
8783":class:`Loaders <importlib.abc.Loader>` that wish to support resource "
8884"reading should implement a ``get_resource_reader(fullname)`` method as "
8985"specified by :class:`importlib.resources.abc.ResourceReader`."
9086msgstr ""
9187
92- #: ../../library/importlib.resources.rst:56
88+ #: ../../library/importlib.resources.rst:54
9389msgid ""
9490"Represents an anchor for resources, either a :class:`module object "
9591"<types.ModuleType>` or a module name as a string. Defined as ``Union[str, "
9692"ModuleType]``."
9793msgstr ""
9894
99- #: ../../library/importlib.resources.rst:62
95+ #: ../../library/importlib.resources.rst:60
10096msgid ""
10197"Returns a :class:`~importlib.resources.abc.Traversable` object representing "
10298"the resource container (think directory) and its resources (think files). A "
10399"Traversable may contain other containers (think subdirectories)."
104100msgstr ""
105101
106- #: ../../library/importlib.resources.rst:67
102+ #: ../../library/importlib.resources.rst:65
107103msgid ""
108104"*anchor* is an optional :class:`Anchor`. If the anchor is a package, "
109105"resources are resolved from that package. If a module, resources are "
110106"resolved adjacent to that module (in the same package or the package root). "
111107"If the anchor is omitted, the caller's module is used."
112108msgstr ""
113109
114- #: ../../library/importlib.resources.rst:75
110+ #: ../../library/importlib.resources.rst:73
115111msgid ""
116112"*package* parameter was renamed to *anchor*. *anchor* can now be a non-"
117113"package module and if omitted will default to the caller's module. *package*"
@@ -121,239 +117,239 @@ msgid ""
121117"Pythons."
122118msgstr ""
123119
124- #: ../../library/importlib.resources.rst:85
120+ #: ../../library/importlib.resources.rst:83
125121msgid ""
126122"Given a :class:`~importlib.resources.abc.Traversable` object representing a "
127123"file or directory, typically from :func:`importlib.resources.files`, return "
128124"a context manager for use in a :keyword:`with` statement. The context "
129125"manager provides a :class:`pathlib.Path` object."
130126msgstr ""
131127
132- #: ../../library/importlib.resources.rst:90
128+ #: ../../library/importlib.resources.rst:88
133129msgid ""
134130"Exiting the context manager cleans up any temporary file or directory "
135131"created when the resource was extracted from e.g. a zip file."
136132msgstr ""
137133
138- #: ../../library/importlib.resources.rst:93
134+ #: ../../library/importlib.resources.rst:91
139135msgid ""
140136"Use ``as_file`` when the Traversable methods (``read_text``, etc) are "
141137"insufficient and an actual file or directory on the file system is required."
142138msgstr ""
143139
144- #: ../../library/importlib.resources.rst:99
140+ #: ../../library/importlib.resources.rst:97
145141msgid "Added support for *traversable* representing a directory."
146142msgstr ""
147143
148- #: ../../library/importlib.resources.rst:106
144+ #: ../../library/importlib.resources.rst:104
149145msgid "Functional API"
150146msgstr ""
151147
152- #: ../../library/importlib.resources.rst:108
148+ #: ../../library/importlib.resources.rst:106
153149msgid ""
154150"A set of simplified, backwards-compatible helpers is available. These allow "
155151"common operations in a single function call."
156152msgstr ""
157153
158- #: ../../library/importlib.resources.rst:111
154+ #: ../../library/importlib.resources.rst:109
159155msgid "For all the following functions:"
160156msgstr ""
161157
162- #: ../../library/importlib.resources.rst:113
158+ #: ../../library/importlib.resources.rst:111
163159msgid ""
164160"*anchor* is an :class:`~importlib.resources.Anchor`, as in "
165161":func:`~importlib.resources.files`. Unlike in ``files``, it may not be "
166162"omitted."
167163msgstr ""
168164
169- #: ../../library/importlib.resources.rst:117
165+ #: ../../library/importlib.resources.rst:115
170166msgid ""
171167"*path_names* are components of a resource's path name, relative to the "
172168"anchor. For example, to get the text of resource named ``info.txt``, use::"
173169msgstr ""
174170
175- #: ../../library/importlib.resources.rst:121
171+ #: ../../library/importlib.resources.rst:119
176172msgid "importlib.resources.read_text(my_module, \" info.txt\" )"
177173msgstr ""
178174
179- #: ../../library/importlib.resources.rst:123
175+ #: ../../library/importlib.resources.rst:121
180176msgid ""
181177"Like :meth:`Traversable.joinpath <importlib.resources.abc.Traversable>`, The"
182178" individual components should use forward slashes (``/``) as path "
183179"separators. For example, the following are equivalent::"
184180msgstr ""
185181
186- #: ../../library/importlib.resources.rst:128
182+ #: ../../library/importlib.resources.rst:126
187183msgid ""
188184"importlib.resources.read_binary(my_module, \" pics/painting.png\" )\n"
189185"importlib.resources.read_binary(my_module, \" pics\" , \" painting.png\" )"
190186msgstr ""
191187
192- #: ../../library/importlib.resources.rst:131
188+ #: ../../library/importlib.resources.rst:129
193189msgid ""
194190"For backward compatibility reasons, functions that read text require an "
195191"explicit *encoding* argument if multiple *path_names* are given. For "
196192"example, to get the text of ``info/chapter1.txt``, use::"
197193msgstr ""
198194
199- #: ../../library/importlib.resources.rst:135
195+ #: ../../library/importlib.resources.rst:133
200196msgid ""
201197"importlib.resources.read_text(my_module, \" info\" , \" chapter1.txt\" ,\n"
202198" encoding='utf-8')"
203199msgstr ""
204200
205- #: ../../library/importlib.resources.rst:140
201+ #: ../../library/importlib.resources.rst:138
206202msgid "Open the named resource for binary reading."
207203msgstr ""
208204
209- #: ../../library/importlib.resources.rst:142
210- #: ../../library/importlib.resources.rst:185
211- #: ../../library/importlib.resources.rst:233
212- #: ../../library/importlib.resources.rst:250
213- #: ../../library/importlib.resources.rst:268
205+ #: ../../library/importlib.resources.rst:140
206+ #: ../../library/importlib.resources.rst:183
207+ #: ../../library/importlib.resources.rst:231
208+ #: ../../library/importlib.resources.rst:248
209+ #: ../../library/importlib.resources.rst:266
214210msgid ""
215211"See :ref:`the introduction <importlib_resources_functional>` for details on "
216212"*anchor* and *path_names*."
217213msgstr ""
218214
219- #: ../../library/importlib.resources.rst:145
215+ #: ../../library/importlib.resources.rst:143
220216msgid ""
221217"This function returns a :class:`~typing.BinaryIO` object, that is, a binary "
222218"stream open for reading."
223219msgstr ""
224220
225- #: ../../library/importlib.resources.rst:148
226- #: ../../library/importlib.resources.rst:172
227- #: ../../library/importlib.resources.rst:188
228- #: ../../library/importlib.resources.rst:209
229- #: ../../library/importlib.resources.rst:236
230- #: ../../library/importlib.resources.rst:253
231- #: ../../library/importlib.resources.rst:271
221+ #: ../../library/importlib.resources.rst:146
222+ #: ../../library/importlib.resources.rst:170
223+ #: ../../library/importlib.resources.rst:186
224+ #: ../../library/importlib.resources.rst:207
225+ #: ../../library/importlib.resources.rst:234
226+ #: ../../library/importlib.resources.rst:251
227+ #: ../../library/importlib.resources.rst:269
232228msgid "This function is roughly equivalent to::"
233229msgstr ""
234230
235- #: ../../library/importlib.resources.rst:150
231+ #: ../../library/importlib.resources.rst:148
236232msgid "files(anchor).joinpath(*path_names).open('rb')"
237233msgstr ""
238234
239- #: ../../library/importlib.resources.rst:152
240- #: ../../library/importlib.resources.rst:192
241- #: ../../library/importlib.resources.rst:257
235+ #: ../../library/importlib.resources.rst:150
236+ #: ../../library/importlib.resources.rst:190
237+ #: ../../library/importlib.resources.rst:255
242238msgid "Multiple *path_names* are accepted."
243239msgstr ""
244240
245- #: ../../library/importlib.resources.rst:158
241+ #: ../../library/importlib.resources.rst:156
246242msgid ""
247243"Open the named resource for text reading. By default, the contents are read "
248244"as strict UTF-8."
249245msgstr ""
250246
251- #: ../../library/importlib.resources.rst:161
252- #: ../../library/importlib.resources.rst:201
247+ #: ../../library/importlib.resources.rst:159
248+ #: ../../library/importlib.resources.rst:199
253249msgid ""
254250"See :ref:`the introduction <importlib_resources_functional>` for details on "
255251"*anchor* and *path_names*. *encoding* and *errors* have the same meaning as "
256252"in built-in :func:`open`."
257253msgstr ""
258254
259- #: ../../library/importlib.resources.rst:165
260- #: ../../library/importlib.resources.rst:205
255+ #: ../../library/importlib.resources.rst:163
256+ #: ../../library/importlib.resources.rst:203
261257msgid ""
262258"For backward compatibility reasons, the *encoding* argument must be given "
263259"explicitly if there are multiple *path_names*. This limitation is scheduled "
264260"to be removed in Python 3.15."
265261msgstr ""
266262
267- #: ../../library/importlib.resources.rst:169
263+ #: ../../library/importlib.resources.rst:167
268264msgid ""
269265"This function returns a :class:`~typing.TextIO` object, that is, a text "
270266"stream open for reading."
271267msgstr ""
272268
273- #: ../../library/importlib.resources.rst:174
269+ #: ../../library/importlib.resources.rst:172
274270msgid "files(anchor).joinpath(*path_names).open('r', encoding=encoding)"
275271msgstr ""
276272
277- #: ../../library/importlib.resources.rst:176
278- #: ../../library/importlib.resources.rst:213
279- #: ../../library/importlib.resources.rst:240
273+ #: ../../library/importlib.resources.rst:174
274+ #: ../../library/importlib.resources.rst:211
275+ #: ../../library/importlib.resources.rst:238
280276msgid ""
281277"Multiple *path_names* are accepted. *encoding* and *errors* must be given as"
282278" keyword arguments."
283279msgstr ""
284280
285- #: ../../library/importlib.resources.rst:183
281+ #: ../../library/importlib.resources.rst:181
286282msgid "Read and return the contents of the named resource as :class:`bytes`."
287283msgstr ""
288284
289- #: ../../library/importlib.resources.rst:190
285+ #: ../../library/importlib.resources.rst:188
290286msgid "files(anchor).joinpath(*path_names).read_bytes()"
291287msgstr ""
292288
293- #: ../../library/importlib.resources.rst:198
289+ #: ../../library/importlib.resources.rst:196
294290msgid ""
295291"Read and return the contents of the named resource as :class:`str`. By "
296292"default, the contents are read as strict UTF-8."
297293msgstr ""
298294
299- #: ../../library/importlib.resources.rst:211
295+ #: ../../library/importlib.resources.rst:209
300296msgid "files(anchor).joinpath(*path_names).read_text(encoding=encoding)"
301297msgstr ""
302298
303- #: ../../library/importlib.resources.rst:220
299+ #: ../../library/importlib.resources.rst:218
304300msgid ""
305301"Provides the path to the *resource* as an actual file system path. This "
306302"function returns a context manager for use in a :keyword:`with` statement. "
307303"The context manager provides a :class:`pathlib.Path` object."
308304msgstr ""
309305
310- #: ../../library/importlib.resources.rst:224
306+ #: ../../library/importlib.resources.rst:222
311307msgid ""
312308"Exiting the context manager cleans up any temporary files created, e.g. when"
313309" the resource needs to be extracted from a zip file."
314310msgstr ""
315311
316- #: ../../library/importlib.resources.rst:227
312+ #: ../../library/importlib.resources.rst:225
317313msgid ""
318314"For example, the :meth:`~pathlib.Path.stat` method requires an actual file "
319315"system path; it can be used like this::"
320316msgstr ""
321317
322- #: ../../library/importlib.resources.rst:230
318+ #: ../../library/importlib.resources.rst:228
323319msgid ""
324320"with importlib.resources.path(anchor, \" resource.txt\" ) as fspath:\n"
325321" result = fspath.stat()"
326322msgstr ""
327323
328- #: ../../library/importlib.resources.rst:238
324+ #: ../../library/importlib.resources.rst:236
329325msgid "as_file(files(anchor).joinpath(*path_names))"
330326msgstr ""
331327
332- #: ../../library/importlib.resources.rst:247
328+ #: ../../library/importlib.resources.rst:245
333329msgid ""
334330"Return ``True`` if the named resource exists, otherwise ``False``. This "
335331"function does not consider directories to be resources."
336332msgstr ""
337333
338- #: ../../library/importlib.resources.rst:255
334+ #: ../../library/importlib.resources.rst:253
339335msgid "files(anchor).joinpath(*path_names).is_file()"
340336msgstr ""
341337
342- #: ../../library/importlib.resources.rst:263
338+ #: ../../library/importlib.resources.rst:261
343339msgid ""
344340"Return an iterable over the named items within the package or path. The "
345341"iterable returns names of resources (e.g. files) and non-resources (e.g. "
346342"directories) as :class:`str`. The iterable does not recurse into "
347343"subdirectories."
348344msgstr ""
349345
350- #: ../../library/importlib.resources.rst:273
346+ #: ../../library/importlib.resources.rst:271
351347msgid ""
352348"for resource in files(anchor).joinpath(*path_names).iterdir():\n"
353349" yield resource.name"
354350msgstr ""
355351
356- #: ../../library/importlib.resources.rst:276
352+ #: ../../library/importlib.resources.rst:274
357353msgid ""
358354"Prefer ``iterdir()`` as above, which offers more control over the results "
359355"and richer functionality."
0 commit comments