Skip to content

Commit 0f39bbf

Browse files
Merge branch 'main' into pep736-final
2 parents f8f1a87 + 8b84ca2 commit 0f39bbf

File tree

3 files changed

+21
-27
lines changed

3 files changed

+21
-27
lines changed

peps/pep-0352.rst

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
PEP: 352
22
Title: Required Superclass for Exceptions
3-
Version: $Revision$
4-
Last-Modified: $Date$
53
Author: Brett Cannon, Guido van Rossum
64
Status: Final
75
Type: Standards Track
8-
Content-Type: text/x-rst
96
Created: 27-Oct-2005
107
Python-Version: 2.5
118
Post-History:
@@ -276,24 +273,13 @@ References
276273
.. [#hierarchy-good] python-dev Summary for 2004-08-01 through 2004-08-15
277274
http://www.python.org/dev/summary/2004-08-01_2004-08-15.html#an-exception-is-an-exception-unless-it-doesn-t-inherit-from-exception
278275
279-
.. [#SF_1104669] SF patch #1104669 (new-style exceptions)
280-
https://bugs.python.org/issue1104669
281-
282276
.. [#pycon2007-sprint-email] python-3000 email ("How far to go with cleaning up exceptions")
283277
https://mail.python.org/pipermail/python-3000/2007-March/005911.html
284278
279+
* Issue for new-style exceptions:
280+
`python/cpython#41459 <https://github.com/python/cpython/issues/41459>`__
285281

286282
Copyright
287283
=========
288284

289285
This document has been placed in the public domain.
290-
291-
292-
293-
..
294-
Local Variables:
295-
mode: indented-text
296-
indent-tabs-mode: nil
297-
sentence-end-double-space: t
298-
fill-column: 70
299-
End:

peps/pep-0740.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ Author: William Woodruff <william@yossarian.net>,
66
Sponsor: Donald Stufft <donald@stufft.io>
77
PEP-Delegate: Donald Stufft <donald@stufft.io>
88
Discussions-To: https://discuss.python.org/t/pep-740-index-support-for-digital-attestations/44498
9-
Status: Provisional
9+
Status: Final
1010
Type: Standards Track
1111
Topic: Packaging
1212
Created: 08-Jan-2024
1313
Post-History: `02-Jan-2024 <https://discuss.python.org/t/pre-pep-exposing-trusted-publisher-provenance-on-pypi/42337>`__,
1414
`29-Jan-2024 <https://discuss.python.org/t/pep-740-index-support-for-digital-attestations/44498>`__
15-
Resolution: https://discuss.python.org/t/pep-740-index-support-for-digital-attestations/44498/26
15+
Resolution: `17-Jul-2024 <https://discuss.python.org/t/pep-740-index-support-for-digital-attestations/44498/26>`__
1616

17+
.. canonical-pypa-spec:: :ref:`packaging:index-hosted-attestations`
18+
19+
.. canonical-doc:: `PyPI - Digital Attestations <https://docs.pypi.org/attestations/>`__
1720

1821
Abstract
1922
========

peps/pep-0757.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ functions.
7979
- ``1`` for most significant digit first
8080
- ``-1`` for least significant digit first
8181

82-
.. c:member:: int8_t endianness
82+
.. c:member:: int8_t digit_endianness
8383
8484
Digit endianness:
8585

@@ -177,19 +177,20 @@ create a Python :class:`int` object from a digits array.
177177
178178
Create a :c:type:`PyLongWriter`.
179179
180-
On success, set *\*digits* and return a writer.
180+
On success, allocate *\*digits* and return a writer.
181181
On error, set an exception and return ``NULL``.
182182
183183
*negative* is ``1`` if the number is negative, or ``0`` otherwise.
184184
185-
*ndigits* is the number of digits in the *digits* array. It must be
186-
greater than or equal to 0.
185+
*ndigits* is the number of digits in the *digits* array. It must be
186+
greater than 0.
187187
188-
The caller can either initialize the array of digits *digits* and then call
189-
:c:func:`PyLongWriter_Finish` to get a Python :class:`int`, or call
188+
The caller can either initialize the array of digits *digits* and then
189+
either call :c:func:`PyLongWriter_Finish` to get a Python :class:`int` or
190190
:c:func:`PyLongWriter_Discard` to destroy the writer instance. Digits must
191-
be in the range [``0``; ``(1 << sys.int_info.bits_per_digit) - 1``]. Unused
192-
digits must be set to ``0``.
191+
be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where the
192+
:c:struct:`~PyLongLayout.bits_per_digit` is the number of bits per digit).
193+
The unused most-significant digits must be set to ``0``.
193194
194195
195196
On CPython 3.14, the :c:func:`PyLongWriter_Create` implementation is a thin
@@ -206,11 +207,15 @@ wrapper to the private :c:func:`!_PyLong_New()` function.
206207
The function takes care of normalizing the digits and converts the
207208
object to a compact integer if needed.
208209
210+
The writer instance is invalid after the call.
211+
209212
210213
.. c:function:: void PyLongWriter_Discard(PyLongWriter *writer)
211214
212215
Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`.
213216
217+
The writer instance is invalid after the call.
218+
214219
215220
Optimize import for small integers
216221
==================================
@@ -252,7 +257,7 @@ Code::
252257
int int_digits_order = layout->digits_order;
253258
size_t int_bits_per_digit = layout->bits_per_digit;
254259
size_t int_nails = int_digit_size*8 - int_bits_per_digit;
255-
int int_endianness = layout->endianness;
260+
int int_endianness = layout->digit_endianness;
256261
257262
258263
Export: :c:func:`PyLong_Export()` with gmpy2

0 commit comments

Comments
 (0)