Skip to content

Sync with CPython 3.11 #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 23, 2023
300 changes: 149 additions & 151 deletions howto/logging-cookbook.po

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions library/asyncio-policy.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-11 00:15+0000\n"
"POT-Creation-Date: 2023-01-14 00:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -147,9 +147,10 @@ msgstr ""

#: ../../library/asyncio-policy.rst:116
msgid ""
"In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc:"
"`DeprecationWarning` if there is no running event loop and no current loop "
"is set. In some future Python release this will become an error."
"In Python versions 3.10.9, 3.11.1 and 3.12 the :meth:`get_event_loop` method "
"of the default asyncio policy emits a :exc:`DeprecationWarning` if there is "
"no running event loop and no current loop is set. In some future Python "
"release this will become an error."
msgstr ""

#: ../../library/asyncio-policy.rst:124
Expand Down
6 changes: 3 additions & 3 deletions library/datetime.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-11 00:18+0000\n"
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
"PO-Revision-Date: 2018-05-23 14:42+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -1636,8 +1636,8 @@ msgstr ""
msgid ""
"Because naive ``datetime`` objects are treated by many ``datetime`` methods "
"as local times, it is preferred to use aware datetimes to represent times in "
"UTC; as a result, using ``utcfromtimetuple`` may give misleading results. If "
"you have a naive ``datetime`` representing UTC, use ``datetime."
"UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading "
"results. If you have a naive ``datetime`` representing UTC, use ``datetime."
"replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :"
"meth:`.datetime.timetuple`."
msgstr ""
Expand Down
12 changes: 6 additions & 6 deletions library/email.mime.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
"POT-Creation-Date: 2023-01-15 00:18+0000\n"
"PO-Revision-Date: 2018-05-23 16:00+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -165,9 +165,9 @@ msgstr "模組:\\ :mod:`email.mime.application`"
msgid ""
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
"`MIMEApplication` class is used to represent MIME message objects of major "
"type :mimetype:`application`. *_data* is a string containing the raw byte "
"data. Optional *_subtype* specifies the MIME subtype and defaults to :"
"mimetype:`octet-stream`."
"type :mimetype:`application`. *_data* contains the bytes for the raw "
"application data. Optional *_subtype* specifies the MIME subtype and "
"defaults to :mimetype:`octet-stream`."
msgstr ""

#: ../../library/email.mime.rst:121
Expand All @@ -194,7 +194,7 @@ msgstr "模組:\\ :mod:`email.mime.audio`"
msgid ""
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
"`MIMEAudio` class is used to create MIME message objects of major type :"
"mimetype:`audio`. *_audiodata* is a string containing the raw audio data. "
"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. "
"If this data can be decoded as au, wav, aiff, or aifc, then the subtype will "
"be automatically included in the :mailheader:`Content-Type` header. "
"Otherwise you can explicitly specify the audio subtype via the *_subtype* "
Expand Down Expand Up @@ -222,7 +222,7 @@ msgstr "模組:\\ :mod:`email.mime.image`"
msgid ""
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
"`MIMEImage` class is used to create MIME message objects of major type :"
"mimetype:`image`. *_imagedata* is a string containing the raw image data. "
"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. "
"If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, "
"rast, xbm, bmp, webp, and exr attempted), then the subtype will be "
"automatically included in the :mailheader:`Content-Type` header. Otherwise "
Expand Down
52 changes: 26 additions & 26 deletions library/enum.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-04 00:15+0000\n"
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
"PO-Revision-Date: 2018-05-23 16:01+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -84,19 +84,19 @@ msgid "Nomenclature"
msgstr ""

#: ../../library/enum.rst:55
msgid "The class :class:`Color` is an *enumeration* (or *enum*)"
msgid "The class :class:`!Color` is an *enumeration* (or *enum*)"
msgstr ""

#: ../../library/enum.rst:56
msgid ""
"The attributes :attr:`Color.RED`, :attr:`Color.GREEN`, etc., are "
"The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are "
"*enumeration members* (or *members*) and are functionally constants."
msgstr ""

#: ../../library/enum.rst:58
msgid ""
"The enum members have *names* and *values* (the name of :attr:`Color.RED` is "
"``RED``, the value of :attr:`Color.BLUE` is ``3``, etc.)"
"The enum members have *names* and *values* (the name of :attr:`!Color.RED` "
"is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)"
msgstr ""

#: ../../library/enum.rst:65
Expand Down Expand Up @@ -292,8 +292,8 @@ msgstr ""

#: ../../library/enum.rst:168
msgid ""
"*EnumType* is responsible for setting the correct :meth:`__repr__`, :meth:"
"`__str__`, :meth:`__format__`, and :meth:`__reduce__` methods on the final "
"*EnumType* is responsible for setting the correct :meth:`!__repr__`, :meth:`!"
"__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the final "
"*enum*, as well as creating the enum members, properly handling duplicates, "
"providing iteration over the enum class, etc."
msgstr ""
Expand Down Expand Up @@ -548,9 +548,9 @@ msgstr ""

#: ../../library/enum.rst:425
msgid ""
":meth:`__str__` is now :func:`int.__str__` to better support the "
"*replacement of existing constants* use-case. :meth:`__format__` was "
"already :func:`int.__format__` for that same reason."
":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the "
"*replacement of existing constants* use-case. :meth:`~object.__format__` was "
"already :meth:`!int.__format__` for that same reason."
msgstr ""

#: ../../library/enum.rst:432
Expand Down Expand Up @@ -693,7 +693,7 @@ msgstr ""

#: ../../library/enum.rst:616
msgid ""
":class:`!ReprEum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, "
":class:`!ReprEnum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, "
"but the :class:`str() <str>` of the mixed-in data type:"
msgstr ""

Expand Down Expand Up @@ -775,15 +775,15 @@ msgstr ""

#: ../../library/enum.rst:756
msgid ""
":attr:`__members__` is a read-only ordered mapping of ``member_name``:"
"``member`` items. It is only available on the class."
":attr:`~EnumType.__members__` is a read-only ordered mapping of "
"``member_name``:``member`` items. It is only available on the class."
msgstr ""

#: ../../library/enum.rst:759
msgid ""
":meth:`__new__`, if specified, must create and return the enum members; it "
"is also a very good idea to set the member's :attr:`_value_` appropriately. "
"Once all the members are created it is no longer used."
":meth:`~object.__new__`, if specified, must create and return the enum "
"members; it is also a very good idea to set the member's :attr:`!_value_` "
"appropriately. Once all the members are created it is no longer used."
msgstr ""

#: ../../library/enum.rst:765
Expand Down Expand Up @@ -851,12 +851,12 @@ msgstr ""
#: ../../library/enum.rst:798
msgid ""
"*auto* can be used in place of a value. If used, the *Enum* machinery will "
"call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. "
"For *Enum* and *IntEnum* that appropriate value will be the last value plus "
"one; for *Flag* and *IntFlag* it will be the first power-of-two greater than "
"the highest value; for *StrEnum* it will be the lower-cased version of the "
"member's name. Care must be taken if mixing *auto()* with manually "
"specified values."
"call an *Enum*'s :meth:`~Enum._generate_next_value_` to get an appropriate "
"value. For *Enum* and *IntEnum* that appropriate value will be the last "
"value plus one; for *Flag* and *IntFlag* it will be the first power-of-two "
"greater than the highest value; for *StrEnum* it will be the lower-cased "
"version of the member's name. Care must be taken if mixing *auto()* with "
"manually specified values."
msgstr ""

#: ../../library/enum.rst:806
Expand Down Expand Up @@ -898,8 +898,8 @@ msgstr ""

#: ../../library/enum.rst:822
msgid ""
"in 3.13 the default ``\"generate_next_value_`` will always return the "
"highest member value incremented by 1, and will fail if any member is an "
"in 3.13 the default ``_generate_next_value_`` will always return the highest "
"member value incremented by 1, and will fail if any member is an "
"incompatible type."
msgstr ""

Expand All @@ -921,8 +921,8 @@ msgstr ""
#: ../../library/enum.rst:841
msgid ""
"A :keyword:`class` decorator specifically for enumerations. It searches an "
"enumeration's :attr:`__members__`, gathering any aliases it finds; if any "
"are found :exc:`ValueError` is raised with the details::"
"enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; "
"if any are found :exc:`ValueError` is raised with the details::"
msgstr ""

#: ../../library/enum.rst:859
Expand Down
70 changes: 35 additions & 35 deletions library/optparse.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-06 00:17+0000\n"
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
"PO-Revision-Date: 2018-05-23 16:07+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -152,8 +152,8 @@ msgstr ""

#: ../../library/optparse.rst:125
msgid ""
"a plus sign followed by a single letter, or a few letters, or a word, e.g. ``"
"+f``, ``+rgb``"
"a plus sign followed by a single letter, or a few letters, or a word, e.g. "
"``+f``, ``+rgb``"
msgstr ""

#: ../../library/optparse.rst:128
Expand Down Expand Up @@ -527,7 +527,7 @@ msgid "``\"store_const\"``"
msgstr "``\"store_const\"``"

#: ../../library/optparse.rst:407 ../../library/optparse.rst:928
msgid "store a constant value"
msgid "store a constant value, pre-set via :attr:`Option.const`"
msgstr ""

#: ../../library/optparse.rst:410 ../../library/optparse.rst:937
Expand Down Expand Up @@ -566,10 +566,10 @@ msgstr ""

#: ../../library/optparse.rst:427
msgid ""
"All of the above examples involve setting some variable (the \"destination"
"\") when certain command-line options are seen. What happens if those "
"options are never seen? Since we didn't supply any defaults, they are all "
"set to ``None``. This is usually fine, but sometimes you want more "
"All of the above examples involve setting some variable (the "
"\"destination\") when certain command-line options are seen. What happens "
"if those options are never seen? Since we didn't supply any defaults, they "
"are all set to ``None``. This is usually fine, but sometimes you want more "
"control. :mod:`optparse` lets you supply a default value for each "
"destination, which is assigned before the command line is parsed."
msgstr ""
Expand Down Expand Up @@ -813,8 +813,8 @@ msgstr ""
#: ../../library/optparse.rst:692
msgid ""
"Print the version message for the current program (``self.version``) to "
"*file* (default stdout). As with :meth:`print_usage`, any occurrence of ``"
"%prog`` in ``self.version`` is replaced with the name of the current "
"*file* (default stdout). As with :meth:`print_usage`, any occurrence of "
"``%prog`` in ``self.version`` is replaced with the name of the current "
"program. Does nothing if ``self.version`` is empty or undefined."
msgstr ""

Expand Down Expand Up @@ -916,8 +916,8 @@ msgstr ""
#: ../../library/optparse.rst:810
msgid ""
"The usage summary to print when your program is run incorrectly or with a "
"help option. When :mod:`optparse` prints the usage string, it expands ``"
"%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed "
"help option. When :mod:`optparse` prints the usage string, it expands "
"``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed "
"that keyword argument). To suppress a usage message, pass the special "
"value :data:`optparse.SUPPRESS_USAGE`."
msgstr ""
Expand Down Expand Up @@ -951,8 +951,8 @@ msgstr ""
msgid ""
"A version string to print when the user supplies a version option. If you "
"supply a true value for ``version``, :mod:`optparse` automatically adds a "
"version option with the single option string ``--version``. The substring ``"
"%prog`` is expanded the same as for ``usage``."
"version option with the single option string ``--version``. The substring "
"``%prog`` is expanded the same as for ``usage``."
msgstr ""

#: ../../library/optparse.rst:835
Expand Down Expand Up @@ -1123,7 +1123,7 @@ msgid "``\"append_const\"``"
msgstr "``\"append_const\"``"

#: ../../library/optparse.rst:940
msgid "append a constant value to a list"
msgid "append a constant value to a list, pre-set via :attr:`Option.const`"
msgstr ""

#: ../../library/optparse.rst:949 ../../library/optparse.rst:1226
Expand Down Expand Up @@ -1214,8 +1214,8 @@ msgstr ""

#: ../../library/optparse.rst:1011
msgid ""
"The argument type expected by this option (e.g., ``\"string\"`` or ``\"int"
"\"``); the available option types are documented :ref:`here <optparse-"
"The argument type expected by this option (e.g., ``\"string\"`` or "
"``\"int\"``); the available option types are documented :ref:`here <optparse-"
"standard-option-types>`."
msgstr ""

Expand Down Expand Up @@ -1770,11 +1770,11 @@ msgstr ""
#: ../../library/optparse.rst:1452
msgid ""
"At this point, :mod:`optparse` detects that a previously added option is "
"already using the ``-n`` option string. Since ``conflict_handler`` is ``"
"\"resolve\"``, it resolves the situation by removing ``-n`` from the earlier "
"option's list of option strings. Now ``--dry-run`` is the only way for the "
"user to activate that option. If the user asks for help, the help message "
"will reflect that::"
"already using the ``-n`` option string. Since ``conflict_handler`` is "
"``\"resolve\"``, it resolves the situation by removing ``-n`` from the "
"earlier option's list of option strings. Now ``--dry-run`` is the only way "
"for the user to activate that option. If the user asks for help, the help "
"message will reflect that::"
msgstr ""

#: ../../library/optparse.rst:1463
Expand Down Expand Up @@ -1982,8 +1982,8 @@ msgid ""
"is the option string seen on the command-line that's triggering the "
"callback. (If an abbreviated long option was used, ``opt_str`` will be the "
"full, canonical option string---e.g. if the user puts ``--foo`` on the "
"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be ``"
"\"--foobar\"``.)"
"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be "
"``\"--foobar\"``.)"
msgstr ""

#: ../../library/optparse.rst:1637
Expand Down Expand Up @@ -2333,10 +2333,10 @@ msgstr ""

#: ../../library/optparse.rst:1950
msgid ""
"These are overlapping sets: some default \"store\" actions are ``\"store"
"\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while the "
"default \"typed\" actions are ``\"store\"``, ``\"append\"``, and ``\"callback"
"\"``."
"These are overlapping sets: some default \"store\" actions are "
"``\"store\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while "
"the default \"typed\" actions are ``\"store\"``, ``\"append\"``, and "
"``\"callback\"``."
msgstr ""

#: ../../library/optparse.rst:1954
Expand Down Expand Up @@ -2425,11 +2425,11 @@ msgstr ""
msgid ""
"If the ``attr`` attribute of ``values`` doesn't exist or is ``None``, then "
"ensure_value() first sets it to ``value``, and then returns 'value. This is "
"very handy for actions like ``\"extend\"``, ``\"append\"``, and ``\"count"
"\"``, all of which accumulate data in a variable and expect that variable to "
"be of a certain type (a list for the first two, an integer for the latter). "
"Using :meth:`ensure_value` means that scripts using your action don't have "
"to worry about setting a default value for the option destinations in "
"question; they can just leave the default as ``None`` and :meth:"
"`ensure_value` will take care of getting it right when it's needed."
"very handy for actions like ``\"extend\"``, ``\"append\"``, and "
"``\"count\"``, all of which accumulate data in a variable and expect that "
"variable to be of a certain type (a list for the first two, an integer for "
"the latter). Using :meth:`ensure_value` means that scripts using your "
"action don't have to worry about setting a default value for the option "
"destinations in question; they can just leave the default as ``None`` and :"
"meth:`ensure_value` will take care of getting it right when it's needed."
msgstr ""
Loading