Skip to content

Commit bb23c5c

Browse files
authored
Merge branch 'main' into 829-encoding
2 parents 1b412ef + 8ed0812 commit bb23c5c

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

peps/pep-0725.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,9 @@ None at this time.
10351035
References
10361036
==========
10371037

1038+
* The "``pkgconfig`` specification as an alternative to ``ctypes.util.find_library``" thread (2023, Discourse):
1039+
https://discuss.python.org/t/pkgconfig-specification-as-an-alternative-to-ctypes-util-find-library/31379
1040+
10381041
.. [#singular-vision-native-deps] The "define native requirements metadata"
10391042
part of the "Wanting a singular packaging vision" thread (2022, Discourse):
10401043
https://discuss.python.org/t/wanting-a-singular-packaging-tool-vision/21141/92
@@ -1051,10 +1054,6 @@ References
10511054
.. [#pypackaging-native-cross] pypackaging-native: "Cross compilation"
10521055
https://pypackaging-native.github.io/key-issues/cross_compilation/
10531056
1054-
.. [#pkgconfig-and-ctypes-findlibrary] The "``pkgconfig`` specification as an
1055-
alternative to ``ctypes.util.find_library``" thread (2023, Discourse):
1056-
https://discuss.python.org/t/pkgconfig-specification-as-an-alternative-to-ctypes-util-find-library/31379
1057-
10581057
10591058
Copyright
10601059
=========

peps/pep-0830.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Display Format
144144
Timestamps are appended to the exception message line in tracebacks using
145145
the format ``<@timestamp>``. Example with ``iso``:
146146

147-
.. code-block:: text
147+
.. code-block:: pytb
148148
149149
Traceback (most recent call last):
150150
File "<stdin>", line 3, in california_raisin
@@ -208,7 +208,7 @@ occasional varying 1-2% measurement noise that could not be reliably
208208
reproduced. Below the benchmarking setup noise threshold as far as the author
209209
is concerned.
210210

211-
What about the special case performance optimiaztion? If I omit the two line
211+
What about the special case performance optimization? If I omit the two-line
212212
special case to avoid collecting timestamps on ``StopIteration`` and
213213
``StopAsyncIteration`` in ``Objects/exception.c``, only a single benchmark
214214
showed a regression: ``async_generators``. That one would reliably run on the
@@ -219,7 +219,7 @@ demonstrates the importance of that optimization.
219219
I used ``configure --enable-optimizations`` builds for my benchmarks and ran
220220
them using commands such as:
221221

222-
.. code-block:: text
222+
.. code-block:: shell
223223
224224
pyperformance run -p baseline-3a7df632c96/build/python -o baseline-eopt.json
225225
pyperformance run -p traceback-timestamps/build/python -o traceback-timestamps-default-eopt.json
@@ -250,30 +250,30 @@ Pickled Exception Examples
250250

251251
With traceback timestamp collection enabled:
252252

253-
.. code-block:: text
253+
.. code-block:: console
254254
255-
build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
255+
$ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
256256
b'\x80\x05\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94}\x94\x8c\x10__timestamp_ns__\x94\x8a\x08\xf4\xd8\x94`\x15\xaf\xa5\x18sb.'
257257
258258
The special case for ``StopIteration`` means it does not carry the dict with timestamp data:
259259

260-
.. code-block:: text
260+
.. code-block:: console
261261
262-
build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(StopIteration("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
262+
$ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(StopIteration("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
263263
b'\x80\x05\x95,\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\rStopIteration\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
264264
265265
Nor do exceptions carry the timestamp when the feature is disabled (the default):
266266

267-
.. code-block:: text
267+
.. code-block:: console
268268
269-
build/python -X traceback_timestamps=0 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
269+
$ build/python -X traceback_timestamps=0 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
270270
b'\x80\x05\x95+\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
271271
272272
Which matches what Python 3.13 produces:
273273

274-
.. code-block:: text
274+
.. code-block:: console
275275
276-
python3.13 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
276+
$ python3.13 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
277277
b'\x80\x05\x95+\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
278278
279279
Maintenance Burden
@@ -397,7 +397,7 @@ Acknowledgements
397397
================
398398

399399
Thanks to Nathaniel J. Smith for the original idea suggestion, and to
400-
``@dcolascione`` for initial 2025 review feedback on the implementation.
400+
Daniel Colascione for initial 2025 review feedback on the implementation.
401401

402402

403403
Change History

0 commit comments

Comments
 (0)