|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2025-10-16 23:52+0000\n" |
| 11 | +"POT-Creation-Date: 2025-10-17 01:14+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 < [email protected]>\n" |
@@ -9217,7 +9217,7 @@ msgstr "" |
9217 | 9217 | #: ../source/specifications/pylock-toml.rst:826 |
9218 | 9218 | #: ../source/specifications/pyproject-toml.rst:630 |
9219 | 9219 | #: ../source/specifications/recording-installed-packages.rst:278 |
9220 | | -#: ../source/specifications/simple-repository-api.rst:1012 |
| 9220 | +#: ../source/specifications/simple-repository-api.rst:972 |
9221 | 9221 | #: ../source/specifications/source-distribution-format.rst:153 |
9222 | 9222 | #: ../source/specifications/version-specifiers.rst:1269 |
9223 | 9223 | #: ../source/specifications/virtual-environments.rst:54 |
@@ -12441,7 +12441,7 @@ msgid "The following is an example of how to read a stream of arbitrary metadata |
12441 | 12441 | msgstr "" |
12442 | 12442 |
|
12443 | 12443 | #: ../source/specifications/inline-script-metadata.rst:205 |
12444 | | -#: ../source/specifications/simple-repository-api.rst:954 |
| 12444 | +#: ../source/specifications/simple-repository-api.rst:914 |
12445 | 12445 | msgid "Recommendations" |
12446 | 12446 | msgstr "" |
12447 | 12447 |
|
@@ -15874,135 +15874,103 @@ msgstr "" |
15874 | 15874 | msgid "For clients that wish to require specific configuration, they can keep track of which version+format a specific repository URL was configured for, and when making a request to that server, emit an ``Accept`` header that *only* includes the correct content type." |
15875 | 15875 | msgstr "" |
15876 | 15876 |
|
15877 | | -#: ../source/specifications/simple-repository-api.rst:915 |
15878 | | -msgid "TUF Support - PEP 458" |
15879 | | -msgstr "" |
15880 | | - |
15881 | | -#: ../source/specifications/simple-repository-api.rst:917 |
15882 | | -msgid ":pep:`458` requires that all API responses are hashable and that they can be uniquely identified by a path relative to the repository root. For a Simple API repository, the target path is the Root of our API (e.g. ``/simple/`` on PyPI). This creates challenges when accessing the API using a TUF client instead of directly using a standard HTTP client, as the TUF client cannot handle the fact that a target could have multiple different representations that all hash differently." |
15883 | | -msgstr "" |
15884 | | - |
15885 | | -#: ../source/specifications/simple-repository-api.rst:924 |
15886 | | -msgid ":pep:`458` does not specify what the target path should be for the Simple API, but TUF requires that the target paths be \"file-like\", in other words, a path like ``simple/PROJECT/`` is not acceptable, because it technically points to a directory." |
15887 | | -msgstr "" |
15888 | | - |
15889 | | -#: ../source/specifications/simple-repository-api.rst:929 |
15890 | | -msgid "The saving grace is that the target path does not *have* to actually match the URL being fetched from the Simple API, and it can just be a sigil that the fetching code knows how to transform into the actual URL that needs to be fetched. This same thing can hold true for other aspects of the actual HTTP request, such as the ``Accept`` header." |
15891 | | -msgstr "" |
15892 | | - |
15893 | | -#: ../source/specifications/simple-repository-api.rst:935 |
15894 | | -msgid "Ultimately figuring out how to map a directory to a filename is out of scope for this spec (but it would be in scope for :pep:`458`), and this spec defers making a decision about how exactly to represent this inside of :pep:`458` metadata." |
15895 | | -msgstr "" |
15896 | | - |
15897 | | -#: ../source/specifications/simple-repository-api.rst:939 |
15898 | | -msgid "However, it appears that the current WIP branch against pip that attempts to implement :pep:`458` is using a target path like ``simple/PROJECT/index.html``. This could be modified to include the API version and serialization format using something like ``simple/PROJECT/vnd.pypi.simple.vN.FORMAT``. So the v1 HTML format would be ``simple/PROJECT/vnd.pypi.simple.v1.html`` and the v1 JSON format would be ``simple/PROJECT/vnd.pypi.simple.v1.json``." |
15899 | | -msgstr "" |
15900 | | - |
15901 | | -#: ../source/specifications/simple-repository-api.rst:946 |
15902 | | -msgid "In this case, since ``text/html`` is an alias to ``application/vnd.pypi.simple.v1+html`` when interacting through TUF, it likely will make the most sense to normalize to the more explicit name." |
15903 | | -msgstr "" |
15904 | | - |
15905 | | -#: ../source/specifications/simple-repository-api.rst:950 |
15906 | | -msgid "Likewise the ``latest`` metaversion should not be included in the targets, only explicitly declared versions should be supported." |
15907 | | -msgstr "" |
15908 | | - |
15909 | | -#: ../source/specifications/simple-repository-api.rst:956 |
| 15877 | +#: ../source/specifications/simple-repository-api.rst:916 |
15910 | 15878 | msgid "This section is non-normative, and represents what the spec authors believe to be the best default implementation decisions for something implementing this spec, but it does **not** represent any sort of requirement to match these decisions." |
15911 | 15879 | msgstr "" |
15912 | 15880 |
|
15913 | | -#: ../source/specifications/simple-repository-api.rst:960 |
| 15881 | +#: ../source/specifications/simple-repository-api.rst:920 |
15914 | 15882 | msgid "These decisions have been chosen to maximize the number of requests that can be moved onto the newest version of an API, while maintaining the greatest amount of compatibility. In addition, they've also tried to make using the API provide guardrails that attempt to push clients into making the best choices it can." |
15915 | 15883 | msgstr "" |
15916 | 15884 |
|
15917 | | -#: ../source/specifications/simple-repository-api.rst:965 |
| 15885 | +#: ../source/specifications/simple-repository-api.rst:925 |
15918 | 15886 | msgid "It is recommended that servers:" |
15919 | 15887 | msgstr "" |
15920 | 15888 |
|
15921 | | -#: ../source/specifications/simple-repository-api.rst:967 |
| 15889 | +#: ../source/specifications/simple-repository-api.rst:927 |
15922 | 15890 | msgid "Support all 3 content types described in this spec, using server-driven content negotiation, for as long as they reasonably can, or at least as long as they're receiving non trivial traffic that uses the HTML responses." |
15923 | 15891 | msgstr "" |
15924 | 15892 |
|
15925 | | -#: ../source/specifications/simple-repository-api.rst:971 |
| 15893 | +#: ../source/specifications/simple-repository-api.rst:931 |
15926 | 15894 | msgid "When encountering an ``Accept`` header that does not contain any content types that it knows how to work with, the server should not ever return a ``300 Multiple Choice`` response, and instead return a ``406 Not Acceptable`` response." |
15927 | 15895 | msgstr "" |
15928 | 15896 |
|
15929 | | -#: ../source/specifications/simple-repository-api.rst:976 |
| 15897 | +#: ../source/specifications/simple-repository-api.rst:936 |
15930 | 15898 | msgid "However, if choosing to use the endpoint configuration, you should prefer to return a ``200 OK`` response in the expected content type for that endpoint." |
15931 | 15899 | msgstr "" |
15932 | 15900 |
|
15933 | | -#: ../source/specifications/simple-repository-api.rst:979 |
| 15901 | +#: ../source/specifications/simple-repository-api.rst:939 |
15934 | 15902 | msgid "When selecting an acceptable version, the server should choose the highest version that the client supports, with the most expressive/featureful serialization format, taking into account the specificity of the client requests as well as any quality priority values they have expressed, and it should only use the ``text/html`` content type as a last resort." |
15935 | 15903 | msgstr "" |
15936 | 15904 |
|
15937 | | -#: ../source/specifications/simple-repository-api.rst:985 |
| 15905 | +#: ../source/specifications/simple-repository-api.rst:945 |
15938 | 15906 | msgid "It is recommended that clients:" |
15939 | 15907 | msgstr "" |
15940 | 15908 |
|
15941 | | -#: ../source/specifications/simple-repository-api.rst:987 |
| 15909 | +#: ../source/specifications/simple-repository-api.rst:947 |
15942 | 15910 | msgid "Support all 3 content types described in this spec, using server-driven content negotiation, for as long as they reasonably can." |
15943 | 15911 | msgstr "" |
15944 | 15912 |
|
15945 | | -#: ../source/specifications/simple-repository-api.rst:990 |
| 15913 | +#: ../source/specifications/simple-repository-api.rst:950 |
15946 | 15914 | msgid "When constructing an ``Accept`` header, include all of the content types that you support." |
15947 | 15915 | msgstr "" |
15948 | 15916 |
|
15949 | | -#: ../source/specifications/simple-repository-api.rst:993 |
| 15917 | +#: ../source/specifications/simple-repository-api.rst:953 |
15950 | 15918 | msgid "You should generally *not* include a quality priority value for your content types, unless you have implementation specific reasons that you want the server to take into account (for example, if you're using the standard library HTML parser and you're worried that there may be some kinds of HTML responses that you're unable to parse in some edge cases)." |
15951 | 15919 | msgstr "" |
15952 | 15920 |
|
15953 | | -#: ../source/specifications/simple-repository-api.rst:999 |
| 15921 | +#: ../source/specifications/simple-repository-api.rst:959 |
15954 | 15922 | msgid "The one exception to this recommendation is that it is recommended that you *should* include a ``;q=0.01`` value on the legacy ``text/html`` content type, unless it is the only content type that you are requesting." |
15955 | 15923 | msgstr "" |
15956 | 15924 |
|
15957 | | -#: ../source/specifications/simple-repository-api.rst:1003 |
| 15925 | +#: ../source/specifications/simple-repository-api.rst:963 |
15958 | 15926 | msgid "Explicitly select what versions they are looking for, rather than using the ``latest`` meta version during normal operation." |
15959 | 15927 | msgstr "" |
15960 | 15928 |
|
15961 | | -#: ../source/specifications/simple-repository-api.rst:1006 |
| 15929 | +#: ../source/specifications/simple-repository-api.rst:966 |
15962 | 15930 | msgid "Check the ``Content-Type`` of the response and ensure it matches something that you were expecting." |
15963 | 15931 | msgstr "" |
15964 | 15932 |
|
15965 | | -#: ../source/specifications/simple-repository-api.rst:1014 |
| 15933 | +#: ../source/specifications/simple-repository-api.rst:974 |
15966 | 15934 | msgid "September 2015: initial form of the HTML format, in :pep:`503`" |
15967 | 15935 | msgstr "" |
15968 | 15936 |
|
15969 | | -#: ../source/specifications/simple-repository-api.rst:1015 |
| 15937 | +#: ../source/specifications/simple-repository-api.rst:975 |
15970 | 15938 | msgid "July 2016: Requires-Python metadata, in an update to :pep:`503`" |
15971 | 15939 | msgstr "" |
15972 | 15940 |
|
15973 | | -#: ../source/specifications/simple-repository-api.rst:1016 |
| 15941 | +#: ../source/specifications/simple-repository-api.rst:976 |
15974 | 15942 | msgid "May 2019: \"yank\" support, in :pep:`592`" |
15975 | 15943 | msgstr "" |
15976 | 15944 |
|
15977 | | -#: ../source/specifications/simple-repository-api.rst:1017 |
| 15945 | +#: ../source/specifications/simple-repository-api.rst:977 |
15978 | 15946 | msgid "July 2020: API versioning convention and metadata, and declaring the HTML format as API v1, in :pep:`629`" |
15979 | 15947 | msgstr "" |
15980 | 15948 |
|
15981 | | -#: ../source/specifications/simple-repository-api.rst:1019 |
| 15949 | +#: ../source/specifications/simple-repository-api.rst:979 |
15982 | 15950 | msgid "May 2021: providing package metadata independently from a package, in :pep:`658`" |
15983 | 15951 | msgstr "" |
15984 | 15952 |
|
15985 | | -#: ../source/specifications/simple-repository-api.rst:1021 |
| 15953 | +#: ../source/specifications/simple-repository-api.rst:981 |
15986 | 15954 | msgid "May 2022: initial form of the JSON format, with a mechanism for clients to choose between them, and declaring both formats as API v1, in :pep:`691`" |
15987 | 15955 | msgstr "" |
15988 | 15956 |
|
15989 | | -#: ../source/specifications/simple-repository-api.rst:1023 |
| 15957 | +#: ../source/specifications/simple-repository-api.rst:983 |
15990 | 15958 | msgid "October 2022: project versions and file size and upload-time in the JSON format, in :pep:`700`" |
15991 | 15959 | msgstr "" |
15992 | 15960 |
|
15993 | | -#: ../source/specifications/simple-repository-api.rst:1025 |
| 15961 | +#: ../source/specifications/simple-repository-api.rst:985 |
15994 | 15962 | msgid "June 2023: renaming the field which provides package metadata independently from a package, in :pep:`714`" |
15995 | 15963 | msgstr "" |
15996 | 15964 |
|
15997 | | -#: ../source/specifications/simple-repository-api.rst:1027 |
| 15965 | +#: ../source/specifications/simple-repository-api.rst:987 |
15998 | 15966 | msgid "November 2024: provenance metadata in the HTML and JSON formats, in :pep:`740`" |
15999 | 15967 | msgstr "" |
16000 | 15968 |
|
16001 | | -#: ../source/specifications/simple-repository-api.rst:1028 |
| 15969 | +#: ../source/specifications/simple-repository-api.rst:988 |
16002 | 15970 | msgid "July 2025: project status markers in the HTML and JSON formats, in :pep:`792`" |
16003 | 15971 | msgstr "" |
16004 | 15972 |
|
16005 | | -#: ../source/specifications/simple-repository-api.rst:1029 |
| 15973 | +#: ../source/specifications/simple-repository-api.rst:989 |
16006 | 15974 | msgid "July 2025: layout changes (dedicated page for file yanking, introduce concepts before API details)" |
16007 | 15975 | msgstr "" |
16008 | 15976 |
|
|
0 commit comments