-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathimportlib.po
More file actions
1737 lines (1391 loc) · 57.4 KB
/
importlib.po
File metadata and controls
1737 lines (1391 loc) · 57.4 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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2026, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-11 17:34+0000\n"
"PO-Revision-Date: 2025-09-22 15:58+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && "
"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && "
"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
msgid ":mod:`!importlib` --- The implementation of :keyword:`!import`"
msgstr ""
msgid "**Source code:** :source:`Lib/importlib/__init__.py`"
msgstr "**Kod źródłowy:** :source:`Lib/importlib/__init__.py`"
msgid "Introduction"
msgstr "Wprowadzenie"
msgid ""
"The purpose of the :mod:`importlib` package is two-fold. One is to provide "
"the implementation of the :keyword:`import` statement (and thus, by "
"extension, the :func:`__import__` function) in Python source code. This "
"provides an implementation of :keyword:`!import` which is portable to any "
"Python interpreter. This also provides an implementation which is easier to "
"comprehend than one implemented in a programming language other than Python."
msgstr ""
msgid ""
"Two, the components to implement :keyword:`import` are exposed in this "
"package, making it easier for users to create their own custom objects "
"(known generically as an :term:`importer`) to participate in the import "
"process."
msgstr ""
msgid ":ref:`import`"
msgstr ":ref:`import`"
msgid "The language reference for the :keyword:`import` statement."
msgstr ""
msgid ""
"`Packages specification <https://www.python.org/doc/essays/packages/>`__"
msgstr ""
"`Specyfikacja pakietów <https://www.python.org/doc/essays/packages/>`__"
msgid ""
"Original specification of packages. Some semantics have changed since the "
"writing of this document (e.g. redirecting based on ``None`` in :data:`sys."
"modules`)."
msgstr ""
msgid "The :func:`.__import__` function"
msgstr ""
msgid "The :keyword:`import` statement is syntactic sugar for this function."
msgstr ""
msgid ":pep:`235`"
msgstr ":pep:`235`"
msgid "Import on Case-Insensitive Platforms"
msgstr ""
msgid ":pep:`263`"
msgstr ":pep:`263`"
msgid "Defining Python Source Code Encodings"
msgstr ""
msgid ":pep:`302`"
msgstr ":pep:`302`"
msgid "New Import Hooks"
msgstr ""
msgid ":pep:`328`"
msgstr ":pep:`328`"
msgid "Imports: Multi-Line and Absolute/Relative"
msgstr ""
msgid ":pep:`366`"
msgstr ":pep:`366`"
msgid "Main module explicit relative imports"
msgstr ""
msgid ":pep:`420`"
msgstr ":pep:`420`"
msgid "Implicit namespace packages"
msgstr ""
msgid ":pep:`451`"
msgstr ":pep:`451`"
msgid "A ModuleSpec Type for the Import System"
msgstr ""
msgid ":pep:`488`"
msgstr ":pep:`488`"
msgid "Elimination of PYO files"
msgstr ""
msgid ":pep:`489`"
msgstr ":pep:`489`"
msgid "Multi-phase extension module initialization"
msgstr ""
msgid ":pep:`552`"
msgstr ":pep:`552`"
msgid "Deterministic pycs"
msgstr ""
msgid ":pep:`3120`"
msgstr ":pep:`3120`"
msgid "Using UTF-8 as the Default Source Encoding"
msgstr ""
msgid ":pep:`3147`"
msgstr ":pep:`3147`"
msgid "PYC Repository Directories"
msgstr ""
msgid "Functions"
msgstr "Zadania"
msgid "An implementation of the built-in :func:`__import__` function."
msgstr ""
msgid ""
"Programmatic importing of modules should use :func:`import_module` instead "
"of this function."
msgstr ""
msgid ""
"Import a module. The *name* argument specifies what module to import in "
"absolute or relative terms (e.g. either ``pkg.mod`` or ``..mod``). If the "
"name is specified in relative terms, then the *package* argument must be set "
"to the name of the package which is to act as the anchor for resolving the "
"package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import "
"``pkg.mod``)."
msgstr ""
msgid ""
"The :func:`import_module` function acts as a simplifying wrapper around :"
"func:`importlib.__import__`. This means all semantics of the function are "
"derived from :func:`importlib.__import__`. The most important difference "
"between these two functions is that :func:`import_module` returns the "
"specified package or module (e.g. ``pkg.mod``), while :func:`__import__` "
"returns the top-level package or module (e.g. ``pkg``)."
msgstr ""
msgid ""
"If you are dynamically importing a module that was created since the "
"interpreter began execution (e.g., created a Python source file), you may "
"need to call :func:`invalidate_caches` in order for the new module to be "
"noticed by the import system."
msgstr ""
msgid "Parent packages are automatically imported."
msgstr ""
msgid ""
"Find the loader for a module, optionally within the specified *path*. If the "
"module is in :attr:`sys.modules`, then ``sys.modules[name].__loader__`` is "
"returned (unless the loader would be ``None`` or is not set, in which case :"
"exc:`ValueError` is raised). Otherwise a search using :attr:`sys.meta_path` "
"is done. ``None`` is returned if no loader is found."
msgstr ""
msgid ""
"A dotted name does not have its parents implicitly imported as that requires "
"loading them and that may not be desired. To properly import a submodule you "
"will need to import all parent packages of the submodule and use the correct "
"argument to *path*."
msgstr ""
msgid ""
"If ``__loader__`` is not set, raise :exc:`ValueError`, just like when the "
"attribute is set to ``None``."
msgstr ""
msgid "Use :func:`importlib.util.find_spec` instead."
msgstr ""
msgid ""
"Invalidate the internal caches of finders stored at :data:`sys.meta_path`. "
"If a finder implements ``invalidate_caches()`` then it will be called to "
"perform the invalidation. This function should be called if any modules are "
"created/installed while your program is running to guarantee all finders "
"will notice the new module's existence."
msgstr ""
msgid ""
"Reload a previously imported *module*. The argument must be a module "
"object, so it must have been successfully imported before. This is useful "
"if you have edited the module source file using an external editor and want "
"to try out the new version without leaving the Python interpreter. The "
"return value is the module object (which can be different if re-importing "
"causes a different object to be placed in :data:`sys.modules`)."
msgstr ""
msgid "When :func:`reload` is executed:"
msgstr ""
msgid ""
"Python module's code is recompiled and the module-level code re-executed, "
"defining a new set of objects which are bound to names in the module's "
"dictionary by reusing the :term:`loader` which originally loaded the "
"module. The ``init`` function of extension modules is not called a second "
"time."
msgstr ""
msgid ""
"As with all other objects in Python the old objects are only reclaimed after "
"their reference counts drop to zero."
msgstr ""
msgid ""
"The names in the module namespace are updated to point to any new or changed "
"objects."
msgstr ""
msgid ""
"Other references to the old objects (such as names external to the module) "
"are not rebound to refer to the new objects and must be updated in each "
"namespace where they occur if that is desired."
msgstr ""
msgid "There are a number of other caveats:"
msgstr ""
msgid ""
"When a module is reloaded, its dictionary (containing the module's global "
"variables) is retained. Redefinitions of names will override the old "
"definitions, so this is generally not a problem. If the new version of a "
"module does not define a name that was defined by the old version, the old "
"definition remains. This feature can be used to the module's advantage if "
"it maintains a global table or cache of objects --- with a :keyword:`try` "
"statement it can test for the table's presence and skip its initialization "
"if desired::"
msgstr ""
msgid ""
"It is generally not very useful to reload built-in or dynamically loaded "
"modules. Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other "
"key modules is not recommended. In many cases extension modules are not "
"designed to be initialized more than once, and may fail in arbitrary ways "
"when reloaded."
msgstr ""
msgid ""
"If a module imports objects from another module using :keyword:`from` ... :"
"keyword:`import` ..., calling :func:`reload` for the other module does not "
"redefine the objects imported from it --- one way around this is to re-"
"execute the :keyword:`!from` statement, another is to use :keyword:`!import` "
"and qualified names (*module.name*) instead."
msgstr ""
msgid ""
"If a module instantiates instances of a class, reloading the module that "
"defines the class does not affect the method definitions of the instances "
"--- they continue to use the old class definition. The same is true for "
"derived classes."
msgstr ""
msgid ""
":exc:`ModuleNotFoundError` is raised when the module being reloaded lacks a :"
"class:`~importlib.machinery.ModuleSpec`."
msgstr ""
msgid ":mod:`importlib.abc` -- Abstract base classes related to import"
msgstr ""
msgid "**Source code:** :source:`Lib/importlib/abc.py`"
msgstr "**Kod źródłowy:** :source:`Lib/importlib/abc.py`"
msgid ""
"The :mod:`importlib.abc` module contains all of the core abstract base "
"classes used by :keyword:`import`. Some subclasses of the core abstract base "
"classes are also provided to help in implementing the core ABCs."
msgstr ""
msgid "ABC hierarchy::"
msgstr ""
msgid "An abstract base class representing a :term:`finder`."
msgstr ""
msgid "Use :class:`MetaPathFinder` or :class:`PathEntryFinder` instead."
msgstr ""
msgid ""
"An abstract method for finding a :term:`loader` for the specified module. "
"Originally specified in :pep:`302`, this method was meant for use in :data:"
"`sys.meta_path` and in the path-based import subsystem."
msgstr ""
msgid ""
"Returns ``None`` when called instead of raising :exc:`NotImplementedError`."
msgstr ""
msgid ""
"Implement :meth:`MetaPathFinder.find_spec` or :meth:`PathEntryFinder."
"find_spec` instead."
msgstr ""
msgid "An abstract base class representing a :term:`meta path finder`."
msgstr ""
msgid "No longer a subclass of :class:`Finder`."
msgstr ""
msgid ""
"An abstract method for finding a :term:`spec <module spec>` for the "
"specified module. If this is a top-level import, *path* will be ``None``. "
"Otherwise, this is a search for a subpackage or module and *path* will be "
"the value of :attr:`__path__` from the parent package. If a spec cannot be "
"found, ``None`` is returned. When passed in, ``target`` is a module object "
"that the finder may use to make a more educated guess about what spec to "
"return. :func:`importlib.util.spec_from_loader` may be useful for "
"implementing concrete ``MetaPathFinders``."
msgstr ""
msgid ""
"A legacy method for finding a :term:`loader` for the specified module. If "
"this is a top-level import, *path* will be ``None``. Otherwise, this is a "
"search for a subpackage or module and *path* will be the value of :attr:"
"`__path__` from the parent package. If a loader cannot be found, ``None`` is "
"returned."
msgstr ""
msgid ""
"If :meth:`find_spec` is defined, backwards-compatible functionality is "
"provided."
msgstr ""
msgid ""
"Returns ``None`` when called instead of raising :exc:`NotImplementedError`. "
"Can use :meth:`find_spec` to provide functionality."
msgstr ""
msgid "Use :meth:`find_spec` instead."
msgstr ""
msgid ""
"An optional method which, when called, should invalidate any internal cache "
"used by the finder. Used by :func:`importlib.invalidate_caches` when "
"invalidating the caches of all finders on :data:`sys.meta_path`."
msgstr ""
msgid "Returns ``None`` when called instead of ``NotImplemented``."
msgstr ""
msgid ""
"An abstract base class representing a :term:`path entry finder`. Though it "
"bears some similarities to :class:`MetaPathFinder`, ``PathEntryFinder`` is "
"meant for use only within the path-based import subsystem provided by :class:"
"`importlib.machinery.PathFinder`."
msgstr ""
msgid ""
"An abstract method for finding a :term:`spec <module spec>` for the "
"specified module. The finder will search for the module only within the :"
"term:`path entry` to which it is assigned. If a spec cannot be found, "
"``None`` is returned. When passed in, ``target`` is a module object that "
"the finder may use to make a more educated guess about what spec to return. :"
"func:`importlib.util.spec_from_loader` may be useful for implementing "
"concrete ``PathEntryFinders``."
msgstr ""
msgid ""
"A legacy method for finding a :term:`loader` for the specified module. "
"Returns a 2-tuple of ``(loader, portion)`` where ``portion`` is a sequence "
"of file system locations contributing to part of a namespace package. The "
"loader may be ``None`` while specifying ``portion`` to signify the "
"contribution of the file system locations to a namespace package. An empty "
"list can be used for ``portion`` to signify the loader is not part of a "
"namespace package. If ``loader`` is ``None`` and ``portion`` is the empty "
"list then no loader or location for a namespace package were found (i.e. "
"failure to find anything for the module)."
msgstr ""
msgid ""
"If :meth:`find_spec` is defined then backwards-compatible functionality is "
"provided."
msgstr ""
msgid ""
"Returns ``(None, [])`` instead of raising :exc:`NotImplementedError`. Uses :"
"meth:`find_spec` when available to provide functionality."
msgstr ""
msgid ""
"A concrete implementation of :meth:`Finder.find_module` which is equivalent "
"to ``self.find_loader(fullname)[0]``."
msgstr ""
msgid ""
"An optional method which, when called, should invalidate any internal cache "
"used by the finder. Used by :meth:`importlib.machinery.PathFinder."
"invalidate_caches` when invalidating the caches of all cached finders."
msgstr ""
msgid ""
"An abstract base class for a :term:`loader`. See :pep:`302` for the exact "
"definition for a loader."
msgstr ""
msgid ""
"Loaders that wish to support resource reading should implement a "
"``get_resource_reader(fullname)`` method as specified by :class:`importlib."
"abc.ResourceReader`."
msgstr ""
msgid "Introduced the optional ``get_resource_reader()`` method."
msgstr ""
msgid ""
"A method that returns the module object to use when importing a module. "
"This method may return ``None``, indicating that default module creation "
"semantics should take place."
msgstr ""
msgid ""
"Starting in Python 3.6, this method will not be optional when :meth:"
"`exec_module` is defined."
msgstr ""
msgid ""
"An abstract method that executes the module in its own namespace when a "
"module is imported or reloaded. The module should already be initialized "
"when ``exec_module()`` is called. When this method exists, :meth:`~importlib."
"abc.Loader.create_module` must be defined."
msgstr ""
msgid ":meth:`~importlib.abc.Loader.create_module` must also be defined."
msgstr ""
msgid ""
"A legacy method for loading a module. If the module cannot be loaded, :exc:"
"`ImportError` is raised, otherwise the loaded module is returned."
msgstr ""
msgid ""
"If the requested module already exists in :data:`sys.modules`, that module "
"should be used and reloaded. Otherwise the loader should create a new module "
"and insert it into :data:`sys.modules` before any loading begins, to prevent "
"recursion from the import. If the loader inserted a module and the load "
"fails, it must be removed by the loader from :data:`sys.modules`; modules "
"already in :data:`sys.modules` before the loader began execution should be "
"left alone (see :func:`importlib.util.module_for_loader`)."
msgstr ""
msgid ""
"The loader should set several attributes on the module. (Note that some of "
"these attributes can change when a module is reloaded):"
msgstr ""
msgid ":attr:`__name__`"
msgstr ""
msgid "The name of the module."
msgstr ""
msgid ":attr:`__file__`"
msgstr ""
msgid ""
"The path to where the module data is stored (not set for built-in modules)."
msgstr ""
msgid ":attr:`__cached__`"
msgstr ""
msgid ""
"The path to where a compiled version of the module is/should be stored (not "
"set when the attribute would be inappropriate)."
msgstr ""
msgid ":attr:`__path__`"
msgstr ""
msgid ""
"A list of strings specifying the search path within a package. This "
"attribute is not set on modules."
msgstr ""
msgid ":attr:`__package__`"
msgstr ""
msgid ""
"The fully qualified name of the package under which the module was loaded as "
"a submodule (or the empty string for top-level modules). For packages, it is "
"the same as :attr:`__name__`. The :func:`importlib.util.module_for_loader` "
"decorator can handle the details for :attr:`__package__`."
msgstr ""
msgid ":attr:`__loader__`"
msgstr ""
msgid ""
"The loader used to load the module. The :func:`importlib.util."
"module_for_loader` decorator can handle the details for :attr:`__package__`."
msgstr ""
msgid ""
"When :meth:`exec_module` is available then backwards-compatible "
"functionality is provided."
msgstr ""
msgid ""
"Raise :exc:`ImportError` when called instead of :exc:`NotImplementedError`. "
"Functionality provided when :meth:`exec_module` is available."
msgstr ""
msgid ""
"The recommended API for loading a module is :meth:`exec_module` (and :meth:"
"`create_module`). Loaders should implement it instead of load_module(). "
"The import machinery takes care of all the other responsibilities of "
"load_module() when exec_module() is implemented."
msgstr ""
msgid ""
"A legacy method which when implemented calculates and returns the given "
"module's repr, as a string. The module type's default repr() will use the "
"result of this method as appropriate."
msgstr ""
msgid "Made optional instead of an abstractmethod."
msgstr ""
msgid "The import machinery now takes care of this automatically."
msgstr ""
msgid "*Superseded by TraversableResources*"
msgstr ""
msgid ""
"An :term:`abstract base class` to provide the ability to read *resources*."
msgstr ""
msgid ""
"From the perspective of this ABC, a *resource* is a binary artifact that is "
"shipped within a package. Typically this is something like a data file that "
"lives next to the ``__init__.py`` file of the package. The purpose of this "
"class is to help abstract out the accessing of such data files so that it "
"does not matter if the package and its data file(s) are stored in a e.g. zip "
"file versus on the file system."
msgstr ""
msgid ""
"For any of methods of this class, a *resource* argument is expected to be a :"
"term:`path-like object` which represents conceptually just a file name. This "
"means that no subdirectory paths should be included in the *resource* "
"argument. This is because the location of the package the reader is for, "
"acts as the \"directory\". Hence the metaphor for directories and file names "
"is packages and resources, respectively. This is also why instances of this "
"class are expected to directly correlate to a specific package (instead of "
"potentially representing multiple packages or a module)."
msgstr ""
msgid ""
"Loaders that wish to support resource reading are expected to provide a "
"method called ``get_resource_reader(fullname)`` which returns an object "
"implementing this ABC's interface. If the module specified by fullname is "
"not a package, this method should return :const:`None`. An object compatible "
"with this ABC should only be returned when the specified module is a package."
msgstr ""
msgid ""
"Returns an opened, :term:`file-like object` for binary reading of the "
"*resource*."
msgstr ""
msgid "If the resource cannot be found, :exc:`FileNotFoundError` is raised."
msgstr ""
msgid "Returns the file system path to the *resource*."
msgstr ""
msgid ""
"If the resource does not concretely exist on the file system, raise :exc:"
"`FileNotFoundError`."
msgstr ""
msgid ""
"Returns ``True`` if the named *name* is considered a resource. :exc:"
"`FileNotFoundError` is raised if *name* does not exist."
msgstr ""
msgid ""
"Returns an :term:`iterable` of strings over the contents of the package. Do "
"note that it is not required that all names returned by the iterator be "
"actual resources, e.g. it is acceptable to return names for which :meth:"
"`is_resource` would be false."
msgstr ""
msgid ""
"Allowing non-resource names to be returned is to allow for situations where "
"how a package and its resources are stored are known a priori and the non-"
"resource names would be useful. For instance, returning subdirectory names "
"is allowed so that when it is known that the package and resources are "
"stored on the file system then those subdirectory names can be used directly."
msgstr ""
msgid "The abstract method returns an iterable of no items."
msgstr ""
msgid ""
"An abstract base class for a :term:`loader` which implements the optional :"
"pep:`302` protocol for loading arbitrary resources from the storage back-end."
msgstr ""
msgid ""
"This ABC is deprecated in favour of supporting resource loading through :"
"class:`importlib.abc.ResourceReader`."
msgstr ""
msgid ""
"An abstract method to return the bytes for the data located at *path*. "
"Loaders that have a file-like storage back-end that allows storing arbitrary "
"data can implement this abstract method to give direct access to the data "
"stored. :exc:`OSError` is to be raised if the *path* cannot be found. The "
"*path* is expected to be constructed using a module's :attr:`__file__` "
"attribute or an item from a package's :attr:`__path__`."
msgstr ""
msgid "Raises :exc:`OSError` instead of :exc:`NotImplementedError`."
msgstr ""
msgid ""
"An abstract base class for a :term:`loader` which implements the optional :"
"pep:`302` protocol for loaders that inspect modules."
msgstr ""
msgid ""
"Return the code object for a module, or ``None`` if the module does not have "
"a code object (as would be the case, for example, for a built-in module). "
"Raise an :exc:`ImportError` if loader cannot find the requested module."
msgstr ""
msgid ""
"While the method has a default implementation, it is suggested that it be "
"overridden if possible for performance."
msgstr ""
msgid "No longer abstract and a concrete implementation is provided."
msgstr ""
msgid ""
"An abstract method to return the source of a module. It is returned as a "
"text string using :term:`universal newlines`, translating all recognized "
"line separators into ``'\\n'`` characters. Returns ``None`` if no source is "
"available (e.g. a built-in module). Raises :exc:`ImportError` if the loader "
"cannot find the module specified."
msgstr ""
msgid "Raises :exc:`ImportError` instead of :exc:`NotImplementedError`."
msgstr ""
msgid ""
"An optional method to return a true value if the module is a package, a "
"false value otherwise. :exc:`ImportError` is raised if the :term:`loader` "
"cannot find the module."
msgstr ""
msgid "Create a code object from Python source."
msgstr ""
msgid ""
"The *data* argument can be whatever the :func:`compile` function supports (i."
"e. string or bytes). The *path* argument should be the \"path\" to where the "
"source code originated from, which can be an abstract concept (e.g. location "
"in a zip file)."
msgstr ""
msgid ""
"With the subsequent code object one can execute it in a module by running "
"``exec(code, module.__dict__)``."
msgstr ""
msgid "Made the method static."
msgstr ""
msgid "Implementation of :meth:`Loader.exec_module`."
msgstr ""
msgid "Implementation of :meth:`Loader.load_module`."
msgstr ""
msgid "use :meth:`exec_module` instead."
msgstr ""
msgid ""
"An abstract base class which inherits from :class:`InspectLoader` that, when "
"implemented, helps a module to be executed as a script. The ABC represents "
"an optional :pep:`302` protocol."
msgstr ""
msgid ""
"An abstract method that is to return the value of :attr:`__file__` for the "
"specified module. If no path is available, :exc:`ImportError` is raised."
msgstr ""
msgid ""
"If source code is available, then the method should return the path to the "
"source file, regardless of whether a bytecode was used to load the module."
msgstr ""
msgid ""
"An abstract base class which inherits from :class:`ResourceLoader` and :"
"class:`ExecutionLoader`, providing concrete implementations of :meth:"
"`ResourceLoader.get_data` and :meth:`ExecutionLoader.get_filename`."
msgstr ""
msgid ""
"The *fullname* argument is a fully resolved name of the module the loader is "
"to handle. The *path* argument is the path to the file for the module."
msgstr ""
msgid "The name of the module the loader can handle."
msgstr ""
msgid "Path to the file of the module."
msgstr ""
msgid "Calls super's ``load_module()``."
msgstr ""
msgid "Use :meth:`Loader.exec_module` instead."
msgstr ""
msgid "Returns :attr:`path`."
msgstr ""
msgid "Reads *path* as a binary file and returns the bytes from it."
msgstr ""
msgid ""
"An abstract base class for implementing source (and optionally bytecode) "
"file loading. The class inherits from both :class:`ResourceLoader` and :"
"class:`ExecutionLoader`, requiring the implementation of:"
msgstr ""
msgid ":meth:`ResourceLoader.get_data`"
msgstr ":meth:`ResourceLoader.get_data`"
msgid ":meth:`ExecutionLoader.get_filename`"
msgstr ":meth:`ExecutionLoader.get_filename`"
msgid ""
"Should only return the path to the source file; sourceless loading is not "
"supported."
msgstr ""
msgid ""
"The abstract methods defined by this class are to add optional bytecode file "
"support. Not implementing these optional methods (or causing them to raise :"
"exc:`NotImplementedError`) causes the loader to only work with source code. "
"Implementing the methods allows the loader to work with source *and* "
"bytecode files; it does not allow for *sourceless* loading where only "
"bytecode is provided. Bytecode files are an optimization to speed up "
"loading by removing the parsing step of Python's compiler, and so no "
"bytecode-specific API is exposed."
msgstr ""
msgid ""
"Optional abstract method which returns a :class:`dict` containing metadata "
"about the specified path. Supported dictionary keys are:"
msgstr ""
msgid ""
"``'mtime'`` (mandatory): an integer or floating-point number representing "
"the modification time of the source code;"
msgstr ""
msgid "``'size'`` (optional): the size in bytes of the source code."
msgstr ""
msgid ""
"Any other keys in the dictionary are ignored, to allow for future "
"extensions. If the path cannot be handled, :exc:`OSError` is raised."
msgstr ""
msgid "Raise :exc:`OSError` instead of :exc:`NotImplementedError`."
msgstr ""
msgid ""
"Optional abstract method which returns the modification time for the "
"specified path."
msgstr ""
msgid ""
"This method is deprecated in favour of :meth:`path_stats`. You don't have "
"to implement it, but it is still available for compatibility purposes. "
"Raise :exc:`OSError` if the path cannot be handled."
msgstr ""
msgid ""
"Optional abstract method which writes the specified bytes to a file path. "
"Any intermediate directories which do not exist are to be created "
"automatically."
msgstr ""
msgid ""
"When writing to the path fails because the path is read-only (:attr:`errno."
"EACCES`/:exc:`PermissionError`), do not propagate the exception."
msgstr ""
msgid "No longer raises :exc:`NotImplementedError` when called."
msgstr ""
msgid "Concrete implementation of :meth:`InspectLoader.get_code`."
msgstr ""
msgid "Concrete implementation of :meth:`Loader.exec_module`."
msgstr ""
msgid "Concrete implementation of :meth:`Loader.load_module`."
msgstr ""
msgid "Use :meth:`exec_module` instead."
msgstr ""
msgid "Concrete implementation of :meth:`InspectLoader.get_source`."
msgstr ""
msgid ""
"Concrete implementation of :meth:`InspectLoader.is_package`. A module is "
"determined to be a package if its file path (as provided by :meth:"
"`ExecutionLoader.get_filename`) is a file named ``__init__`` when the file "
"extension is removed **and** the module name itself does not end in "
"``__init__``."
msgstr ""
msgid ""
"An object with a subset of :class:`pathlib.Path` methods suitable for "
"traversing directories and opening files."
msgstr ""
msgid ""
"For a representation of the object on the file-system, use :meth:`importlib."
"resources.as_file`."
msgstr ""
msgid "The base name of this object without any parent references."
msgstr ""
msgid "Yield Traversable objects in self."
msgstr ""
msgid "Return True if self is a directory."
msgstr ""
msgid "Return True if self is a file."
msgstr ""
msgid "Return Traversable child in self."
msgstr ""
msgid ""
"*mode* may be 'r' or 'rb' to open as text or binary. Return a handle "
"suitable for reading (same as :attr:`pathlib.Path.open`)."
msgstr ""
msgid ""
"When opening as text, accepts encoding parameters such as those accepted by :"
"attr:`io.TextIOWrapper`."
msgstr ""
msgid "Read contents of self as bytes."
msgstr ""
msgid "Read contents of self as text."
msgstr ""
msgid ""
"Note: In Python 3.11 and later, this class is found in ``importlib.resources."
"abc``."
msgstr ""
msgid ""
"An abstract base class for resource readers capable of serving the ``files`` "
"interface. Subclasses ResourceReader and provides concrete implementations "
"of the ResourceReader's abstract methods. Therefore, any loader supplying "
"TraversableResources also supplies ResourceReader."
msgstr ""
msgid ""
"Loaders that wish to support resource reading are expected to implement this "
"interface."
msgstr ""
msgid ":mod:`importlib.resources` -- Resources"
msgstr ""
msgid "**Source code:** :source:`Lib/importlib/resources.py`"
msgstr ""
msgid ""
"This module leverages Python's import system to provide access to "
"*resources* within *packages*. If you can import a package, you can access "
"resources within that package. Resources can be opened or read, in either "
"binary or text mode."
msgstr ""
msgid ""
"Resources are roughly akin to files inside directories, though it's "
"important to keep in mind that this is just a metaphor. Resources and "
"packages **do not** have to exist as physical files and directories on the "
"file system."
msgstr ""
msgid ""
"This module provides functionality similar to `pkg_resources <https://"
"setuptools.readthedocs.io/en/latest/pkg_resources.html>`_ `Basic Resource "
"Access <http://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-"
"resource-access>`_ without the performance overhead of that package. This "
"makes reading resources included in packages easier, with more stable and "
"consistent semantics."
msgstr ""
msgid ""
"The standalone backport of this module provides more information on `using "
"importlib.resources <http://importlib-resources.readthedocs.io/en/latest/"
"using.html>`_ and `migrating from pkg_resources to importlib.resources "
"<http://importlib-resources.readthedocs.io/en/latest/migration.html>`_."
msgstr ""
msgid "The following types are defined."
msgstr ""
msgid ""
"The ``Package`` type is defined as ``Union[str, ModuleType]``. This means "
"that where the function describes accepting a ``Package``, you can pass in "
"either a string or a module. Module objects must have a resolvable "
"``__spec__.submodule_search_locations`` that is not ``None``."
msgstr ""
msgid ""
"This type describes the resource names passed into the various functions in "
"this package. This is defined as ``Union[str, os.PathLike]``."
msgstr ""
msgid "The following functions are available."
msgstr ""
msgid ""
"Returns an :class:`importlib.abc.Traversable` object representing the "
"resource container for the package (think directory) and its resources "
"(think files). A Traversable may contain other containers (think "
"subdirectories)."
msgstr ""
msgid ""
"*package* is either a name or a module object which conforms to the "
"``Package`` requirements."
msgstr ""
msgid ""
"Given a :class:`importlib.abc.Traversable` object representing a file, "
"typically from :func:`importlib.resources.files`, return a context manager "
"for use in a :keyword:`with` statement. The context manager provides a :"
"class:`pathlib.Path` object."
msgstr ""
msgid ""
"Exiting the context manager cleans up any temporary file created when the "
"resource was extracted from e.g. a zip file."
msgstr ""
msgid ""
"Use ``as_file`` when the Traversable methods (``read_text``, etc) are "
"insufficient and an actual file on the file system is required."
msgstr ""
msgid "Open for binary reading the *resource* within *package*."