|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2026-06-22 14:38+0000\n" |
| 11 | +"POT-Creation-Date: 2026-07-22 20:53+0000\n" |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -8505,7 +8505,7 @@ msgid "A similar model involves installing an alternative Python distribution, b |
8505 | 8505 | msgstr "" |
8506 | 8506 |
|
8507 | 8507 | #: ../source/overview.rst:282 |
8508 | | -msgid "`ActiveState ActivePython <https://www.activestate.com/products/python/>`_" |
| 8508 | +msgid "`ActiveState ActivePython <https://www.activestate.com/platform/supported-languages/python>`_" |
8509 | 8509 | msgstr "" |
8510 | 8510 |
|
8511 | 8511 | #: ../source/overview.rst:283 |
@@ -9155,7 +9155,7 @@ msgstr "" |
9155 | 9155 | #: ../source/specifications/entry-points.rst:163 |
9156 | 9156 | #: ../source/specifications/externally-managed-environments.rst:472 |
9157 | 9157 | #: ../source/specifications/glob-patterns.rst:118 |
9158 | | -#: ../source/specifications/inline-script-metadata.rst:213 |
| 9158 | +#: ../source/specifications/inline-script-metadata.rst:224 |
9159 | 9159 | #: ../source/specifications/name-normalization.rst:50 |
9160 | 9160 | #: ../source/specifications/platform-compatibility-tags.rst:440 |
9161 | 9161 | #: ../source/specifications/pylock-toml.rst:841 |
@@ -9224,7 +9224,7 @@ msgstr "" |
9224 | 9224 |
|
9225 | 9225 | #: ../source/specifications/build-details/index.rst:28 |
9226 | 9226 | #: ../source/specifications/build-details/v1.0.rst:16 |
9227 | | -#: ../source/specifications/inline-script-metadata.rst:100 |
| 9227 | +#: ../source/specifications/inline-script-metadata.rst:111 |
9228 | 9228 | #: ../source/specifications/pylock-toml.rst:737 |
9229 | 9229 | msgid "Example" |
9230 | 9230 | msgstr "" |
@@ -10728,7 +10728,7 @@ msgid "There are several known cases of tools which have good cause to be strict |
10728 | 10728 | msgstr "" |
10729 | 10729 |
|
10730 | 10730 | #: ../source/specifications/dependency-groups.rst:157 |
10731 | | -#: ../source/specifications/inline-script-metadata.rst:123 |
| 10731 | +#: ../source/specifications/inline-script-metadata.rst:134 |
10732 | 10732 | msgid "Reference Implementation" |
10733 | 10733 | msgstr "" |
10734 | 10734 |
|
@@ -12536,72 +12536,88 @@ msgstr "" |
12536 | 12536 | msgid "Tools MUST NOT read from metadata blocks with types that have not been standardized by this specification." |
12537 | 12537 | msgstr "" |
12538 | 12538 |
|
12539 | | -#: ../source/specifications/inline-script-metadata.rst:74 |
| 12539 | +#: ../source/specifications/inline-script-metadata.rst:73 |
| 12540 | +msgid "Note that the specification only requires that *top-level* comment blocks are recognised as containing metadata. However, parsing Python code is non-trivial, and therefore:" |
| 12541 | +msgstr "" |
| 12542 | + |
| 12543 | +#: ../source/specifications/inline-script-metadata.rst:77 |
| 12544 | +msgid "Tools MAY choose to do a simple textual scan, rather than a full Python parse." |
| 12545 | +msgstr "" |
| 12546 | + |
| 12547 | +#: ../source/specifications/inline-script-metadata.rst:78 |
| 12548 | +msgid "As a result of the previous point, the behaviour of scripts that contain data that looks like metadata within another Python construct such as a multi-line string is tool-dependent and should not be relied on." |
| 12549 | +msgstr "" |
| 12550 | + |
| 12551 | +#: ../source/specifications/inline-script-metadata.rst:81 |
| 12552 | +msgid "The canonical regular expression provided above is an example of an implementation that does a simple textual scan." |
| 12553 | +msgstr "" |
| 12554 | + |
| 12555 | +#: ../source/specifications/inline-script-metadata.rst:85 |
12540 | 12556 | msgid "script type" |
12541 | 12557 | msgstr "" |
12542 | 12558 |
|
12543 | | -#: ../source/specifications/inline-script-metadata.rst:76 |
| 12559 | +#: ../source/specifications/inline-script-metadata.rst:87 |
12544 | 12560 | msgid "The first type of metadata block is named ``script``, which contains script metadata (dependency data and tool configuration)." |
12545 | 12561 | msgstr "" |
12546 | 12562 |
|
12547 | | -#: ../source/specifications/inline-script-metadata.rst:79 |
| 12563 | +#: ../source/specifications/inline-script-metadata.rst:90 |
12548 | 12564 | msgid "This document MAY include the top-level fields ``dependencies`` and ``requires-python``, and MAY optionally include a ``[tool]`` table." |
12549 | 12565 | msgstr "" |
12550 | 12566 |
|
12551 | | -#: ../source/specifications/inline-script-metadata.rst:82 |
| 12567 | +#: ../source/specifications/inline-script-metadata.rst:93 |
12552 | 12568 | msgid "The ``[tool]`` table MAY be used by any tool, script runner or otherwise, to configure behavior. It has the same semantics as the :ref:`[tool] table in pyproject.toml <pyproject-tool-table>`." |
12553 | 12569 | msgstr "" |
12554 | 12570 |
|
12555 | | -#: ../source/specifications/inline-script-metadata.rst:86 |
| 12571 | +#: ../source/specifications/inline-script-metadata.rst:97 |
12556 | 12572 | msgid "The top-level fields are:" |
12557 | 12573 | msgstr "" |
12558 | 12574 |
|
12559 | | -#: ../source/specifications/inline-script-metadata.rst:88 |
| 12575 | +#: ../source/specifications/inline-script-metadata.rst:99 |
12560 | 12576 | msgid "``dependencies``: A list of strings that specifies the runtime dependencies of the script. Each entry MUST be a valid :ref:`dependency specifier <dependency-specifiers>`." |
12561 | 12577 | msgstr "" |
12562 | 12578 |
|
12563 | | -#: ../source/specifications/inline-script-metadata.rst:91 |
| 12579 | +#: ../source/specifications/inline-script-metadata.rst:102 |
12564 | 12580 | msgid "``requires-python``: A string that specifies the Python version(s) with which the script is compatible. The value of this field MUST be a valid :ref:`version specifier <version-specifiers>`." |
12565 | 12581 | msgstr "" |
12566 | 12582 |
|
12567 | | -#: ../source/specifications/inline-script-metadata.rst:95 |
| 12583 | +#: ../source/specifications/inline-script-metadata.rst:106 |
12568 | 12584 | msgid "Script runners MUST error if the specified ``dependencies`` cannot be provided. Script runners SHOULD error if no version of Python that satisfies the specified ``requires-python`` can be provided." |
12569 | 12585 | msgstr "" |
12570 | 12586 |
|
12571 | | -#: ../source/specifications/inline-script-metadata.rst:102 |
| 12587 | +#: ../source/specifications/inline-script-metadata.rst:113 |
12572 | 12588 | msgid "The following is an example of a script with embedded metadata:" |
12573 | 12589 | msgstr "" |
12574 | 12590 |
|
12575 | | -#: ../source/specifications/inline-script-metadata.rst:125 |
| 12591 | +#: ../source/specifications/inline-script-metadata.rst:136 |
12576 | 12592 | msgid "The following is an example of how to read the metadata on Python 3.11 or higher." |
12577 | 12593 | msgstr "" |
12578 | 12594 |
|
12579 | | -#: ../source/specifications/inline-script-metadata.rst:151 |
| 12595 | +#: ../source/specifications/inline-script-metadata.rst:162 |
12580 | 12596 | msgid "Often tools will edit dependencies like package managers or dependency update automation in CI. The following is a crude example of modifying the content using the ``tomlkit`` library__." |
12581 | 12597 | msgstr "" |
12582 | 12598 |
|
12583 | | -#: ../source/specifications/inline-script-metadata.rst:182 |
| 12599 | +#: ../source/specifications/inline-script-metadata.rst:193 |
12584 | 12600 | msgid "Note that this example used a library that preserves TOML formatting. This is not a requirement for editing by any means but rather is a \"nice to have\" feature." |
12585 | 12601 | msgstr "" |
12586 | 12602 |
|
12587 | | -#: ../source/specifications/inline-script-metadata.rst:186 |
| 12603 | +#: ../source/specifications/inline-script-metadata.rst:197 |
12588 | 12604 | msgid "The following is an example of how to read a stream of arbitrary metadata blocks." |
12589 | 12605 | msgstr "" |
12590 | 12606 |
|
12591 | | -#: ../source/specifications/inline-script-metadata.rst:205 |
| 12607 | +#: ../source/specifications/inline-script-metadata.rst:216 |
12592 | 12608 | #: ../source/specifications/simple-repository-api.rst:925 |
12593 | 12609 | msgid "Recommendations" |
12594 | 12610 | msgstr "" |
12595 | 12611 |
|
12596 | | -#: ../source/specifications/inline-script-metadata.rst:207 |
| 12612 | +#: ../source/specifications/inline-script-metadata.rst:218 |
12597 | 12613 | msgid "Tools that support managing different versions of Python should attempt to use the highest available version of Python that is compatible with the script's ``requires-python`` metadata, if defined." |
12598 | 12614 | msgstr "" |
12599 | 12615 |
|
12600 | | -#: ../source/specifications/inline-script-metadata.rst:215 |
| 12616 | +#: ../source/specifications/inline-script-metadata.rst:226 |
12601 | 12617 | msgid "October 2023: This specification was conditionally approved through :pep:`723`." |
12602 | 12618 | msgstr "" |
12603 | 12619 |
|
12604 | | -#: ../source/specifications/inline-script-metadata.rst:216 |
| 12620 | +#: ../source/specifications/inline-script-metadata.rst:227 |
12605 | 12621 | msgid "January 2024: Through amendments to :pep:`723`, the ``pyproject`` metadata block type was renamed to ``script``, and the ``[run]`` table was dropped, making the ``dependencies`` and ``requires-python`` keys top-level. Additionally, the specification is no longer provisional." |
12606 | 12622 | msgstr "" |
12607 | 12623 |
|
|
0 commit comments