Skip to content

Commit 3cbd1ca

Browse files
authored
Merge branch 'main' into file_upload_mechanisms
2 parents eceb7b5 + 1ba076f commit 3cbd1ca

15 files changed

Lines changed: 1648 additions & 110 deletions

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,9 @@ peps/pep-0791.rst @vstinner
673673
peps/pep-0792.rst @dstufft
674674
peps/pep-0793.rst @encukou
675675
peps/pep-0794.rst @brettcannon
676-
# ...
676+
peps/pep-0798.rst @JelleZijlstra
677+
peps/pep-0799.rst @pablogsal
678+
peps/pep-0800.rst @JelleZijlstra
677679
peps/pep-0801.rst @warsaw
678680
# ...
679681
peps/pep-2026.rst @hugovk

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ venv:
6464
echo "venv already exists."; \
6565
echo "To recreate it, remove it first with \`make clean-venv'."; \
6666
else \
67+
set -e; \
6768
echo "Creating venv in $(VENVDIR)"; \
6869
if $(UV) --version >/dev/null 2>&1; then \
6970
$(UV) venv --python=$(PYTHON) $(VENVDIR); \

peps/pep-0011.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Tier 2
102102
Target Triple Notes Contacts
103103
============================= ========================== ========
104104
aarch64-unknown-linux-gnu glibc, clang Victor Stinner, Gregory P. Smith
105-
wasm32-unknown-wasip1 WASI SDK, Wasmtime Brett Cannon, Eric Snow
105+
wasm32-unknown-wasip1 WASI SDK, Wasmtime Brett Cannon, Michael Droettboom
106106
x86_64-unknown-linux-gnu glibc, clang Victor Stinner, Gregory P. Smith
107107
============================= ========================== ========
108108

peps/pep-0590.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PEP: 590
22
Title: Vectorcall: a fast calling protocol for CPython
33
Author: Mark Shannon <mark@hotpy.org>, Jeroen Demeyer <J.Demeyer@UGent.be>
44
BDFL-Delegate: Petr Viktorin <encukou@gmail.com>
5-
Status: Accepted
5+
Status: Final
66
Type: Standards Track
77
Created: 29-Mar-2019
88
Python-Version: 3.8

peps/pep-0628.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The idea in this PEP has been implemented in the auspiciously named
3030
`issue 12345`_.
3131

3232
.. _accepted: https://bugs.python.org/issue12345#msg272287
33-
.. _issue 12345: http://bugs.python.org/issue12345
33+
.. _issue 12345: https://bugs.python.org/issue12345
3434

3535

3636
The Rationale for Tau
@@ -65,12 +65,12 @@ may be of interest:
6565
highlighting the problems with ``pi`` has `a page of resources`_ on the
6666
topic
6767
* For those that prefer videos to written text, `Pi is wrong!`_ and
68-
`Pi is (still) wrong`_ are available on YouTube
68+
`Pi is (still) wrong`_ are available.
6969

70-
.. _Tau Manifesto: http://tauday.com/
71-
.. _Pi is (still) wrong: http://www.youtube.com/watch?v=jG7vhMMXagQ
72-
.. _Pi is wrong!: http://www.youtube.com/watch?v=IF1zcRoOVN0
73-
.. _a page of resources: http://www.math.utah.edu/~palais/pi.html
70+
.. _Tau Manifesto: https://tauday.com/
71+
.. _Pi is (still) wrong: https://vimeo.com/147792667
72+
.. _Pi is wrong!: https://www.youtube.com/watch?v=PIhNNnW1tUo
73+
.. _a page of resources: https://www.math.utah.edu/~palais/pi.html
7474

7575

7676
Copyright

peps/pep-0745.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ Actual:
4848
- 3.14.0 beta 2: Monday, 2025-05-26
4949
- 3.14.0 beta 3: Tuesday, 2025-06-17
5050
- 3.14.0 beta 4: Tuesday, 2025-07-08
51+
- 3.14.0 candidate 1: Tuesday, 2025-07-22
5152

5253
Expected:
5354

54-
- 3.14.0 candidate 1: Tuesday, 2025-07-22
5555
- 3.14.0 candidate 2: Tuesday, 2025-08-26
5656
- 3.14.0 final: Tuesday, 2025-10-07
5757

peps/pep-0747.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ expression, and it represents the type described by that type expression.
183183

184184
``TypeForm`` is a special form that, when used in a type expression, describes
185185
a set of type form objects. It accepts a single type argument, which must be a
186-
valid type expression. ``TypeForm[T]`` describes the set of all type form
186+
:ref:`valid type expression <valid-type-expressions>`. ``TypeForm[T]`` describes the set of all type form
187187
objects that represent the type ``T`` or types that are
188188
:term:`assignable to <typing:assignable>` ``T``. For example,
189189
``TypeForm[str | None]`` describes the set of all type form objects
@@ -218,9 +218,7 @@ equivalent to ``TypeForm[Any]``.
218218
Implicit ``TypeForm`` Evaluation
219219
--------------------------------
220220

221-
When a static type checker encounters an expression that follows all of the
222-
syntactic, semantic and contextual rules for a type expression as detailed
223-
in the typing spec, the evaluated type of this expression should be assignable
221+
When a static type checker encounters a valid type expression, the evaluated type of this expression should be assignable
224222
to ``TypeForm[T]`` if the type it describes is assignable to ``T``.
225223

226224
For example, if a static type checker encounters the expression ``str | None``,
@@ -248,6 +246,11 @@ be assignable to ``TypeForm``::
248246

249247
v5: TypeForm[set[str]] = "set[str]" # OK
250248

249+
.. _valid-type-expressions:
250+
251+
Valid Type Expressions
252+
----------------------
253+
251254
The typing spec defines syntactic rules for type expressions in the form of a
252255
:ref:`formal grammar <typing:expression-grammar>`. Semantic rules are specified
253256
as comments along with the grammar definition. Contextual requirements are detailed
@@ -256,8 +259,11 @@ type expressions. For example, the special form ``Self`` can be used in a
256259
type expression only within a class, and a type variable can be used within
257260
a type expression only when it is associated with a valid scope.
258261

259-
Expressions that violate one or more of the syntactic, semantic, or contextual
260-
rules for type expressions should not evaluate to a ``TypeForm`` type.::
262+
A valid type expression is an expression that follows all of the syntactic,
263+
semantic, and contextual rules for a type expression.
264+
265+
Expressions that are not valid type expressions should not evaluate to a
266+
``TypeForm`` type::
261267

262268
bad1: TypeForm = tuple() # Error: Call expression not allowed in type expression
263269
bad2: TypeForm = (1, 2) # Error: Tuple expression not allowed in type expression

peps/pep-0772.rst

Lines changed: 56 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Created: 21-Jan-2025
1111
Post-History:
1212
`06-Feb-2025 <https://discuss.python.org/t/pep-772-packaging-governance-process/79724/1>`__,
1313
`30-May-2025 <https://discuss.python.org/t/pep-772-packaging-council-governance-process-round-2/93904>`__,
14+
`25-Jul-2025 <https://discuss.python.org/t/pep-772-packaging-council-governance-process-round-3/100181>`__,
1415
Replaces: 609
1516

1617

@@ -198,31 +199,31 @@ Election of the Packaging Council
198199
A Packaging Council election consists of the following phases:
199200

200201
* **Phase 1**: Packaging Council Electors are determined by opt-in self-selection of the `PSF voting
201-
members <voting-members>`_. The PSF voting membership is informed that Packaging Council ballots
202-
will be available, and any PSF voting member can request a ballot. The PSF may choose to solicit
202+
members`_. The PSF voting membership is informed that Packaging Council ballots will be
203+
available, and any PSF voting member can request a ballot. The PSF may choose to solicit
203204
participation for both the PSF Board elections and Packaging Council elections at the same time.
204205
Packaging Council Electors retain their voting rights for the entire year, and may exercise such
205206
rights for other community-wide votes that may occur during that year.
206207

207208
* **Phase 2**: Packaging Council Electors may nominate any individual for the Council election, including
208-
themselves. Nominees do not need to be PSF members, but nominations must include information
209+
themselves. Nominees must themselves be PSF voting members, and nominations must include information
209210
about the nominee's relevant affiliations.
210211

211212
* **Phase 3**: Each Elector receives a ballot consisting of all eligible nominees, which Electors
212-
use to cast their vote for the Packaging Council. They can assign zero to five stars to each
213-
candidate. Voting is performed anonymously. The outcome of the vote is determined using the `STAR
214-
voting system`_, modified to use the `Multi-winner Bloc STAR`_ approach. If a tie occurs, it may
215-
be resolved by mutual agreement among the candidates, or else the winner will be chosen at random.
213+
use to cast their vote for the Packaging Council. The mechanics of the election (i.e. the
214+
software used to conduct the election, the algorithm used to determine the outcome of the vote,
215+
etc.) are conducted by the PSF, in accordance with the `PSF bylaws`_ and its regular Board
216+
election procedures. If a tie occurs, it may be resolved by mutual agreement among the
217+
candidates, or else the winner will be chosen at random.
216218

217219
Each phase will last two weeks.
218220

219-
The Packaging Council election process is managed by a returns officer nominated by the Python
220-
Steering Council. The PSF shall maintain records of the elections as well as run the annual
221-
election for the Packaging Council. The Steering Council must certify the results of the election
222-
and may work with the returns officer in whatever capacity is necessary to validate the integrity of
223-
the election. Election transparency being of paramount importance for trust in the process, full
224-
vote totals *before* any exclusions, while maintaining anonymity, should be made public when
225-
technically possible.
221+
The Packaging Council election process is managed by a returns officer nominated by the PSF Board.
222+
The PSF shall maintain records of the elections as well as run the annual election for the Packaging
223+
Council. The PSF Board must certify the results of the election and may work with the returns
224+
officer in whatever capacity is necessary to validate the integrity of the election. Election
225+
transparency being of paramount importance for trust in the process, full vote totals *before* any
226+
exclusions, while maintaining anonymity, should be made public when technically possible.
226227

227228
Quorum for Packaging Council votes (either cohort election or votes of no confidence) is 50% of
228229
Electors.
@@ -243,6 +244,10 @@ original cohort.
243244
Each Council member's term will be two years, from when their elections are
244245
finalized until the next elections for their cohort are finalized.
245246

247+
As Packaging Council elections will generally align with the timing of PSF Board elections, any
248+
members elected in an "off cycle" Council election (such as the initial Council election) will
249+
similarly serve until the next regular election for their cohort.
250+
246251
.. _whole-council:
247252

248253
Only for elections of the entire Packaging Council (such as the initial Council election), the two
@@ -266,8 +271,9 @@ If a Council member drops out of touch and cannot be contacted for a month or
266271
longer, then the rest of the Council may vote to replace them (with a simple
267272
majority vote, where the missing member is recorded as an abstention).
268273

269-
If a full Packaging Council cannot be seated by this process, the Python Steering Council can appoint new
270-
Packaging Council members to fill the vacancies, or call for new Packaging Council elections.
274+
If a full Packaging Council cannot be seated by this process, the PSF Board, in consultation with
275+
the Python Steering Council, can appoint new Packaging Council members to fill the vacancies, or
276+
call for new Packaging Council elections.
271277

272278
Conflicts of interest
273279
---------------------
@@ -285,7 +291,7 @@ packaging development could itself be harmful and erode trust.
285291

286292
PSF staff members are not permitted to serve as members of the Packaging Council.
287293

288-
Currently serving Steering Council members are not permitted to concurrently serve as members of the Packaging
294+
Serving Steering Council members are not permitted to concurrently serve as members of the Packaging
289295
Council.
290296

291297
In a Council election, if more than two of the top five vote-getters work for the same employer, then only the
@@ -294,9 +300,18 @@ elevated in the vote rank. This process is repeated until a valid Packaging Cou
294300
process a full Council cannot be formed, disqualified vote-getters are re-qualified in the rank order of their
295301
vote tally until a full Council can be formed.
296302

303+
If fewer than five members are to be elected, an analogous procedure is applied in order to
304+
guarantee that no more than two members of the entire Packaging Council work for the same employer.
305+
297306
During a Packaging Council term, if changing circumstances cause this rule to be broken (for instance, due to
298307
a Council member changing employment), then one or more Council members must resign to remedy the issue, and
299-
the resulting vacancies can then be filled as `normal <vacancy>`_.
308+
the resulting vacancies can then be filled as :ref:`normal <vacancy>`.
309+
310+
Code of Conduct
311+
---------------
312+
313+
All Packaging Council Electors and Packaging Council members are subject to, and must abide by the
314+
PSF `Code of Conduct`_, its enforcement procedures, and its remedies for adjudicated violations.
300315

301316
.. _electors:
302317

@@ -311,10 +326,13 @@ Responsibilities
311326
Packaging Council Electors participate in formal votes to elect the Packaging Council.
312327

313328
The eligibility of Packaging Council Electors is equivalent to the Article IV, section 4.2 voting
314-
membership defined in the `PSF Bylaws <https://www.python.org/psf/bylaws/>`_. Should those bylaws
315-
change in the future, the eligibility of Packaging Council Electors will similarly change to match.
316-
As with PSF voting membership, Packaging Council Electors must affirm their intention to vote in
317-
Packaging Council elections every year.
329+
membership defined in the `PSF bylaws`_. Should those bylaws change in the future, the eligibility
330+
of Packaging Council Electors will similarly change to match. Packaging Council Electors must
331+
affirm their intention to vote in Packaging Council elections in a manner and process similar to PSF
332+
Board voting membership affirmations.
333+
334+
PSF voting members may opt-out (annually or indefinitely) from Packaging Council elections
335+
independently of their choice to vote in PSF Board elections.
318336

319337
.. _process:
320338

@@ -325,19 +343,20 @@ Vote of no confidence
325343
---------------------
326344

327345
In exceptional circumstances, a vote of no confidence may be called to remove a sitting Packaging
328-
Council member, or the entire council. The Python Steering Council may call such votes of no
346+
Council member, or the entire Council. The Python Steering Council may call such votes of no
329347
confidence, with no second being necessary. Anyone may request such a vote of no confidence from
330348
the Steering Council regardless of the requester's membership or affiliation, and the Steering
331-
Council has full discretion to call for the vote or not.
349+
Council has discretion to call for the vote or not. The PSF Board may overrule the Steering Council
350+
to initiate a vote of no confidence.
332351

333352
The vote of no confidence lasts for two weeks. Each Elector votes for or against. If at least two
334353
thirds of Electors express a lack of confidence, then the vote succeeds.
335354

336355
There are two forms of no-confidence votes: those targeting a single member, and those targeting the Council
337356
as a whole. The initial call for a no-confidence vote must specify which type is intended. If a single-member
338357
vote succeeds, then that member is removed from the Council and the resulting vacancy can be handled by the
339-
`normal process <vacancy>`_. If a whole-Council vote succeeds, the Council is dissolved and a new Council
340-
election is triggered immediately, using the rules for `whole Council <whole-council>`_ elections.
358+
:ref:`normal process <vacancy>`. If a whole-Council vote succeeds, the Council is dissolved and a new Council
359+
election is triggered immediately, using the rules for :ref:`whole Council <whole-council>` elections.
341360

342361
-----------------------
343362
Changing the governance
@@ -358,10 +377,8 @@ Steering Council's elections. This PEP uses a cohort-based model, derived from
358377
the PSF Board's elections which enables continuity of members across a changing
359378
Council.
360379

361-
There is a trade-off between continuity of the Council and full reshuffles. This PEP
362-
takes the position that continuity will be more valuable for the Python
363-
Packaging domain, especially combined with the vote of no confidence, automatic
364-
removal of inactive voters, and regular elections.
380+
There is a trade-off between continuity of the Council and full reshuffles. This PEP takes the
381+
position that continuity will be more valuable for the Python Packaging ecosystem.
365382

366383
-------------------------------
367384
Term limits for council members
@@ -390,11 +407,12 @@ on that work without paying any membership fee.
390407
Approval voting in the election
391408
-------------------------------
392409

393-
An earlier non-public draft of this PEP used an approval voting process, which aligned with what :pep:`13`
394-
stated at the time of writing. The Python core team has changed their governance to use Bloc STAR and this PEP
395-
was updated to align with that for the same reasons as the core team's move to Bloc STAR: it better captures
396-
voter intention in the results. It is also expected that the same election machinery can be used for both
397-
elections.
410+
An earlier non-public draft of this PEP used an approval voting process, which aligned with what
411+
:pep:`13` stated at the time of writing. The Python core team has changed their governance to use
412+
Bloc STAR, and this PEP was temporarily changed to use the same mechanism. However, since Packaging
413+
Council elections will now be concurrent with PSF Board elections, with the same voting constituency
414+
(i.e. PSF voting membership), and administered by the same returns officer, this PEP was updated to
415+
align Packaging Council elections with PSF Board elections.
398416

399417
------------------------------------------------------------------
400418
Disallow multiple people from the same organization on the council
@@ -482,5 +500,6 @@ packaging user experience.
482500
.. _virtualenv: https://packaging.python.org/en/latest/key_projects/#virtualenv
483501
.. _Packaging Workgroup: https://wiki.python.org/psf/PackagingWG
484502
.. _User Success Workgroup: https://github.com/psf/user-success-wg/
485-
.. _STAR voting system: https://www.starvoting.org/
486-
.. _Multi-winner Bloc STAR: https://www.starvoting.org/multi_winner
503+
.. _PSF bylaws: https://www.python.org/psf/bylaws/
504+
.. _Code of Conduct: https://policies.python.org/python.org/code-of-conduct/
505+
.. _PSF voting members: https://www.python.org/psf/membership/

peps/pep-0782.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ When creating a bytes string and the output size is unknown, one
5353
strategy is to allocate a short buffer and extend it (to the exact size)
5454
each time a larger write is needed.
5555

56-
This strategy is inefficient because it requires to enlarge the buffer
57-
multiple timess. It's more efficient to overallocate the buffer the
56+
This strategy is inefficient because it requires enlarging the buffer
57+
multiple times. It's more efficient to overallocate the buffer the
5858
first time that a larger write is needed. It reduces the number of
5959
expensive ``realloc()`` operations which can imply a memory copy.
6060

peps/pep-0788.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PEP: 788
2-
Title: Interpreter References
2+
Title: PyInterpreterRef: Interpreter References in the C API
33
Author: Peter Bierma <zintensitydev@gmail.com>
44
Sponsor: Victor Stinner <vstinner@python.org>
55
Discussions-To: https://discuss.python.org/t/93653

0 commit comments

Comments
 (0)