|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2024-01-19 21:15+0000\n" |
| 11 | +"POT-Creation-Date: 2024-01-21 13:27+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" |
@@ -7590,7 +7590,7 @@ msgstr "" |
7590 | 7590 | #: ../source/specifications/direct-url.rst:67 |
7591 | 7591 | #: ../source/specifications/entry-points.rst:164 |
7592 | 7592 | #: ../source/specifications/externally-managed-environments.rst:472 |
7593 | | -#: ../source/specifications/inline-script-metadata.rst:239 |
| 7593 | +#: ../source/specifications/inline-script-metadata.rst:211 |
7594 | 7594 | #: ../source/specifications/name-normalization.rst:50 |
7595 | 7595 | #: ../source/specifications/platform-compatibility-tags.rst:332 |
7596 | 7596 | #: ../source/specifications/pyproject-toml.rst:442 |
@@ -8295,7 +8295,7 @@ msgstr "" |
8295 | 8295 | #: ../source/specifications/dependency-specifiers.rst:26 |
8296 | 8296 | #: ../source/specifications/direct-url-data-structure.rst:19 |
8297 | 8297 | #: ../source/specifications/direct-url.rst:15 |
8298 | | -#: ../source/specifications/inline-script-metadata.rst:18 |
| 8298 | +#: ../source/specifications/inline-script-metadata.rst:11 |
8299 | 8299 | msgid "Specification" |
8300 | 8300 | msgstr "" |
8301 | 8301 |
|
@@ -9421,135 +9421,127 @@ msgstr "" |
9421 | 9421 | msgid "Inline script metadata" |
9422 | 9422 | msgstr "" |
9423 | 9423 |
|
9424 | | -#: ../source/specifications/inline-script-metadata.rst:6 |
9425 | | -msgid "This specification has been **provisionally accepted**. It is subject to being changed or abandoned. See the `PEP 723 conditional acceptance thread <pep723-thread_>`_ for details." |
9426 | | -msgstr "" |
9427 | | - |
9428 | | -#: ../source/specifications/inline-script-metadata.rst:12 |
| 9424 | +#: ../source/specifications/inline-script-metadata.rst:5 |
9429 | 9425 | msgid "This specification defines a metadata format that can be embedded in single-file Python scripts to assist launchers, IDEs and other external tools which may need to interact with such scripts." |
9430 | 9426 | msgstr "" |
9431 | 9427 |
|
9432 | | -#: ../source/specifications/inline-script-metadata.rst:20 |
| 9428 | +#: ../source/specifications/inline-script-metadata.rst:13 |
9433 | 9429 | msgid "This specification defines a metadata comment block format (loosely inspired by `reStructuredText Directives`__)." |
9434 | 9430 | msgstr "" |
9435 | 9431 |
|
9436 | | -#: ../source/specifications/inline-script-metadata.rst:25 |
| 9432 | +#: ../source/specifications/inline-script-metadata.rst:18 |
9437 | 9433 | msgid "Any Python script may have top-level comment blocks that MUST start with the line ``# /// TYPE`` where ``TYPE`` determines how to process the content. That is: a single ``#``, followed by a single space, followed by three forward slashes, followed by a single space, followed by the type of metadata. Block MUST end with the line ``# ///``. That is: a single ``#``, followed by a single space, followed by three forward slashes. The ``TYPE`` MUST only consist of ASCII letters, numbers and hyphens." |
9438 | 9434 | msgstr "" |
9439 | 9435 |
|
9440 | | -#: ../source/specifications/inline-script-metadata.rst:33 |
| 9436 | +#: ../source/specifications/inline-script-metadata.rst:26 |
9441 | 9437 | msgid "Every line between these two lines (``# /// TYPE`` and ``# ///``) MUST be a comment starting with ``#``. If there are characters after the ``#`` then the first character MUST be a space. The embedded content is formed by taking away the first two characters of each line if the second character is a space, otherwise just the first character (which means the line consists of only a single ``#``)." |
9442 | 9438 | msgstr "" |
9443 | 9439 |
|
9444 | | -#: ../source/specifications/inline-script-metadata.rst:40 |
| 9440 | +#: ../source/specifications/inline-script-metadata.rst:33 |
9445 | 9441 | msgid "Precedence for an ending line ``# ///`` is given when the next line is not a valid embedded content line as described above. For example, the following is a single fully valid block:" |
9446 | 9442 | msgstr "" |
9447 | 9443 |
|
9448 | | -#: ../source/specifications/inline-script-metadata.rst:56 |
| 9444 | +#: ../source/specifications/inline-script-metadata.rst:49 |
9449 | 9445 | msgid "A starting line MUST NOT be placed between another starting line and its ending line. In such cases tools MAY produce an error. Unclosed blocks MUST be ignored." |
9450 | 9446 | msgstr "" |
9451 | 9447 |
|
9452 | | -#: ../source/specifications/inline-script-metadata.rst:59 |
| 9448 | +#: ../source/specifications/inline-script-metadata.rst:52 |
9453 | 9449 | msgid "When there are multiple comment blocks of the same ``TYPE`` defined, tools MUST produce an error." |
9454 | 9450 | msgstr "" |
9455 | 9451 |
|
9456 | | -#: ../source/specifications/inline-script-metadata.rst:62 |
| 9452 | +#: ../source/specifications/inline-script-metadata.rst:55 |
9457 | 9453 | msgid "Tools reading embedded metadata MAY respect the standard Python encoding declaration. If they choose not to do so, they MUST process the file as UTF-8." |
9458 | 9454 | msgstr "" |
9459 | 9455 |
|
9460 | | -#: ../source/specifications/inline-script-metadata.rst:65 |
| 9456 | +#: ../source/specifications/inline-script-metadata.rst:58 |
9461 | 9457 | msgid "This is the canonical regular expression that MAY be used to parse the metadata:" |
9462 | 9458 | msgstr "" |
9463 | 9459 |
|
9464 | | -#: ../source/specifications/inline-script-metadata.rst:72 |
| 9460 | +#: ../source/specifications/inline-script-metadata.rst:65 |
9465 | 9461 | msgid "In circumstances where there is a discrepancy between the text specification and the regular expression, the text specification takes precedence." |
9466 | 9462 | msgstr "" |
9467 | 9463 |
|
9468 | | -#: ../source/specifications/inline-script-metadata.rst:75 |
9469 | | -msgid "Tools MUST NOT read from metadata blocks with types that have not been standardized by this PEP or future ones." |
| 9464 | +#: ../source/specifications/inline-script-metadata.rst:68 |
| 9465 | +msgid "Tools MUST NOT read from metadata blocks with types that have not been standardized by this specification." |
9470 | 9466 | msgstr "" |
9471 | 9467 |
|
9472 | | -#: ../source/specifications/inline-script-metadata.rst:79 |
9473 | | -msgid "pyproject type" |
| 9468 | +#: ../source/specifications/inline-script-metadata.rst:72 |
| 9469 | +msgid "script type" |
9474 | 9470 | msgstr "" |
9475 | 9471 |
|
9476 | | -#: ../source/specifications/inline-script-metadata.rst:81 |
9477 | | -msgid "The first type of metadata block is named ``pyproject`` which represents content similar to what one would see in a ``pyproject.toml`` file." |
| 9472 | +#: ../source/specifications/inline-script-metadata.rst:74 |
| 9473 | +msgid "The first type of metadata block is named ``script``, which contains script metadata (dependency data and tool configuration)." |
9478 | 9474 | msgstr "" |
9479 | 9475 |
|
9480 | | -#: ../source/specifications/inline-script-metadata.rst:84 |
9481 | | -msgid "This document MAY include the ``[run]`` and ``[tool]`` tables." |
| 9476 | +#: ../source/specifications/inline-script-metadata.rst:77 |
| 9477 | +msgid "This document MAY include the top-level fields ``dependencies`` and ``requires-python``, and MAY optionally include a ``[tool]`` table." |
9482 | 9478 | msgstr "" |
9483 | 9479 |
|
9484 | | -#: ../source/specifications/inline-script-metadata.rst:86 |
9485 | | -msgid "The :ref:`tool table <pyproject-tool-table>` MAY be used by any tool, script runner or otherwise, to configure behavior." |
| 9480 | +#: ../source/specifications/inline-script-metadata.rst:80 |
| 9481 | +msgid "The ``[tool]`` 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>`." |
9486 | 9482 | msgstr "" |
9487 | 9483 |
|
9488 | | -#: ../source/specifications/inline-script-metadata.rst:89 |
9489 | | -msgid "The ``[run]`` table MAY include the following optional fields:" |
| 9484 | +#: ../source/specifications/inline-script-metadata.rst:84 |
| 9485 | +msgid "The top-level fields are:" |
9490 | 9486 | msgstr "" |
9491 | 9487 |
|
9492 | | -#: ../source/specifications/inline-script-metadata.rst:91 |
| 9488 | +#: ../source/specifications/inline-script-metadata.rst:86 |
9493 | 9489 | 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>`." |
9494 | 9490 | msgstr "" |
9495 | 9491 |
|
9496 | | -#: ../source/specifications/inline-script-metadata.rst:94 |
| 9492 | +#: ../source/specifications/inline-script-metadata.rst:89 |
9497 | 9493 | 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>`." |
9498 | 9494 | msgstr "" |
9499 | 9495 |
|
9500 | | -#: ../source/specifications/inline-script-metadata.rst:98 |
9501 | | -msgid "Any future specifications that define additional fields for the ``[run]`` table when used in a ``pyproject.toml`` file MUST include the aforementioned fields exactly as specified. The fields defined by this specification are equally as applicable to full-fledged projects as they are to single-file scripts." |
9502 | | -msgstr "" |
9503 | | - |
9504 | | -#: ../source/specifications/inline-script-metadata.rst:103 |
| 9496 | +#: ../source/specifications/inline-script-metadata.rst:93 |
9505 | 9497 | 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." |
9506 | 9498 | msgstr "" |
9507 | 9499 |
|
9508 | | -#: ../source/specifications/inline-script-metadata.rst:108 |
| 9500 | +#: ../source/specifications/inline-script-metadata.rst:98 |
9509 | 9501 | msgid "Example" |
9510 | 9502 | msgstr "" |
9511 | 9503 |
|
9512 | | -#: ../source/specifications/inline-script-metadata.rst:110 |
9513 | | -msgid "The following is an example of a script with an embedded ``pyproject.toml``:" |
| 9504 | +#: ../source/specifications/inline-script-metadata.rst:100 |
| 9505 | +msgid "The following is an example of a script with embedded metadata:" |
9514 | 9506 | msgstr "" |
9515 | 9507 |
|
9516 | | -#: ../source/specifications/inline-script-metadata.rst:130 |
9517 | | -msgid "The following is an example of a proposed syntax for single-file Rust projects that embeds their equivalent of ``pyproject.toml``, which is called ``Cargo.toml``:" |
9518 | | -msgstr "" |
9519 | | - |
9520 | | -#: ../source/specifications/inline-script-metadata.rst:149 |
| 9508 | +#: ../source/specifications/inline-script-metadata.rst:121 |
9521 | 9509 | msgid "Reference Implementation" |
9522 | 9510 | msgstr "" |
9523 | 9511 |
|
9524 | | -#: ../source/specifications/inline-script-metadata.rst:151 |
| 9512 | +#: ../source/specifications/inline-script-metadata.rst:123 |
9525 | 9513 | msgid "The following is an example of how to read the metadata on Python 3.11 or higher." |
9526 | 9514 | msgstr "" |
9527 | 9515 |
|
9528 | | -#: ../source/specifications/inline-script-metadata.rst:177 |
| 9516 | +#: ../source/specifications/inline-script-metadata.rst:149 |
9529 | 9517 | 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__." |
9530 | 9518 | msgstr "" |
9531 | 9519 |
|
9532 | | -#: ../source/specifications/inline-script-metadata.rst:208 |
| 9520 | +#: ../source/specifications/inline-script-metadata.rst:180 |
9533 | 9521 | 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." |
9534 | 9522 | msgstr "" |
9535 | 9523 |
|
9536 | | -#: ../source/specifications/inline-script-metadata.rst:212 |
| 9524 | +#: ../source/specifications/inline-script-metadata.rst:184 |
9537 | 9525 | msgid "The following is an example of how to read a stream of arbitrary metadata blocks." |
9538 | 9526 | msgstr "" |
9539 | 9527 |
|
9540 | | -#: ../source/specifications/inline-script-metadata.rst:231 |
| 9528 | +#: ../source/specifications/inline-script-metadata.rst:203 |
9541 | 9529 | #: ../source/specifications/simple-repository-api.rst:816 |
9542 | 9530 | msgid "Recommendations" |
9543 | 9531 | msgstr "" |
9544 | 9532 |
|
9545 | | -#: ../source/specifications/inline-script-metadata.rst:233 |
| 9533 | +#: ../source/specifications/inline-script-metadata.rst:205 |
9546 | 9534 | 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." |
9547 | 9535 | msgstr "" |
9548 | 9536 |
|
9549 | | -#: ../source/specifications/inline-script-metadata.rst:241 |
| 9537 | +#: ../source/specifications/inline-script-metadata.rst:213 |
9550 | 9538 | msgid "October 2023: This specification was conditionally approved through :pep:`723`." |
9551 | 9539 | msgstr "" |
9552 | 9540 |
|
| 9541 | +#: ../source/specifications/inline-script-metadata.rst:214 |
| 9542 | +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." |
| 9543 | +msgstr "" |
| 9544 | + |
9553 | 9545 | #: ../source/specifications/name-normalization.rst:3 |
9554 | 9546 | msgid "Names and normalization" |
9555 | 9547 | msgstr "" |
|
0 commit comments