10000 No new NEWS nits by hugovk · Pull Request #61 · hugovk/cpython · GitHub
[go: up one dir, main page]

Skip to content

No new NEWS nits #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign 8000 up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
b7778d5
Fix typo inaccuracy in _bootstrap_external.py (GH-118619)
wimglenn May 7, 2024
3a6ff1b
gh-117657: Use clang 18 in TSAN builds (GH-118533)
mpage May 7, 2024
fe47d9b
gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (…
zhangyoufu May 7, 2024
9762122
Fix several typos in documentation (GH-118625)
xyb May 7, 2024
6cf7067
gh-109975: Update 'What's New in Python 3.13' for beta (#118694)
hugovk May 7, 2024
1e42842
gh-118650: Exclude `_repr_*` methods from Enum's _sunder_ reservation…
chrysn May 7, 2024
6f768b7
gh-118119: Re-use `sep` in `posixpath.expanduser()` (GH-118120)
nineteendo May 7, 2024
0f8a07d
gh-118418: Deprecate failing to pass a value to the *type_params* par…
AlexWaygood May 7, 2024
44a9f3d
gh-109653: What's new: Note improved import times for several stdlib …
AlexWaygood May 7, 2024
48e52fe
gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311)
mmEissen May 7, 2024
0485922
gh-118518: Rename `PYTHONPERFJITSUPPORT` and `-X perfjit` with unders…
hugovk May 7, 2024
b60d4c0
gh-118090: Improve error message for empty type param brackets (GH-11…
sobolevn May 7, 2024
65f5e58
gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)
serhiy-storchaka May 7, 2024
ad3d877
Remove several unused imports in `_pyrepl` (#118668)
sobolevn May 7, 2024
7d90b8a
gh-111201: Allow bracketed paste to work (GH-118700)
pablogsal May 7, 2024
a855f82
Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612)
Privat33r-dev May 7, 2024
71080b8
gh-118660: Add second type parameter to (Async)ContextManager (#118681)
JelleZijlstra May 7, 2024
e5413ec
gh-118682: Revert forcing str commands, allow class commands in pyrep…
lysnikolaou May 7, 2024
26bab42
bpo-115773: Use the right variable name based on the field we are try…
abhinav-upadhyay May 7, 2024
a94ac56
gh-111201: Allow pasted code to contain multiple statements in the RE…
pablogsal May 7, 2024
b9caa09
gh-118518: Improve perf docs (#118708)
pablogsal May 7, 2024
f58833e
gh-118650: Document `Enum._repr_*` reservation exclusion (GH-118698)
chrysn May 7, 2024
2c19987
gh-118729: Temporarily skip `test_multiprocessing_pool_circular_impor…
colesbury May 7, 2024
37959e2
gh-118518: Check for perf version and not kernel version in test_perf…
pablogsal May 7, 2024
f548855
gh-109975: Make a rough editorial pass over What's New (#118711)
Yhg1s May 7, 2024
4605465
gh-118734: Fixes Windows build when Use_TIER2 is unspecified (#118735)
zooba May 7, 2024
2a85bed
Revert to free macOS runners (#118744)
ambv May 7, 2024
2f0a338
gh-118610: Centralize power caching in `_pylong.py` (#118611)
tim-one May 8, 2024
e7aec87
gh-118746: Fix crash in frame_getlocals and _PyFrame_GetLocals (#118748)
gaogaotiantian May 8, 2024
fcf52d7
Regen ``Doc/requirements-oldest-sphinx.txt`` (#118736)
Eclips4 May 8, 2024
c4f9823
gh-118671: Updated dead ActiveState links (#118730)
trag1c May 8, 2024
2268289
Python 3.13.0b1
Yhg1s May 8, 2024
7768ff1
Python 3.14.0a0
Yhg1s May 8, 2024
891fd12
Regenerate configure for 3.14, which the release script forgot. (#118…
Yhg1s May 8, 2024
66f8bb7
gh-118486: Update docs for CVE-2024-4030 reference (GH-118737)
zooba May 8, 2024
ed2b0fb
Update Windows library names for the Python version bump (#118766)
Eclips4 May 8, 2024
6d419db
Fix file extensions for 3.14 Whats New (#118770)
JelleZijlstra May 8, 2024
aac6b01
gh-118772: Allow TypeVars without a default to follow those with a de…
JelleZijlstra May 8, 2024
3c079a0
gh-118767: Make bool(NotImplemented) raise TypeError (#118775)
JelleZijlstra May 8, 2024
c68311d
Run CI on the 3.13 branch (#118779)
JelleZijlstra May 8, 2024
7b0c247
Docs: fix typos in documentation (#118752)
xyb May 8, 2024
bcb435e
docs: module page titles should not start with a link to themselves (…
nedbat May 8, 2024
05c2fe1
Format None, True, False and NotImplemented as literals (GH-118758)
serhiy-storchaka May 8, 2024
8d84120
Fixing a typo in test_cmd_line.py (#118728)
hotpxl May 8, 2024
cb6f75a
gh-117657: Fix data races when writing / reading `ob_gc_bits` (#118292)
mpage May 8, 2024
2f4db5a
gh-118803: Remove `ByteString` from `typing` and `collections.abc` (#…
sobolevn May 8, 2024
027e6d8
[tests]: Mark ``test_statistics.test_kde_random`` with a ``requires_r…
Eclips4 May 9, 2024
e8cbcf4
GH-101588: Remove deprecated pickle/copy/deepcopy from itertools (gh-…
rhettinger May 9, 2024
fa9b9cb
gh-118033: Fix `__weakref__` not set for generic dataclasses (#118099)
sobolevn May 9, 2024
c68acb1
gh-118798: Remove deprecated isdst parameter from `email.utils.localt…
hugovk May 9, 2024
da090f1
gh-118805: Remove type, choices, metavar params of `BooleanOptionalAc…
sobolevn May 9, 2024
7c87ce7
gh-103956: Fix `trace` output in case of missing source line (GH-103958)
chgnrdv May 9, 2024
82acc5f
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
zooba May 9, 2024
35b5eaa
gh-118767: Improve tests and docs for bool(NotImplemented) (#118813)
JelleZijlstra May 9, 2024
c3643a1
gh-118817: Fix `asyncio REPL` on Windows (#118819)
Eclips4 May 9, 2024
c30d8e5
gh-117657: Acquire a critical section around `SemLock.__{enter,exit}_…
mpage May 9, 2024
8af84b5
gh-118773: Use language-invariant SDDL string instead of aliases for …
zooba May 9, 2024
82abe75
gh-118849: Fix "code will never be executed" warning in `dictobject.c…
sobolevn May 9, 2024
2402715
gh-118561: Fix crash involving list.extend in free-threaded build (#1…
colesbury May 9, 2024
71cc065
gh-116984: Make mimalloc header includes relative to the current file…
colesbury May 9, 2024
1b1db2f
gh-118846: Fix PGO tests in free-threaded build (#118862)
colesbury May 9, 2024
98ff3f6
gh-117657: Replace TSAN suppresions with more specific rules (#118722)
swtaarrs May 9, 2024
68fbc00
gh-118851: Default ctx arguments to AST constructors to Load() (#118854)
JelleZijlstra May 9, 2024
46c8081
Revert "gh-115432: Add critical section variant that handles a NULL o…
colesbury May 9, 2024
17a2cc1
Docs: fix typos in documentation (GH-118815)
xyb May 10, 2024
7e6fcab
Fix some missing null checks. (GH-118721)
zooba May 10, 2024
e85e8de
gh-118209: Add Windows structured exception handling to mmap module (…
Dobatymo May 10, 2024
7cc5e81
gh-117873: Use positional-only parameters in _posixshmem (#118012)
vstinner May 10, 2024
7ac933e
gh-118689: Doc: fix ePub build (#118690)
methane May 10, 2024
004db21
Rename `notimplemented_methods` into `nodefault_methods` (#118896)
sobolevn May 10, 2024
a895756
gh-117398: Move types to datetime state (#118606)
vstinner May 10, 2024
db5af7d
gh-118789: Restore hidden `_PyWeakref_ClearRef` (#118797)
colesbury May 10, 2024
22d5185
gh-117657: Fix data races reported by TSAN on `interp->threads.main` …
mpage May 10, 2024
33d2019
gh-117657: Fix QSBR race condition (#118843)
SonicField May 10, 2024
c444362
Correct the argument names for `secrets.choice` and `secrets.randbelo…
adamtheturtle May 10, 2024
13d7cf9
gh-118895: Call PyType_Ready() on typing.NoDefault (#118897)
JelleZijlstra May 10, 2024
f772d0d
GH-78707: Drop deprecated `pathlib.PurePath.[is_]relative_to()` argum…
barneygale May 10, 2024
941eea0
gh-118771: Ensure names defined in optimizer.h start with Py/_Py (GH-…
encukou May 10, 2024
f5c6b99
GH-118910: Less boilerplate in the tier 2 optimizer (#118913)
markshannon May 10, 2024
ec9d12b
Rename typing._collect_parameters (#118900)
JelleZijlstra May 10, 2024
aa36f83
gh-118702: Implement vectorcall for BaseException (#118703)
vstinner May 10, 2024
b309c8e
gh-118846: Fix free-threading test failures when run sequentially (#1…
colesbury May 10, 2024
a019347
gh-118924: Remove `sqlite3.version` and `sqlite3.version_info` (#118925)
hugovk May 10, 2024
b88889e
gh-117657: Log TSAN warnings to separate files and archive them (#118…
mpage May 10, 2024
35c4361
gh-118921: Add `copy()` method for `FrameLocalsProxy` (#118923)
gaogaotiantian May 10, 2024
7e894c2
Docs: Fix SOURCE_URI (#118945)
nineteendo May 11, 2024
cd4cfa6
gh-118932: ChainMap.__contains__ performance improvement (gh-118946)
May 11, 2024
abead54
gh-117655: Prevent `test_strptime` from raising a DeprecationWarning …
nineteendo May 11, 2024
5b941e5
GH-118844: Fix build failures when combining --disable-gil with --ena…
savannahostrowski May 11, 2024
ec1398e
gh-118899: Add tests for `NotImplemented` attribute access (#118902)
sobolevn May 12, 2024
a705c1e
Itertools docs: fix parameter names and indentation in Python equival…
pochmann3 May 12, 2024
9c15202
gh-87106: Fix inspect.signature.bind() handling of positional-only ar…
jacobtylerwalls May 13, 2024
b4ca389
Improve the `rmtree` doc for `dir_fd` param addition in 3.11 (#118964)
sobolevn May 13, 2024
d8a82cc
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
i-shenl May 13, 2024
f526314
gh-58933: Make pdb return to caller frame correctly when f_trace is n…
gaogaotiantian May 13, 2024
7d7eec5
gh-117873: Revert _posixshmem.shm_open() change (#118901)
vstinner May 13, 2024
b04c497
gh-119010: Adds docs about `__type_params__` to `functools.update_wra…
sobolevn May 13, 2024
fc75792
gh-118998: Handle errors correctly in `tmtotuple` in `timemodule` (#1…
sobolevn May 13, 2024
e04cd96
GH-118836: Fix JIT build error when SHT_NOTE section is present (GH-1…
mgorny May 13, 2024
e237b25
gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starti…
serhiy-storchaka May 14, 2024
331d385
Add yet few cases for urlparse/urlunparse roundtrip tests (GH-119031)
serhiy-storchaka May 14, 2024
a9328e2
typing tests: remove some unnecessary uses of `exec()` (#119005)
AlexWaygood May 14, 2024
7a97ee5
Misc improvements to the itertools docs (gh-119040)
rhettinger May 14, 2024
d8e0e00
gh-118928: sqlite3: disallow sequences of params with named placehold…
erlend-aasland May 14, 2024
fbe6a09
GH-101357: Suppress `OSError` from `pathlib.Path.exists()` and `is_*(…
barneygale May 14, 2024
7d8725a
GH-74033: Drop deprecated `pathlib.Path` keyword arguments (#118793)
barneygale May 14, 2024
ee13797
3.13 What's New: Add PEP 702 (#118922)
JelleZijlstra May 15, 2024
94591dc
gh-118486: Simplify test_win32_mkdir_700 to check the exact ACL (GH-1…
zooba May 15, 2024
7d722b7
Remove references to private symbols from zipimport module docstring …
graingert May 15, 2024
5b88d95
gh-118760: Fix errors in calling Tkinter bindings on Windows (GH-118782)
serhiy-storchaka May 15, 2024
fb0cf7d
gh-119009: Add gettext target (#119006)
rffontenelle May 15, 2024
4d3ef80
Docs: fix typos in documentation (gh-118941)
xyb May 15, 2024
66b73e9
Use literal syntax in origin property (#119029)
rffontenelle May 16, 2024
0142a22
Fix typos in test_buffer.py and update numpy issue links (#118963)
Wulian233 May 16, 2024
0152dc4
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (G…
serhiy-storchaka May 16, 2024
b683994
Add Tkinter tests for different events (GH-118778)
serhiy-storchaka May 16, 2024
17cba55
gh-108267: Fix object.__setattr__ regression in dataclasses docs (#11…
hauntsaninja May 16, 2024
ab73bcd
Explain how to install LLVM on Fedora (GH-118983)
hroncok May 16, 2024
4702b7b
GH-118943: Fix a race condition when generating jit_stencils.h (GH-11…
brandtbucher May 16, 2024
100c7ab
gh-119049: Fix incorrect display of warning which is constructed by C…
Eclips4 May 16, 2024
033f5c8
Improve `pyrepl` type-annotation coverage (#119081)
AlexWaygood May 17, 2024
65de194
Fix typos in documentation (#119092)
xyb May 17, 2024
447edb6
gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (#118696)
lysnikolaou May 17, 2024
31a28cb
gh-119049: Defer `import warnings` in `pathlib._local` (#119111)
Eclips4 May 17, 2024
81c3130
Minor improvements to the docs for itertools.tee() (gh-119135)
rhettinger May 18, 2024
0f5e8be
gh-119078: Clarify venv tutorial (GH-119129)
nineteendo May 18, 2024
74072a3
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140)
vstinner May 18, 2024
6914297
docs: make mimalloc license text literal (#119046)
rffontenelle May 18, 2024
c141d43
gh-119132: Update sys.version to identify free-threaded or not. (gh-1…
corona10 May 18, 2024
30b4e9f
gh-119050: Add type hints to libregrtest/results.py (#119144)
vstinner May 18, 2024
caf6064
GH-118447: Fix handling of unreadable symlinks in `os.path.realpath()…
barneygale May 18, 2024
ecd8664
gh-118750: Asymptotically faster `int(string)` (#118751)
tim-one May 19, 2024
ba8af84
Try to repair oddball test bots timing out in test_int (#119166)
tim-one May 19, 2024
697465f
marshal docs: Remove reference to "Sun" (#119161)
JelleZijlstra May 19, 2024
5307f44
GH-119146: Don't run JIT CI on unrelated changes (GH-119147)
savannahostrowski May 19, 2024
4b76671
GH-118447: Fix FreeBSD test failures. (#119170)
barneygale May 19, 2024
3c28510
GH-119113: Raise `TypeError` from `pathlib.PurePath.with_suffix(None)…
barneygale May 19, 2024
0abf997
gh-119105: difflib: improve recursion for degenerate cases (#119131)
pulkin May 19, 2024
357f5a1
IDLE: fix url in config.py comment (#119198)
terryjreedy May 20, 2024
16b46eb
gh-119121: Fix and test `async.staggered.staggered_race` (#119173)
sobolevn May 20, 2024
0883fd2
Enable some stricter mypy settings on `Lib/_pyrepl` (#119077)
AlexWaygood May 20, 2024
8692561
Ensure no warnings are found in the NEWS file before a given line number
hugovk Feb 14, 2024
2ff144f
TEMP news nit
hugovk May 20, 2024
File filter 8000

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ on:
push:
branches:
- 'main'
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
- '3.*'
pull_request:
branches:
- 'main'
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
- '3.*'

permissions:
contents: read
Expand Down Expand Up @@ -208,7 +200,7 @@ jobs:
with:
config_hash: ${{ needs.check_source.outputs.config_hash }}
# macos-14 is M1, macos-13 is Intel
os-matrix: '["macos-14-xlarge", "macos-13-large"]'
os-matrix: '["macos-14", "macos-13"]'

build_macos_free_threading:
name: 'macOS (free-threading)'
Expand All @@ -219,7 +211,7 @@ jobs:
config_hash: ${{ needs.check_source.outputs.config_hash }}
free-threading: true
# macos-14-large is Intel with 12 cores (most parallelism)
os-matrix: '["macos-14-large"]'
os-matrix: '["macos-14"]'

build_ubuntu:
name: 'Ubuntu'
Expand Down Expand Up @@ -494,6 +486,7 @@ jobs:
config_hash: ${{ needs.check_source.outputs.config_hash }}
options: ./configure --config-cache --with-thread-sanitizer --with-pydebug
suppressions_path: Tools/tsan/supressions.txt
tsan_logs_artifact_name: tsan-logs-default

build_tsan_free_threading:
name: 'Thread sanitizer (free-threading)'
Expand All @@ -504,6 +497,7 @@ jobs:
config_hash: ${{ needs.check_source.outputs.config_hash }}
options: ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
suppressions_path: Tools/tsan/suppressions_free_threading.txt
tsan_logs_artifact_name: tsan-logs-free-threading

# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
cifuzz:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on:
- '**jit**'
- 'Python/bytecodes.c'
- 'Python/optimizer*.c'
- '!Python/perf_jit_trampoline.c'
- '!**/*.md'
- '!**/*.ini'
push:
paths:
- '**jit**'
- 'Python/bytecodes.c'
- 'Python/optimizer*.c'
- '!Python/perf_jit_trampoline.c'
- '!**/*.md'
- '!**/*.ini'
workflow_dispatch:

permissions:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
python Doc/tools/check-warnings.py \
--annotate-diff '${{ env.branch_base }}' '${{ env.branch_pr }}' \
--fail-if-regression \
--fail-if-improved
--fail-if-improved \
--fail-if-new-news-nit

# This build doesn't use problem matchers or check annotations
build_doc_oldest_supported_sphinx:
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/reusable-tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: 'A repo relative path to the suppressions file'
required: true
type: string
tsan_logs_artifact_name:
description: 'Name of the TSAN logs artifact. Must be unique for each job.'
required: true
type: string

jobs:
build_tsan_reusable:
Expand All @@ -29,12 +33,19 @@ jobs:
- name: Install Dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
sudo apt install -y clang
# Install clang-18
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
sudo update-alternatives --set clang /usr/bin/clang-18
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
sudo update-alternatives --set clang++ /usr/bin/clang++-18
# Reduce ASLR to avoid TSAN crashing
sudo sysctl -w vm.mmap_rnd_bits=28
- name: TSAN Option Setup
run: |
echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }}" >> $GITHUB_ENV
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> $GITHUB_ENV
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Add ccache to PATH
Expand All @@ -53,3 +64,13 @@ jobs:
run: make pythoninfo
- name: Tests
run: ./python -m test --tsan -j4
- name: Display TSAN logs
if: always()
run: find ${GITHUB_WORKSPACE} -name 'tsan_log.*' | xargs head -n 1000
- name: Archive TSAN logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.tsan_logs_artifact_name }}
path: tsan_log.*
if-no-files-found: ignore
6 changes: 6 additions & 0 deletions Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ help:
@echo " clean to remove build files"
@echo " venv to create a venv with necessary tools"
@echo " html to make standalone HTML files"
@echo " gettext to generate POT files"
@echo " htmlview to open the index page built by the html target in your browser"
@echo " htmllive to rebuild and reload HTML files in your browser"
@echo " htmlhelp to make HTML files and a HTML help project"
Expand Down Expand Up @@ -140,6 +141,11 @@ pydoc-topics: build
@echo "Building finished; now run this:" \
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"

.PHONY: gettext
gettext: BUILDER = gettext
gettext: SPHINXOPTS += '-d build/doctrees-gettext'
gettext: build

.PHONY: htmlview
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
Expand Down
1 change: 1 addition & 0 deletions Doc/c-api/dict.rst
10000
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ Dictionary Objects
to both *default_value* and *\*result* (if it's not ``NULL``).
These may refer to the same object: in that case you hold two separate
references to it.

.. versionadded:: 3.13


Expand Down
8 changes: 4 additions & 4 deletions Doc/c-api/init_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1250,10 +1250,10 @@ PyConfig
If non-zero, initialize the perf trampoline. See :ref:`perf_profiling`
for more information.

Set by :option:`-X perf <-X>` command line option and by the
:envvar:`PYTHONPERFSUPPORT` environment variable for perf support
with stack pointers and :option:`-X perfjit <-X>` command line option
and by the :envvar:`PYTHONPERFJITSUPPORT` environment variable for perf
Set by :option:`-X perf <-X>` command-line option and by the
:envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support
with stack pointers and :option:`-X perf_jit <-X>` command-line option
and by the :envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf
support with DWARF JIT information.

Default: ``-1``.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Object Protocol

Properly handle returning :c:data:`Py_NotImplemented` from within a C
function (that is, create a new :term:`strong reference`
to NotImplemented and return it).
to :const:`NotImplemented` and return it).


.. c:macro:: Py_PRINT_RAW
Expand Down
6 changes: 6 additions & 0 deletions 10000 Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@
# Split the index
html_split_index = True

# Split pot files one per reST file
gettext_compact = False

# Options for LaTeX output
# ------------------------
Expand Down Expand Up @@ -435,6 +437,10 @@
epub_author = 'Python Documentation Authors'
epub_publisher = 'Python Software Foundation'

# index pages are not valid xhtml
# https://github.com/sphinx-doc/sphinx/issues/12359
epub_use_index = False

# Options for the coverage checker
# --------------------------------

Expand Down
74 changes: 50 additions & 24 deletions Doc/howto/perf_profiling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ the :option:`!-X` option takes precedence over the environment variable.

Example, using the environment variable::

$ PYTHONPERFSUPPORT=1 python script.py
$ PYTHONPERFSUPPORT=1 perf record -F 9999 -g -o perf.data python script.py
$ perf report -g -i perf.data

Example, using the :option:`!-X` option::

$ python -X perf script.py
$ perf record -F 9999 -g -o perf.data python -X perf script.py
$ perf report -g -i perf.data

Example, using the :mod:`sys` APIs in file :file:`example.py`:
Expand All @@ -184,7 +184,7 @@ Example, using the :mod:`sys` APIs in file :file:`example.py`:

...then::

$ python ./example.py
$ perf record -F 9999 -g -o perf.data python ./example.py
$ perf report -g -i perf.data


Expand All @@ -210,31 +210,57 @@ of ``perf``.
How to work without frame pointers
----------------------------------

If you are working with a Python interpreter that has been compiled without frame pointers
you can still use the ``perf`` profiler but the overhead will be a bit higher because Python
needs to generate unwinding information for every Python function call on the fly. Additionally,
``perf`` will take more time to process the data because it will need to use the DWARF debugging
information to unwind the stack and this is a slow process.
If you are working with a Python interpreter that has been compiled without
frame pointers, you can still use the ``perf`` profiler, but the overhead will be
a bit higher because Python needs to generate unwinding information for every
Python function call on the fly. Additionally, ``perf`` will take more time to
process the data because it will need to use the DWARF debugging information to
unwind the stack and this is a slow process.

To enable this mode, you can use the environment variable :envvar:`PYTHONPERFJITSUPPORT` or the
:option:`-X perfjit <-X>` option, which will enable the JIT mode for the ``perf`` profiler.
To enable this mode, you can use the environment variable
:envvar:`PYTHON_PERF_JIT_SUPPORT` or the :option:`-X perf_jit <-X>` option,
which will enable the JIT mode for the ``perf`` profiler.

When using the perf JIT mode, you need an extra step before you can run ``perf report``. You need to
call the ``perf inject`` command to inject the JIT information into the ``perf.data`` file.
.. note::

$ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperfjit my_script.py
$ perf inject -i perf.data --jit
$ perf report -g -i perf.data
Due to a bug in the ``perf`` tool, only ``perf`` versions higher than v6.8
will work with the JIT mode. The fix was also backported to the v6.7.2
version of the tool.

or using the environment variable::
Note that when checking the version of the ``perf`` tool (which can be done
by running ``perf version``) you must take into account that some distros
add some custom version numbers including a ``-`` character. This means
that ``perf 6.7-3`` is not necessarily ``perf 6.7.3``.

When using the perf JIT mode, you need an extra step before you can run ``perf
report``. You need to call the ``perf inject`` command to inject the JIT
information into the ``perf.data`` file.::

$ PYTHONPERFJITSUPPORT=1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
$ perf inject -i perf.data --jit
$ perf report -g -i perf.data
$ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperf_jit my_script.py
$ perf inject -i perf.data --jit --output perf.jit.data
$ perf report -g -i perf.jit.data

or using the environment variable::

Notice that when using ``--call-graph dwarf`` the ``perf`` tool will take snapshots of the stack of
the process being profiled and save the information in the ``perf.data`` file. By default the size of
the stack dump is 8192 bytes but the user can change the size by passing the size after comma like
``--call-graph dwarf,4096``. The size of the stack dump is important because if the size is too small
``perf`` will not be able to unwind the stack and the output will be incomplete.
$ PYTHON_PERF_JIT_SUPPORT=1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
$ perf inject -i perf.data --jit --output perf.jit.data
$ perf report -g -i perf.jit.data

``perf inject --jit`` command will read ``perf.data``,
automatically pick up the perf dump file that Python creates (in
``/tmp/perf-$PID.dump``), and then create ``perf.jit.data`` which merges all the
JIT information together. It should also create a lot of ``jitted-XXXX-N.so``
files in the current directory which are ELF images for all the JIT trampolines
that were created by Python.

.. warning::
Notice that when using ``--call-graph dwarf`` the ``perf`` tool will take
snapshots of the stack of the process being profiled and save the
information in the ``perf.data`` file. By default the size of the stack dump
is 8192 bytes but the user can change the size by passing the size after
comma like ``--call-graph dwarf,4096``. The size of the stack dump is
important because if the size is too small ``perf`` will not be able to
unwind the stack and the output will be incomplete. On the other hand, if
the size is too big, then ``perf`` won't be able to sample the process as
frequently as it would like as the overhead will be higher.

2 changes: 1 addition & 1 deletion Doc/howto/urllib2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -594,5 +594,5 @@ This document was reviewed and revised by John Lee.
scripts with a localhost server, I have to prevent urllib from using
the proxy.
.. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe
<https://code.activestate.com/recipes/456195/>`_.
<https://code.activestate.com/recipes/456195-urrlib2-opener-for-ssl-proxy-connect-method/>`_.

4 changes: 2 additions & 2 deletions Doc/library/__future__.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`__future__` --- Future statement definitions
==================================================
:mod:`!__future__` --- Future statement definitions
===================================================

.. module:: __future__
:synopsis: Future statement definitions
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/__main__.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`__main__` --- Top-level code environment
==============================================
:mod:`!__main__` --- Top-level code environment
===============================================

.. module:: __main__
:synopsis: The environment where top-level code is run. Covers command-line
Expand Down
10 changes: 5 additions & 5 deletions Doc/library/_thread.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`_thread` --- Low-level threading API
==========================================
:mod:`!_thread` --- Low-level threading API
===========================================

.. module:: _thread
:synopsis: Low-level threading API.
Expand Down Expand Up @@ -169,14 +169,14 @@ Lock objects have the following methods:
time can acquire a lock --- that's their reason for existence).

If the *blocking* argument is present, the action depends on its
value: if it is False, the lock is only acquired if it can be acquired
immediately without waiting, while if it is True, the lock is acquired
value: if it is false, the lock is only acquired if it can be acquired
immediately without waiting, while if it is true, the lock is acquired
unconditionally as above.

If the floating-point *timeout* argument is present and positive, it
specifies the maximum wait time in seconds before returning. A negative
*timeout* argument specifies an unbounded wait. You cannot specify
a *timeout* if *blocking* is False.
a *timeout* if *blocking* is false.

The return value is ``True`` if the lock is acquired successfully,
``False`` if not.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/abc.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`abc` --- Abstract Base Classes
====================================
:mod:`!abc` --- Abstract Base Classes
=====================================

.. module:: abc
:synopsis: Abstract base classes according to :pep:`3119`.
Expand Down
1 change: 0 additions & 1 deletion Doc/library/allos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ but they are available on most other systems as well. Here's an overview:
io.rst
time.rst
argparse.rst
getopt.rst
logging.rst
logging.config.rst
logging.handlers.rst
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`argparse` --- Parser for command-line options, arguments and sub-commands
===============================================================================
:mod:`!argparse` --- Parser for command-line options, arguments and sub-commands
================================================================================

.. module:: argparse
:synopsis: Command-line option and argument parsing library.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/array.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`array` --- Efficient arrays of numeric values
===================================================
:mod:`!array` --- Efficient arrays of numeric values
====================================================

.. module:: array
:synopsis: Space efficient arrays of uniformly typed numeric values.
Expand Down
Loading
0