Skip to content

Commit 93b0d6e

Browse files
committed
Merge branch 'main' into pep-813-pprint
2 parents c8212a9 + 93c6ea1 commit 93b0d6e

29 files changed

Lines changed: 814 additions & 116 deletions

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ peps/pep-0810.rst @pablogsal @DinoV @Yhg1s
689689
peps/pep-0811.rst @sethmlarson @gpshead
690690
peps/pep-0813.rst @warsaw @ericvsmith
691691
peps/pep-0814.rst @vstinner @corona10
692+
peps/pep-0815.rst @emmatyping
693+
peps/pep-0816.rst @brettcannon
692694
# ...
693695
peps/pep-2026.rst @hugovk
694696
# ...

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@v6
2323
with:
2424
persist-credentials: false
2525

.github/workflows/render.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0 # fetch all history so that last modified date-times are accurate
3333

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- "ubuntu-latest"
4242

4343
steps:
44-
- uses: actions/checkout@v5
44+
- uses: actions/checkout@v6
4545
with:
4646
persist-credentials: false
4747

.pytest.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ addopts = [
1212
# https://pytest-cov.readthedocs.io/en/latest/config.html#reference
1313
"--cov=check_peps",
1414
"--cov=pep_sphinx_extensions",
15+
"--cov=release_management",
1516
"--cov-report=html",
1617
"--cov-report=xml",
1718
]
@@ -23,6 +24,7 @@ filterwarnings = ["error"]
2324

2425
testpaths = [
2526
"pep_sphinx_extensions",
27+
"release_management",
2628
]
2729

2830
# https://docs.pytest.org/en/stable/reference/reference.html#confval-strict

pep_sphinx_extensions/pep_theme/static/mq.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152

153153
section#pep-page-section > article {
154154
float: none;
155-
max-width: 17.5cm;
155+
max-width: 100%;
156156
width: auto;
157157
margin: 0;
158158
padding: 0;

pep_sphinx_extensions/pep_zero_generator/pep_index_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from pep_sphinx_extensions.pep_zero_generator import subindices
2727
from pep_sphinx_extensions.pep_zero_generator import writer
2828
from pep_sphinx_extensions.pep_zero_generator.constants import SUBINDICES_BY_TOPIC
29-
from release_management.serialize import create_release_cycle, create_release_json
29+
from release_management.serialize import create_release_cycle, create_release_schedule_calendar, create_release_json
3030

3131
if TYPE_CHECKING:
3232
from sphinx.application import Sphinx
@@ -79,3 +79,6 @@ def create_pep_zero(app: Sphinx, env: BuildEnvironment, docnames: list[str]) ->
7979

8080
release_json = create_release_json()
8181
app.outdir.joinpath('api/python-releases.json').write_text(release_json, encoding="utf-8")
82+
83+
release_ical = create_release_schedule_calendar()
84+
app.outdir.joinpath('release-schedule.ics').write_text(release_ical, encoding="utf-8")

peps/pep-0012.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,10 @@ processed output using the ``image`` directive:
599599
600600
.. image:: diagram.png
601601
602-
Any browser-friendly graphics format is possible; PNG should be
602+
Any browser-friendly graphics format is possible; SVG or PNG are
603603
preferred for graphics, JPEG for photos and GIF for animations.
604-
Currently, SVG must be avoided due to compatibility issues with the
605-
PEP build system.
604+
Images should be optimised to reduce their file size, and should
605+
be legible in both light and dark mode in the browser.
606606

607607
For accessibility and readers of the source text, you should include
608608
a description of the image and any key information contained within

peps/pep-0101.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,6 @@ permissions.
650650
fuzzy bit because not much can be automated. You can use an earlier
651651
announcement as a template, but edit it for content!
652652

653-
- Once the announcement is up on Discourse, send an equivalent to the
654-
following mailing lists:
655-
656-
* python-list@python.org
657-
* python-announce@python.org
658-
659653
- Also post the announcement to the
660654
`Python Insider blog <https://blog.python.org>`_.
661655
To add a new entry, go to
@@ -786,8 +780,6 @@ else does them. Some of those tasks include:
786780

787781
* `discuss.python.org`_
788782

789-
* mailing lists (python-dev, python-list, python-announcements)
790-
791783
* `Python Insider blog <https://blog.python.org>`_
792784

793785
- Enjoy your retirement and bask in the glow of a job well done!

peps/pep-0694.rst

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Post-History: `27-Jun-2022 <https://discuss.python.org/t/pep-694-upload-2-0-api-
1212
`14-Apr-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0/76316/9>`__
1313
`06-Aug-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483>`__
1414
`27-Sep-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/31>`__
15+
`07-Dec-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/35>`__
1516

1617

1718
Abstract
@@ -84,8 +85,8 @@ In addition, there are a number of major issues with the legacy API:
8485

8586
The new upload API proposed in this PEP provides ways to solve all of these problems, either directly or
8687
through an extensible approach, allowing servers to implement features such as resumable and parallel uploads.
87-
This upload API this PEP proposes provides better error reporting, a more robust release testing experience,
88-
and atomic and simultaneous publishing of all release artifacts.
88+
This upload API this PEP proposes provides better and more standardized error reporting, a more robust release
89+
testing experience, and atomic and simultaneous publishing of all release artifacts.
8990

9091
Legacy API
9192
==========
@@ -274,17 +275,26 @@ are determined by the index operator.
274275
Errors
275276
------
276277

278+
Unless otherwise specified, all error (4xx and 5xx) responses from the server **MUST** use the :rfc:`9457`
279+
(Problem Details for HTTP APIs) format. In particular, the server **MUST** use the "Problem Details JSON
280+
Object" defined in :rfc:`Section 3 <9457#section-3>` and **SHOULD** use the ``application/problem+json`` media
281+
type in its responses.
282+
277283
Clients in general should be prepared to handle `HTTP response error status codes
278-
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status>`_ which **MAY** contain payloads of the
279-
the following format:
284+
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status>`_ which **SHOULD** contain payloads like
285+
the following, although note that the details are index-specific, as long as they conform to RFC 9457. By way
286+
of example, PyPI could return the following error body:
280287

281288
.. code-block:: json
282289
283290
{
291+
"type": "https://docs.pypi.org/api/errors/error-types#invalid-filename",
292+
"status": 400,
293+
"title": "The artifact used an invalid wheel file name format",
294+
"details": "See https://packaging.python.org/en/latest/specifications/binary-distribution-format/",
284295
"meta": {
285296
"api-version": "2.0"
286297
},
287-
"message": "...",
288298
"errors": [
289299
{
290300
"source": "...",
@@ -293,11 +303,12 @@ the following format:
293303
]
294304
}
295305
296-
Besides the standard ``meta`` key, this has the following top level keys:
306+
RFC 9457 defines ``type``, ``status``, ``title``, and ``details``. The ``meta`` and ``errors`` keys are
307+
"extension members", defined in :rfc:`Section 3.2 <9457#section-3.2>`. The index **SHOULD** include these
308+
extension members.
297309

298-
``message``
299-
A singular message that encapsulates all errors that may have happened on this
300-
request.
310+
``meta``
311+
The same request/response metadata structure as defined in the :ref:`publishing-session` description.
301312

302313
``errors``
303314
An array of specific errors, each of which contains a ``source`` key, which is a string that
@@ -683,14 +694,14 @@ The request looks like:
683694
Besides the standard ``meta`` key, the request JSON has the following additional keys:
684695

685696
``filename`` (**required**)
686-
The name of the file being uploaded. The filename **MUST** conform to either the `source
687-
distribution file name specification
697+
The name of the file being uploaded. The filename **MUST** conform to either the `source distribution
698+
file name specification
688699
<https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name>`_
689700
or the `binary distribution file name convention
690701
<https://packaging.python.org/en/latest/specifications/binary-distribution-format/#file-name-convention>`_.
691-
Indexes **SHOULD** validate these file names at the time of the request, returning a ``400 Bad
692-
Request`` error code, as described in the :ref:`session-errors` section when the file names do
693-
not conform.
702+
Indexes **SHOULD** validate these file names at the time of the request, returning a ``400 Bad Request``
703+
error code and an RFC 9457 style error body, as described in the :ref:`session-errors` section when the
704+
file names do not conform.
694705

695706
``size`` (**required**)
696707
The size in bytes of the file being uploaded.
@@ -1094,7 +1105,11 @@ as experience is gained operating Upload 2.0.
10941105
Change History
10951106
==============
10961107

1097-
* `23-Sep-2025 <TBD>`__
1108+
* `06-Dec-2025 <TBD>`__
1109+
1110+
* Error responses conform to the :rfc:`9457` format.
1111+
1112+
* `23-Sep-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/31>`__
10981113

10991114
* Remove the ``nonce`` and ``gentoken()`` algorithm. Indexes are now responsible for generating
11001115
an cryptographically secure session token and obfuscated stage URL (but only if they support

0 commit comments

Comments
 (0)