@@ -13,7 +13,7 @@ msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.9\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2021-05-20 06:27 +0000\n "
16+ "POT-Creation-Date : 2021-06-28 06:43 +0000\n "
1717"PO-Revision-Date : 2019-09-01 14:41+0000\n "
1818"
Last-Translator :
Freesand Leo <[email protected] >, 2019\n "
1919"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -27,13 +27,17 @@ msgstr ""
2727msgid "Using :mod:`!importlib.metadata`"
2828msgstr ""
2929
30- #: ../../library/importlib.metadata.rst:13
30+ #: ../../library/importlib.metadata.rst:10
31+ msgid "**Source code:** :source:`Lib/importlib/metadata.py`"
32+ msgstr ""
33+
34+ #: ../../library/importlib.metadata.rst:15
3135msgid ""
3236"This functionality is provisional and may deviate from the usual version "
3337"semantics of the standard library."
3438msgstr ""
3539
36- #: ../../library/importlib.metadata.rst:16
40+ #: ../../library/importlib.metadata.rst:18
3741msgid ""
3842"``importlib.metadata`` is a library that provides for access to installed "
3943"package metadata. Built in part on Python's import system, this library "
@@ -44,7 +48,7 @@ msgid ""
4448"efficient ``pkg_resources`` package."
4549msgstr ""
4650
47- #: ../../library/importlib.metadata.rst:25
51+ #: ../../library/importlib.metadata.rst:27
4852msgid ""
4953"By \" installed package\" we generally mean a third-party package installed "
5054"into Python's ``site-packages`` directory via tools such as `pip "
@@ -55,52 +59,52 @@ msgid ""
5559" Through an extension mechanism, the metadata can live almost anywhere."
5660msgstr ""
5761
58- #: ../../library/importlib.metadata.rst:36
62+ #: ../../library/importlib.metadata.rst:38
5963msgid "Overview"
6064msgstr "概述"
6165
62- #: ../../library/importlib.metadata.rst:38
66+ #: ../../library/importlib.metadata.rst:40
6367msgid ""
6468"Let's say you wanted to get the version string for a package you've "
6569"installed using ``pip``. We start by creating a virtual environment and "
6670"installing something into it:"
6771msgstr ""
6872
69- #: ../../library/importlib.metadata.rst:48
73+ #: ../../library/importlib.metadata.rst:50
7074msgid "You can get the version string for ``wheel`` by running the following:"
7175msgstr ""
7276
73- #: ../../library/importlib.metadata.rst:57
77+ #: ../../library/importlib.metadata.rst:59
7478msgid ""
7579"You can also get the set of entry points keyed by group, such as "
7680"``console_scripts``, ``distutils.commands`` and others. Each group contains"
7781" a sequence of :ref:`EntryPoint <entry-points>` objects."
7882msgstr ""
7983
80- #: ../../library/importlib.metadata.rst:61
84+ #: ../../library/importlib.metadata.rst:63
8185msgid "You can get the :ref:`metadata for a distribution <metadata>`::"
8286msgstr ""
8387
84- #: ../../library/importlib.metadata.rst:66
88+ #: ../../library/importlib.metadata.rst:68
8589msgid ""
8690"You can also get a :ref:`distribution's version number <version>`, list its "
8791":ref:`constituent files <files>`, and get a list of the distribution's "
8892":ref:`requirements`."
8993msgstr ""
9094
91- #: ../../library/importlib.metadata.rst:72
95+ #: ../../library/importlib.metadata.rst:74
9296msgid "Functional API"
9397msgstr "可用 API"
9498
95- #: ../../library/importlib.metadata.rst:74
99+ #: ../../library/importlib.metadata.rst:76
96100msgid "This package provides the following functionality via its public API."
97101msgstr ""
98102
99- #: ../../library/importlib.metadata.rst:80
103+ #: ../../library/importlib.metadata.rst:82
100104msgid "Entry points"
101105msgstr ""
102106
103- #: ../../library/importlib.metadata.rst:82
107+ #: ../../library/importlib.metadata.rst:84
104108msgid ""
105109"The ``entry_points()`` function returns a dictionary of all entry points, "
106110"keyed by group. Entry points are represented by ``EntryPoint`` instances; "
@@ -110,7 +114,7 @@ msgid ""
110114"``.value`` attribute::"
111115msgstr ""
112116
113- #: ../../library/importlib.metadata.rst:106
117+ #: ../../library/importlib.metadata.rst:108
114118msgid ""
115119"The ``group`` and ``name`` are arbitrary values defined by the package "
116120"author and usually a client will wish to resolve all entry points for a "
@@ -120,37 +124,37 @@ msgid ""
120124"their definition, and usage."
121125msgstr ""
122126
123- #: ../../library/importlib.metadata.rst:116
127+ #: ../../library/importlib.metadata.rst:118
124128msgid "Distribution metadata"
125129msgstr ""
126130
127- #: ../../library/importlib.metadata.rst:118
131+ #: ../../library/importlib.metadata.rst:120
128132msgid ""
129133"Every distribution includes some metadata, which you can extract using the "
130134"``metadata()`` function::"
131135msgstr ""
132136
133- #: ../../library/importlib.metadata.rst:123
137+ #: ../../library/importlib.metadata.rst:125
134138msgid ""
135139"The keys of the returned data structure [#f1]_ name the metadata keywords, "
136140"and their values are returned unparsed from the distribution metadata::"
137141msgstr ""
138142
139- #: ../../library/importlib.metadata.rst:133
143+ #: ../../library/importlib.metadata.rst:135
140144msgid "Distribution versions"
141145msgstr ""
142146
143- #: ../../library/importlib.metadata.rst:135
147+ #: ../../library/importlib.metadata.rst:137
144148msgid ""
145149"The ``version()`` function is the quickest way to get a distribution's "
146150"version number, as a string::"
147151msgstr ""
148152
149- #: ../../library/importlib.metadata.rst:145
153+ #: ../../library/importlib.metadata.rst:147
150154msgid "Distribution files"
151155msgstr ""
152156
153- #: ../../library/importlib.metadata.rst:147
157+ #: ../../library/importlib.metadata.rst:149
154158msgid ""
155159"You can also get the full set of files contained within a distribution. The"
156160" ``files()`` function takes a distribution package name and returns all of "
@@ -160,11 +164,11 @@ msgid ""
160164"For example::"
161165msgstr ""
162166
163- #: ../../library/importlib.metadata.rst:163
167+ #: ../../library/importlib.metadata.rst:165
164168msgid "Once you have the file, you can also read its contents::"
165169msgstr ""
166170
167- #: ../../library/importlib.metadata.rst:174
171+ #: ../../library/importlib.metadata.rst:176
168172msgid ""
169173"In the case where the metadata file listing files (RECORD or SOURCES.txt) is"
170174" missing, ``files()`` will return ``None``. The caller may wish to wrap "
@@ -174,51 +178,51 @@ msgid ""
174178" known to have the metadata present."
175179msgstr ""
176180
177- #: ../../library/importlib.metadata.rst:185
181+ #: ../../library/importlib.metadata.rst:187
178182msgid "Distribution requirements"
179183msgstr ""
180184
181- #: ../../library/importlib.metadata.rst:187
185+ #: ../../library/importlib.metadata.rst:189
182186msgid ""
183187"To get the full set of requirements for a distribution, use the "
184188"``requires()`` function::"
185189msgstr ""
186190
187- #: ../../library/importlib.metadata.rst:195
191+ #: ../../library/importlib.metadata.rst:197
188192msgid "Distributions"
189193msgstr ""
190194
191- #: ../../library/importlib.metadata.rst:197
195+ #: ../../library/importlib.metadata.rst:199
192196msgid ""
193197"While the above API is the most common and convenient usage, you can get all"
194198" of that information from the ``Distribution`` class. A ``Distribution`` is"
195199" an abstract object that represents the metadata for a Python package. You "
196200"can get the ``Distribution`` instance::"
197201msgstr ""
198202
199- #: ../../library/importlib.metadata.rst:205
203+ #: ../../library/importlib.metadata.rst:207
200204msgid ""
201205"Thus, an alternative way to get the version number is through the "
202206"``Distribution`` instance::"
203207msgstr ""
204208
205- #: ../../library/importlib.metadata.rst:211
209+ #: ../../library/importlib.metadata.rst:213
206210msgid ""
207211"There are all kinds of additional metadata available on the ``Distribution``"
208212" instance::"
209213msgstr ""
210214
211- #: ../../library/importlib.metadata.rst:219
215+ #: ../../library/importlib.metadata.rst:221
212216msgid ""
213217"The full set of available metadata is not described here. See :pep:`566` "
214218"for additional details."
215219msgstr ""
216220
217- #: ../../library/importlib.metadata.rst:224
221+ #: ../../library/importlib.metadata.rst:226
218222msgid "Extending the search algorithm"
219223msgstr ""
220224
221- #: ../../library/importlib.metadata.rst:226
225+ #: ../../library/importlib.metadata.rst:228
222226msgid ""
223227"Because package metadata is not available through :data:`sys.path` searches,"
224228" or package loaders directly, the metadata for a package is found through "
@@ -227,14 +231,14 @@ msgid ""
227231"path finders <meta path finder>` on :data:`sys.meta_path`."
228232msgstr ""
229233
230- #: ../../library/importlib.metadata.rst:232
234+ #: ../../library/importlib.metadata.rst:234
231235msgid ""
232236"The default ``PathFinder`` for Python includes a hook that calls into "
233237"``importlib.metadata.MetadataPathFinder`` for finding distributions loaded "
234238"from typical file-system-based paths."
235239msgstr ""
236240
237- #: ../../library/importlib.metadata.rst:236
241+ #: ../../library/importlib.metadata.rst:238
238242msgid ""
239243"The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the "
240244"interface expected of finders by Python's import system. "
@@ -244,14 +248,14 @@ msgid ""
244248"base class, which defines this abstract method::"
245249msgstr ""
246250
247- #: ../../library/importlib.metadata.rst:250
251+ #: ../../library/importlib.metadata.rst:252
248252msgid ""
249253"The ``DistributionFinder.Context`` object provides ``.path`` and ``.name`` "
250254"properties indicating the path to search and name to match and may supply "
251255"other relevant context."
252256msgstr ""
253257
254- #: ../../library/importlib.metadata.rst:254
258+ #: ../../library/importlib.metadata.rst:256
255259msgid ""
256260"What this means in practice is that to support finding distribution package "
257261"metadata in locations other than the file system, subclass ``Distribution`` "
@@ -260,11 +264,11 @@ msgid ""
260264"method."
261265msgstr ""
262266
263- #: ../../library/importlib.metadata.rst:267
267+ #: ../../library/importlib.metadata.rst:269
264268msgid "Footnotes"
265269msgstr "备注"
266270
267- #: ../../library/importlib.metadata.rst:268
271+ #: ../../library/importlib.metadata.rst:270
268272msgid ""
269273"Technically, the returned distribution metadata object is an "
270274":class:`email.message.EmailMessage` instance, but this is an implementation "
0 commit comments