Skip to content
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 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

backport a9a74da 3.13 #119642

Closed
wants to merge 160 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
c844b14
Post 3.13.0b1
Yhg1s May 8, 2024
58d9a9b
[3.13] Run CI on the 3.13 branch (GH-118779) (#118781)
miss-islington May 8, 2024
02d49af
[3.13] Docs: fix typos in documentation (GH-118752) (#118787)
miss-islington May 8, 2024
c6680cd
[3.13] gh-118772: Allow TypeVars without a default to follow those wi…
miss-islington May 8, 2024
c33bba6
[3.13] docs: module page titles should not start with a link to thems…
miss-islington May 8, 2024
8f31af6
[3.13] Format None, True, False and NotImplemented as literals (GH-11…
miss-islington May 8, 2024
7b9ca26
[3.13] gh-117657: Fix data races when writing / reading `ob_gc_bits` …
miss-islington May 8, 2024
09896fc
[3.13] [tests]: Mark ``test_statistics.test_kde_random`` with a ``req…
miss-islington May 9, 2024
632682c
[3.13] gh-118033: Fix `__weakref__` not set for generic dataclasses (…
miss-islington May 9, 2024
d86b494
gh-118486: Update docs for CVE-2024-4030 reference (GH-118737)
zooba May 9, 2024
c4b853f
[3.13] gh-103956: Fix `trace` output in case of missing source line (…
miss-islington May 9, 2024
a98e44a
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
miss-islington May 9, 2024
738877a
[3.13] gh-118817: Fix `asyncio REPL` on Windows (GH-118819) (#118847)
miss-islington May 9, 2024
62a559a
[3.13] gh-117657: Acquire a critical section around `SemLock.__{enter…
miss-islington May 9, 2024
9d646d0
gh-118773: Use language-invariant SDDL string instead of aliases for …
miss-islington May 9, 2024
098eec9
[3.13] gh-118849: Fix "code will never be executed" warning in `dicto…
miss-islington May 9, 2024
846cfb9
[3.13] gh-118561: Fix crash involving list.extend in free-threaded bu…
miss-islington May 9, 2024
0a23970
[3.13] gh-116984: Make mimalloc header includes relative to the curre…
miss-islington May 9, 2024
d4c6948
[3.13] gh-118846: Fix PGO tests in free-threaded build (GH-118862) (#…
miss-islington May 9, 2024
982c73a
[3.13] gh-117657: Replace TSAN suppresions with more specific rules (…
miss-islington May 9, 2024
00ec116
[3.13] gh-118851: Default ctx arguments to AST constructors to Load()…
miss-islington May 9, 2024
b62cb52
[3.13] Revert "gh-115432: Add critical section variant that handles a…
miss-islington May 9, 2024
d524802
Fix some missing null checks. (GH-118721)
miss-islington May 10, 2024
760b3f0
gh-118689: Doc: fix ePub build (GH-118690)
miss-islington May 10, 2024
7dc9875
gh-118209: Add Windows structured exception handling to mmap module (…
miss-islington May 10, 2024
93fce2d
[3.13] Rename `notimplemented_methods` into `nodefault_methods` (GH-1…
miss-islington May 10, 2024
bb5bf24
[3.13] gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797) (G…
miss-islington May 10, 2024
4480dd8
[3.13] gh-117657: Fix data races reported by TSAN on `interp->threads…
miss-islington May 10, 2024
0874a40
[3.13] Correct the argument names for `secrets.choice` and `secrets.r…
miss-islington May 10, 2024
0becae3
[3.13] gh-117657: Fix QSBR race condition (GH-118843) (#118905)
miss-islington May 10, 2024
6df4913
[3.13] gh-118895: Call PyType_Ready() on typing.NoDefault (GH-118897)…
miss-islington May 10, 2024
b3074f0
[3.13] Rename typing._collect_parameters (GH-118900) (#118917)
miss-islington May 10, 2024
cceb758
[3.13] gh-118846: Fix free-threading test failures when run sequentia…
miss-islington May 10, 2024
7dc9e92
[3.13] gh-117657: Log TSAN warnings to separate files and archive the…
miss-islington May 10, 2024
93ef7aa
[3.13] gh-118921: Add `copy()` method for `FrameLocalsProxy` (GH-1189…
miss-islington May 10, 2024
d309474
[3.13] gh-117655: Prevent `test_strptime` from raising a DeprecationW…
miss-islington May 11, 2024
6e855b3
[3.13] gh-118899: Add tests for `NotImplemented` attribute access (GH…
miss-islington May 12, 2024
9d2c10b
[3.13] GH-118844: Fix build failures when combining --disable-gil wit…
miss-islington May 13, 2024
a8ea966
[3.13] gh-87106: Fix inspect.signature.bind() handling of positional-…
miss-islington May 13, 2024
9418832
[3.13] Improve the `rmtree` doc for `dir_fd` param addition in 3.11 (…
miss-islington May 13, 2024
44995aa
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
miss-islington May 13, 2024
09d4c07
[3.13] gh-58933: Make pdb return to caller frame correctly when f_tra…
miss-islington May 13, 2024
d1aac22
[3.13] gh-119010: Adds docs about `__type_params__` to `functools.upd…
miss-islington May 13, 2024
c7628b0
[3.13] gh-118998: Handle errors correctly in `tmtotuple` in `timemodu…
miss-islington May 13, 2024
29a2f9c
[3.13] GH-118836: Fix JIT build error when SHT_NOTE section is presen…
miss-islington May 13, 2024
8720006
[3.13] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path…
miss-islington May 14, 2024
54839f0
[3.13] Add yet few cases for urlparse/urlunparse roundtrip tests (GH-…
miss-islington May 14, 2024
041cc2a
[3.13] typing tests: remove some unnecessary uses of `exec()` (GH-119…
miss-islington May 14, 2024
87f683e
[3.13] Itertools docs: fix parameter names and indentation in Python …
miss-islington May 14, 2024
8439d09
[3.13] Misc improvements to the itertools docs (gh-119040) (#119045)
miss-islington May 14, 2024
dd8a61f
[3.13] 3.13 What's New: Add PEP 702 (GH-118922) (#119062)
miss-islington May 15, 2024
e1dfa97
gh-118486: Simplify test_win32_mkdir_700 to check the exact ACL (GH-1…
miss-islington May 15, 2024
f85d59c
[3.13] Remove references to private symbols from zipimport module doc…
miss-islington May 15, 2024
4f81915
[3.13] gh-118760: Fix errors in calling Tkinter bindings on Windows (…
miss-islington May 15, 2024
7c224dd
[3.13] gh-119009: Add gettext target (GH-119006) (#119074)
miss-islington May 15, 2024
bca7fb0
[3.13] Use literal syntax in origin property (GH-119029) (#119083)
miss-islington May 16, 2024
1dc7fcd
[3.13] gh-119064: Use os_helper.FakePath instead of pathlib.Path in t…
miss-islington May 16, 2024
8a4730e
[3.13] Add Tkinter tests for different events (GH-118778) (GH-119091)
miss-islington May 16, 2024
c69fe80
[3.13] gh-108267: Fix object.__setattr__ regression in dataclasses do…
miss-islington May 16, 2024
45fbca9
[3.13] Explain how to install LLVM on Fedora (GH-119100)
miss-islington May 16, 2024
acffe20
[3.13] GH-118943: Fix a race condition when generating jit_stencils.h…
miss-islington May 16, 2024
ada4ad0
[3.13] Fix typos in documentation (GH-119092) (#119116)
miss-islington May 17, 2024
ced71d3
[3.13] gh-119049: Fix incorrect display of warning which is construct…
miss-islington May 17, 2024
374655f
[3.13] Minor improvements to the docs for itertools.tee() (gh-119135)…
miss-islington May 18, 2024
1bb3a9d
[3.13] gh-119078: Clarify venv tutorial (GH-119129) (GH-119142)
miss-islington May 18, 2024
9c2de86
[3.13] gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-11…
miss-islington May 18, 2024
641e59d
[3.13] docs: make mimalloc license text literal (GH-119046) (#119149)
miss-islington May 18, 2024
ec88e9f
[3.13] gh-119132: Update sys.version to identify free-threaded or not…
miss-islington May 18, 2024
9129614
[3.13] gh-119050: Add type hints to libregrtest/results.py (GH-119144…
miss-islington May 18, 2024
7407267
[3.13] GH-118447: Fix handling of unreadable symlinks in `os.path.rea…
miss-islington May 18, 2024
bc5e47c
[3.13] marshal docs: Remove reference to "Sun" (GH-119161) (#119167)
miss-islington May 19, 2024
fdc50ba
[3.13] GH-118447: Fix FreeBSD test failures. (GH-119170) (#119181)
miss-islington May 19, 2024
27b61c1
[3.13] GH-119113: Raise `TypeError` from `pathlib.PurePath.with_suffi…
miss-islington May 19, 2024
3b90807
[3.13] IDLE: fix url in config.py comment (GH-119198) (#119199)
miss-islington May 20, 2024
3a8ab99
[3.13] gh-119121: Fix and test `async.staggered.staggered_race` (GH-1…
miss-islington May 20, 2024
cbf064b
[3.13] typing docs: Fix formatting issue (GH-119210) (#119212)
miss-islington May 20, 2024
a52ed7e
[3.13] gh-119185: Fix typo in `_pyrepl.pager`: `tempfilepager` should…
miss-islington May 20, 2024
8f3fc01
[3.13] [docs] TypeVarTuple default is keyword-only (GH-119215) (#119224)
miss-islington May 20, 2024
e370b64
[3.13] gh-115119: Fall back to bundled libmpdec if system libmpdec is…
miss-islington May 20, 2024
a6b873f
[3.13] GH-119146: Don't run JIT CI on unrelated changes (GH-119226)
miss-islington May 20, 2024
fda3291
[3.13] DOCS: Suggest always calling exec with a globals argument and …
miss-islington May 20, 2024
d8c562a
[3.13] gh-112844: Update CPE references for external dependencies (GH…
miss-islington May 20, 2024
054f1af
[3.13] gh-92081: Fix for email.generator.Generator with whitespace be…
miss-islington May 20, 2024
906f6cb
[3.13] Use correct markup in unittest.mock.reset_mock documentation (…
miss-islington May 20, 2024
b4462aa
[3.13] gh-118760: Restore the default value of tkinter.wantobjects to…
miss-islington May 20, 2024
572b0b0
[3.13] gh-119189: Add more tests for mixed Fraction arithmetic (GH-11…
miss-islington May 20, 2024
071d996
[3.13] gh-119253: use ImportError in _ios_support (GH-119254) (#119265)
miss-islington May 20, 2024
42a8d11
[3.13] gh-119050: Add XML support to libregrtest refleak checker (GH-…
miss-islington May 20, 2024
d8fbe5b
[3.13] gh-108267 Fix another dataclasses docs typo (GH-119277) (#119279)
miss-islington May 20, 2024
24b0e8d
[3.13] gh-118912: Remove description of issue fixed in 3.5 from autos…
miss-islington May 20, 2024
f7303cd
[3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics exam…
miss-islington May 21, 2024
db64dae
[3.13] gh-74929: PEP 667 general docs update (gh-119291)
miss-islington May 21, 2024
49ad4d0
[3.13] Use `fail-fast: false` in `mypy.yml` (GH-119297) (#119304)
miss-islington May 21, 2024
f028451
[3.13] gh-119102: Fix REPL for dumb terminal (GH-119269) (#119308)
miss-islington May 21, 2024
1929b7e
[3.13] Docs: Ensure no warnings are found in the NEWS file before a g…
hugovk May 21, 2024
dcb8030
[3.13] gh-119053: Implement the fast path for list.__getitem__ (gh-11…
miss-islington May 21, 2024
d93c4f9
[3.13] GH-119292: Add job to JIT CI to build and test with --disable-…
miss-islington May 21, 2024
11ca1d9
[3.13] GH-110383: Improve Tutorial for Input Ouput (GH-119230) (GH-11…
miss-islington May 21, 2024
256b791
[3.13] gh-110383: Document `socket.makefile()` accepts combined modes…
miss-islington May 21, 2024
8860f83
[3.13] gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to …
miss-islington May 21, 2024
fef202f
[3.13] Fix typos in documentation (GH-119295) (#119337)
miss-islington May 21, 2024
0582016
[3.13] Docs: Add central references to free-threading-related options…
miss-islington May 21, 2024
f371565
[3.13] gh-119102: Fix REPL for dumb terminal (GH-119332) (#119359)
miss-islington May 22, 2024
f15fbe9
gh-118507 : Refactor `nt._path_is*` to improve applicability for othe…
miss-islington May 22, 2024
e992217
[3.13] gh-118877: Fix AssertionError crash in pyrepl (GH-118936) (#11…
miss-islington May 22, 2024
455b386
[3.13] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() do…
miss-islington May 22, 2024
b5b0e32
[3.13] DOCS: fix error in exec namespace note (gh-119380)
miss-islington May 22, 2024
f757996
[3.13] Clarify that dklen is expected in bytes for the hashlib functi…
miss-islington May 22, 2024
ec484b6
[3.13] gh-119189: Add yet more tests for mixed Fraction arithmetic (G…
miss-islington May 22, 2024
0e61989
[3.13] Fix typos in NEWS entries for 3.13 (GH-119374) (GH-119385)
miss-islington May 22, 2024
414346e
[3.13] Fix version number in use_load_tests deprecation reference (GH…
miss-islington May 22, 2024
6892b40
[3.13] gh-118643: Fix AttributeError in the email module (GH-119099) …
miss-islington May 22, 2024
7214598
[3.13] gh-119306: Break up _pyrepl tests (GH-119307) (#119362)
lysnikolaou May 22, 2024
ac91636
[3.13] gh-111201: Remove readline dependency from the PyREPL (GH-1192…
lysnikolaou May 22, 2024
aefe2e6
[3.13] gh-111201: Add append to screen method to avoid recalculation …
miss-islington May 22, 2024
eafd633
[3.13] gh-119205: Fix autocompletion bug in new repl (GH-119229) (#11…
miss-islington May 22, 2024
a463cd8
[3.13] gh-118893: Evaluate all statements in the new REPL separately …
miss-islington May 22, 2024
bfd9c3e
[3.13] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across …
miss-islington May 22, 2024
cd39da7
[3.13] Improve `pyrepl` type-annotation coverage (GH-119081) (#119415)
miss-islington May 22, 2024
0841606
[3.13] gh-119247: Add macros to use PySequence_Fast safely in free-th…
miss-islington May 22, 2024
0bd7c87
[3.13] gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (GH-1…
miss-islington May 22, 2024
3e30a38
gh-117505: Run ensurepip in isolated env in Windows installer (GH-118…
miss-islington May 22, 2024
e6e4efc
[3.13] gh-119357: Increase test coverage for keymap in _pyrepl (GH-11…
lysnikolaou May 22, 2024
6bc7fc0
[3.13] gh-113978: Ignore warnings on text completion inside REPL (GH-…
miss-islington May 22, 2024
81440c5
[3.13] Enable some stricter mypy settings on `Lib/_pyrepl` (GH-119077…
miss-islington May 22, 2024
9435124
[3.13] gh-111201: auto-indentation in _pyrepl (GH-119348) (#119427)
lysnikolaou May 22, 2024
a6ed742
[3.13] gh-70795: Rework RLock documentation (GH-103853) (#119436)
miss-islington May 22, 2024
cd35e9d
[3.13] gh-117657: Fix missing atomic in dict_resize (GH-119312) (#119…
miss-islington May 22, 2024
dbff1f1
[3.13] gh-119434: Fix culmitive errors in wrapping as lines proceed (…
miss-islington May 23, 2024
9fa1b4f
[3.13] gh-118911: Trailing whitespace in a block shouldn't prevent th…
lysnikolaou May 23, 2024
58dbb4a
[3.13] gh-111201: Speed up paste mode in the REPL (#119341) (GH-11943…
miss-islington May 23, 2024
89e2689
[3.13] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) …
miss-islington May 23, 2024
dbe4f8a
[3.13] Fix typos in what's new documentation (GH-119448) (#119449)
miss-islington May 23, 2024
251ef2e
[3.13] GH-117195: Avoid assertion error in `object.__sizeof__` (GH-11…
miss-islington May 23, 2024
8fd8cc5
[3.13] gh-119469: Fix _pyrepl reference leaks (GH-119470) (#119471)
miss-islington May 23, 2024
d98d6b1
[3.13] gh-118727: Don't drop the GIL in `drop_gil()` unless the curre…
miss-islington May 23, 2024
c750061
[3.13] gh-119461: Fix ThreadedVSOCKSocketStreamTest (#119465) (#119479)
vstinner May 23, 2024
e27e369
[3.13] GH-113464: Run the JIT interpreter before any other JIT CI (GH…
miss-islington May 24, 2024
c864efb
[3.13] gh-118692: Avoid creating unnecessary StopIteration instances …
miss-islington May 24, 2024
0bab0b3
[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)
miss-islington May 24, 2024
217d57f
[3.13] GH-119496: accept UTF-8 BOM in .pth files (GH-119508)
miss-islington May 24, 2024
cc38ee1
gh-118263: Add additional arguments to path_t (Argument Clinic type) …
miss-islington May 24, 2024
392a3d8
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-119520) (#119…
miss-islington May 24, 2024
5544651
[3.13] Misc improvement to the docs for itertools (gh-119529) (#119531)
rhettinger May 24, 2024
f49749c
[3.13] gh-111999: Fix the signature of str.format_map() (GH-119540) (…
miss-islington May 25, 2024
317cc3b
[3.13] FAQ: Add reference to Python version numbering scheme (GH-1192…
miss-islington May 25, 2024
2404cd9
[3.13] gh-99180: Make `StackSummary.should_show_carets` private (GH-1…
miss-islington May 25, 2024
3f0198d
[3.13] docs: fix a few typos identified by codespell (GH-119516) (#11…
miss-islington May 26, 2024
825a5ae
[3.13] gh-111997: Fix argument count for LINE event and clarify type …
miss-islington May 26, 2024
46d7712
[3.13] Fix typos in HISTORY documentation (GH-119453) (#119597)
miss-islington May 27, 2024
f1302c1
[3.13] gh-119467: Fix Py_buffer.format type and correct documentation…
miss-islington May 27, 2024
ba71835
[3.13] Docs: Only install sphinx-autobuild for `make htmllive` (GH-11…
miss-islington May 27, 2024
9edf010
[3.13] gh-119580: Improve version added section for convenience varia…
miss-islington May 27, 2024
8117cb5
[3.13] Misc cleanups and wording improvements for the itertools docs …
miss-islington May 27, 2024
0a4a318
[3.13] Docs: Move inline JavaScript to own file to reduce duplication…
hugovk May 27, 2024
bd9983c
[3.13] gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-…
miss-islington May 27, 2024
660125f
[3.13] gh-119584: Fix test_import Failed Assertion (gh-119623) (gh-11…
miss-islington May 27, 2024
d58ebf0
[3.13] gh-117398: Add multiphase support to _datetime (gh-119373) (gh…
miss-islington May 27, 2024
7322ff1
[3.13] gh-119317: findall instead of traverse for docutils nodes (GH-…
miss-islington May 27, 2024
9216a53
[3.13] gh-117398: Revert gh-119636, Add multiphase support to _dateti…
ericsnowcurrently May 28, 2024
File filter

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
  •  
  •  
  •  
14 changes: 4 additions & 10 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 @@ -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
39 changes: 39 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 All @@ -20,8 +26,22 @@ concurrency:
cancel-in-progress: true

jobs:
interpreter:
name: Interpreter (Debug)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Build tier two interpreter
run: |
./configure --enable-experimental-jit=interpreter --with-pydebug
make all --jobs 4
- name: Test tier two interpreter
run: |
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
jit:
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
needs: interpreter
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
Expand Down Expand Up @@ -144,3 +164,22 @@ jobs:
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
make all --jobs 4
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3

jit-with-disabled-gil:
name: Free-Threaded (Debug)
needs: interpreter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build with JIT enabled and GIL disabled
run: |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
export PATH="$(llvm-config-18 --bindir):$PATH"
./configure --enable-experimental-jit --with-pydebug --disable-gil
make all --jobs 4
- name: Run tests
run: |
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
1 change: 1 addition & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ concurrency:
jobs:
mypy:
strategy:
fail-fast: false
matrix:
target: [
"Lib/_pyrepl",
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
16 changes: 15 additions & 1 deletion .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 Down Expand Up @@ -41,7 +45,7 @@ jobs:
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 @@ -60,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
12 changes: 11 additions & 1 deletion 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,14 +141,23 @@ 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'))"

.PHONY: ensure-sphinx-autobuild
ensure-sphinx-autobuild: venv
$(VENVDIR)/bin/sphinx-autobuild --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install sphinx-autobuild

.PHONY: htmllive
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
htmllive: SPHINXOPTS = --re-ignore="/venv/" --open-browser --delay 0
htmllive: html
htmllive: ensure-sphinx-autobuild html

.PHONY: clean
clean: clean-venv
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard
:c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``.

.. c:member:: const char *format
.. c:member:: char *format

A *NUL* terminated string in :mod:`struct` module style syntax describing
A *NULL* terminated string in :mod:`struct` module style syntax describing
the contents of a single item. If this is ``NULL``, ``"B"`` (unsigned bytes)
is assumed.

Expand Down
1 change: 1 addition & 0 deletions Doc/c-api/dict.rst
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
11 changes: 6 additions & 5 deletions Doc/c-api/frame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,18 @@ See also :ref:`Reflection <reflection>`.
.. c:function:: PyObject* PyFrame_GetLocals(PyFrameObject *frame)

Get the *frame*'s :attr:`~frame.f_locals` attribute.
If the frame refers to a function or comprehension, this returns
a write-through proxy object that allows modifying the locals.
In all other cases (classes, modules) it returns the :class:`dict`
representing the frame locals directly.
If the frame refers to an :term:`optimized scope`, this returns a
write-through proxy object that allows modifying the locals.
In all other cases (classes, modules, :func:`exec`, :func:`eval`) it returns
the mapping representing the frame locals directly (as described for
:func:`locals`).

Return a :term:`strong reference`.

.. versionadded:: 3.11

.. versionchanged:: 3.13
Return a proxy object for functions and comprehensions.
As part of :pep:`667`, return a proxy object for optimized scopes.


.. c:function:: int PyFrame_GetLineNumber(PyFrameObject *frame)
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ The available slot types are:
This slot is ignored by Python builds not configured with
:option:`--disable-gil`. Otherwise, it determines whether or not importing
this module will cause the GIL to be automatically enabled. See
:envvar:`PYTHON_GIL` and :option:`-X gil <-X>` for more detail.
:ref:`free-threaded-cpython` for more detail.

Multiple ``Py_mod_gil`` slots may not be specified in one module definition.

If ``Py_mod_gil`` is not specified, the import machinery defaults to
``Py_MOD_GIL_USED``.

.. versionadded: 3.13
.. versionadded:: 3.13

See :PEP:`489` for more details on multi-phase initialization.

Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ See :mod:`sys.monitoring` for descriptions of the events.
:c:func:`PyErr_GetRaisedException`).


.. c:function:: int PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset)
.. c:function:: int PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *value)

Fire a ``STOP_ITERATION`` event with the current exception (as returned by
:c:func:`PyErr_GetRaisedException`).
Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:`StopIteration`, it is used. Otherwise,
a new :exc:`StopIteration` instance is created with ``value`` as its argument.


Managing the Monitoring State
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
4 changes: 2 additions & 2 deletions Doc/c-api/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ as much as it can.
callable object that receives notification when *ob* is garbage collected; it
should accept a single parameter, which will be the weak reference object
itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a
weakly referencable object, or if *callback* is not callable, ``None``, or
weakly referenceable object, or if *callback* is not callable, ``None``, or
``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.


Expand All @@ -47,7 +47,7 @@ as much as it can.
be a callable object that receives notification when *ob* is garbage
collected; it should accept a single parameter, which will be the weak
reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob*
is not a weakly referencable object, or if *callback* is not callable,
is not a weakly referenceable object, or if *callback* is not callable,
``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.


Expand Down
6 changes: 6 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ It is important to call :c:func:`free` at the right time. If a block's address
is forgotten but :c:func:`free` is not called for it, the memory it occupies
cannot be reused until the program terminates. This is called a :dfn:`memory
leak`. On the other hand, if a program calls :c:func:`free` for a block and then
continues to use the block, it creates a conflict with re-use of the block
continues to use the block, it creates a conflict with reuse of the block
through another :c:func:`malloc` call. This is called :dfn:`using freed memory`.
It has the same bad consequences as referencing uninitialized data --- core
dumps, wrong results, mysterious crashes.
Expand Down
2 changes: 1 addition & 1 deletion Doc/extending/newtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ performance-critical objects (such as numbers).
.. seealso::
Documentation for the :mod:`weakref` module.

For an object to be weakly referencable, the extension type must set the
For an object to be weakly referenceable, the extension type must set the
``Py_TPFLAGS_MANAGED_WEAKREF`` bit of the :c:member:`~PyTypeObject.tp_flags`
field. The legacy :c:member:`~PyTypeObject.tp_weaklistoffset` field should
be left as zero.
Expand Down
4 changes: 2 additions & 2 deletions Doc/faq/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ available. Consult `the Python Package Index <https://pypi.org>`_ to
find packages of interest to you.


.. _faq-version-numbering-scheme:

How does the Python version numbering scheme work?
--------------------------------------------------

Expand Down Expand Up @@ -183,8 +185,6 @@ information on getting the source code and compiling it.
How do I get documentation on Python?
-------------------------------------

.. XXX mention py3k

The standard documentation for the current stable version of Python is available
at https://docs.python.org/3/. PDF, plain text, and downloadable HTML versions are
also available at https://docs.python.org/3/download.html.
Expand Down
9 changes: 9 additions & 0 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,15 @@ Glossary
(methods). Also the ultimate base class of any :term:`new-style
class`.

optimized scope
A scope where target local variable names are reliably known to the
compiler when the code is compiled, allowing optimization of read and
write access to these names. The local namespaces for functions,
generators, coroutines, comprehensions, and generator expressions are
optimized in this fashion. Note: most interpreter optimizations are
applied to all scopes, only those relying on a known set of local
and nonlocal variable names are restricted to optimized scopes.

package
A Python :term:`module` which can contain submodules or recursively,
subpackages. Technically, a package is a Python module with a
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/mro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ In this case the MRO is GFEF and the local precedence ordering is
preserved.

As a general rule, hierarchies such as the previous one should be
avoided, since it is unclear if F should override E or viceversa.
avoided, since it is unclear if F should override E or vice-versa.
Python 2.3 solves the ambiguity by raising an exception in the creation
of class G, effectively stopping the programmer from generating
ambiguous hierarchies. The reason for that is that the C3 algorithm
Expand Down
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
Loading
Loading