Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
2421 commits
Select commit Hold shift + click to select a range
5d04cc5
gh-102864: Add switching frame test for pdb (#119564)
gaogaotiantian May 26, 2024
5482a93
Re-order imports to align with zipp 3.18.2 (#119587)
jaraco May 27, 2024
5ef5622
Fix typos in HISTORY documentation (#119453)
xyb May 27, 2024
c7a5e1e
``Include/internal/pycore_import.h``: Fix typo (#119586)
Eclips4 May 27, 2024
3b26cd8
gh-119467: Fix Py_buffer.format type and correct documentation typo (…
adiaholic May 27, 2024
041a566
GH-117283: Add doc warning for `PyTuple_SetItem` refcount > 1 (#117916)
savannahostrowski May 27, 2024
59630f9
Docs: Add class role for IPV{4,6}Address and fix a typo (#118059)
rffontenelle May 27, 2024
88e3fee
Docs: Only install sphinx-autobuild for `make htmllive` (#119607)
hugovk May 27, 2024
3dfa364
gh-119580: Improve version added section for convenience variable (#1…
gaogaotiantian May 27, 2024
eea26c4
Docs: Move inline JavaScript to own file to reduce duplication (#119541)
hugovk May 27, 2024
3ff06eb
Withdraw most of my ownership in favor of Mark (#119611)
gvanrossum May 27, 2024
0bd0d40
Misc cleanups and wording improvements for the itertools docs (gh-119…
rhettinger May 27, 2024
ae7b176
gh-119584: Fix test_import Failed Assertion (gh-119623)
ericsnowcurrently May 27, 2024
3e8b609
gh-117398: Add multiphase support to _datetime (gh-119373)
erlend-aasland May 27, 2024
a9a74da
gh-119311: Fix name mangling with PEP 695 generic classes (#119464)
JelleZijlstra May 28, 2024
bf08f0a
Fix typos in comments (#119645)
xyb May 28, 2024
b313cc6
gh-117557: Improve error messages when a string, bytes or bytearray o…
serhiy-storchaka May 28, 2024
669175b
gh-116860: Remove outdated `test_parserhack` from `test_future` (#116…
sobolevn May 28, 2024
b407ad3
[doc] Clarify the nature of the root logger in the `logging` document…
jkunimune May 28, 2024
f912e5a
gh-118824: Remove deprecated `master_open` and `slave_open` from `pty…
sobolevn May 28, 2024
2da0dc0
gh-119659: Move `@no_rerun` to `test.support` (#119660)
sobolevn May 28, 2024
0518edc
gh-119396: Optimize unicode_repr() (#119617)
vstinner May 28, 2024
6ec3712
gh-119581: Add a test of InitVar with name shadowing (#119582)
stroxler May 28, 2024
a89fc26
gh-117398: gh-119655: datetime: Init static state once & don't free i…
encukou May 28, 2024
ae11d68
gh-117865: Defer import of re in ast (#119546)
JelleZijlstra May 28, 2024
6b240c2
gh-119011: `type.__type_params__` now return an empty tuple (#119296)
sobolevn May 28, 2024
ae9140f
gh-119676: remove several pseudo instructions which are use only in c…
iritkatriel May 28, 2024
d87b015
gh-119118: Fix performance regression in tokenize module (#119615)
lysnikolaou May 28, 2024
cfcc054
GH-119476: Split _CHECK_FUNCTION_VERSION out of _CHECK_FUNCTION_EXACT…
brandtbucher May 28, 2024
5cd3ffd
GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481)
brandtbucher May 28, 2024
606be66
gh-119538: Add missing expat build dependencies (#119647)
erlend-aasland May 28, 2024
548a11d
gh-117398: Convert datetime.IsoCalendarDate To A Heap Type (gh-119637)
ericsnowcurrently May 28, 2024
a8e35e8
gh-119443: Turn off from __future__ import annotations in REPL (#119493)
JelleZijlstra May 29, 2024
c0faade
gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (#1…
Eclips4 May 29, 2024
86d1a1a
gh-119555: catch SyntaxError from compile() in the InteractiveColored…
skirpichev May 29, 2024
cd11ff1
gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#…
skirpichev May 29, 2024
7ca74a7
gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712)
vstinner May 29, 2024
c1e9647
gh-119689: generate stack effect metadata for pseudo instructions (#1…
iritkatriel May 29, 2024
18c1a8d
gh-97588: Align ctypes struct layout to GCC/MSVC (GH-97702)
matthiasgoergens May 29, 2024
016a46a
gh-93554: add test for quickening of code in loops ending with condit…
iritkatriel May 29, 2024
0cdc5c8
gh-119613: Soft deprecate Py_IS_NAN/INFINITY/FINITE (#119701)
skirpichev May 29, 2024
055c739
CI: set correct working directory for Hypothesis cache (GH-119345)
Zac-HD May 29, 2024
1f481fd
gh-119273: Don't run test_ioctl in a process group (#119275)
vstinner May 29, 2024
34f9b3e
gh-119655: Fix reference leak in the ``_datetimemodule.c`` (gh-119713)
Eclips4 May 29, 2024
78d697b
gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)
zooba May 29, 2024
659cb7e
gh-119721: Integrate documentation fixes into heapq module docstring.…
filiplajszczak May 29, 2024
c8b45a3
gh-118673: Remove shebang and executable bits from stdlib modules. (#…
jaraco May 29, 2024
0751511
gh-93963: Remove deprecated names from importlib.abc (#119720)
hugovk May 29, 2024
bf4ff3a
gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentat…
adiaholic May 29, 2024
fcca08e
gh-119594: Improve pow(fraction.Fraction(), b, modulo) error message …
wimglenn May 29, 2024
df93f5d
gh-119070: Fix py.exe handling of /usr/bin/env commands missing exten…
zooba May 29, 2024
c22323c
gh-119525: Fix deadlock with `_PyType_Lookup` and the GIL (#119527)
colesbury May 29, 2024
a150679
GH-89727: Partially fix `shutil.rmtree()` recursion error on deep tre…
barneygale May 29, 2024
7ff61f5
GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (#119573)
barneygale May 29, 2024
2cc3502
subprocess docs: Fix semantically important typo (GH-119752)
zware May 29, 2024
3c890b5
GH-89727: Fix `os.fwalk()` recursion error on deep trees (#119638)
barneygale May 30, 2024
a5fef80
GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (#119766)
barneygale May 30, 2024
48f21b3
gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make …
encukou May 30, 2024
db00934
gh-118055: Update the finder glossary entry (GH-118278)
Lincoln-developer May 30, 2024
b1374aa
gh-110383: Remove references to removed popen[234] (GH-112783)
shenanigansd May 30, 2024
e50fac9
gh-119336: Restore removed _PyLong_NumBits() function (#119418)
emmatyping May 30, 2024
6fb191b
gh-119779: Fix pyporting howto docs (#119785)
SweetyAngel May 30, 2024
e91fc11
gh-119786: create folder in cpython repo for internals documentation …
iritkatriel May 30, 2024
e875c2d
gh-119791: Fix new Tkinter tests for wantobjects=0 (GH-119792)
serhiy-storchaka May 30, 2024
bf098d4
gh-109218: Refactor tests for the complex() constructor (GH-119635)
serhiy-storchaka May 30, 2024
1c04c63
gh-119729: Use 't' in pkg-config file name for free-threaded build (#…
colesbury May 30, 2024
ec1ba26
gh-109218: Improve documentation for the complex() constructor (GH-11…
serhiy-storchaka May 30, 2024
deda857
Docs: `shutil.rmtree`'s `onerror` has no pending removal version (#11…
hugovk May 30, 2024
ef01e95
gh-109218: Deprecate weird cases in the complex() constructor (GH-119…
serhiy-storchaka May 30, 2024
9732ed5
gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322)
DBJim May 30, 2024
13a5fdc
gh-119744: move a few functions from compile.c to flowgraph.c (#119745)
iritkatriel May 30, 2024
0d07182
gh-111201: Support pyrepl on Windows (#119559)
DinoV May 31, 2024
010aaa3
gh-97747: Improvements to WASM browser REPL. (#97665)
katharosada May 31, 2024
b278c72
gh-119780: Adjust exception messages in Lib/test/test_format.py (GH-1…
skirpichev May 31, 2024
94e9585
gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-…
chrstphrchvz May 31, 2024
dae0375
gh-111201: Improve pyrepl auto indentation (#119606)
wiggin15 May 31, 2024
b9965ef
gh-119189: Fix the power operator for Fraction (GH-119242)
zitterbewegung May 31, 2024
0e8d35b
gh-116145: Updated bundled Tcl/Tk on Windows to 8.6.14 (GH-117030)
zooba May 31, 2024
4c387a7
gh-111201: [pyrepl] Ensure optional platform-specific imports are opt…
ambv May 31, 2024
91601a5
gh-111201: Skip pyrepl Windows tests earlier (#119848)
vstinner May 31, 2024
891c1e3
gh-119853: Add Include/refcount.h file (#119854)
vstinner May 31, 2024
bcc1be3
gh-119585: Fix crash involving `PyGILState_Release()` and `PyThreadSt…
colesbury May 31, 2024
64ff1e2
gh-119770: Make termios ioctl() constants positive (#119840)
vstinner May 31, 2024
078b8c8
gh-119369: Fix deadlock during thread exit in free-threaded build (#1…
colesbury May 31, 2024
015b1fd
gh-100117: Fix inaccuracy in documentation of the CodeObject's co_pos…
iritkatriel May 31, 2024
f3fc800
contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119867)
zware May 31, 2024
9bc6045
doc: Add glossary entry for "free threading" (#119865)
colesbury May 31, 2024
879d43b
gh-119799: Add missing `_Py_IncRefTotal` to `_Py_NewRefWithLock` (#11…
colesbury May 31, 2024
f9d47fe
gh-119853: Add Include/refcount.h to projects (#119860)
vstinner May 31, 2024
2237946
gh-118894: Make asyncio REPL use pyrepl (GH-119433)
ambv May 31, 2024
80a4e38
gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#11…
JelleZijlstra May 31, 2024
d28afd3
gh-119180: Lazily wrap annotations on classmethod and staticmethod (#…
JelleZijlstra May 31, 2024
cc5cd4d
statistics.fmean(): speed-up code path for non-sizeable inputs. (gh-1…
rhettinger May 31, 2024
3859e09
gh-74929: PEP 667 C API documentation (gh-119379)
ncoghlan Jun 1, 2024
2180991
gh-118888: Further PEP 667 docs updates (gh-119893)
ncoghlan Jun 1, 2024
51191db
build(deps-dev): bump types-setuptools from 69.5.0.20240423 to 70.0.0…
dependabot[bot] Jun 1, 2024
5152120
Bump types-psutil from 5.9.5.20240423 to 5.9.5.20240516 in /Tools (#1…
dependabot[bot] Jun 1, 2024
60593b2
gh-117657: Fix TSAN race in free-threaded GC (#119883)
colesbury Jun 1, 2024
90ec19f
gh-117657: Fix TSAN race in QSBR assertion (#119887)
colesbury Jun 1, 2024
ce2ea7d
Minor speed/accuracy improvement for kde() (gh-119910)
rhettinger Jun 1, 2024
cf3bba3
gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to e…
Eclips4 Jun 1, 2024
7dc745d
gh-117657: Add TSAN suppression for `set_discard_entry` (#119908)
colesbury Jun 1, 2024
63111bf
Add unique() recipe to itertools docs (gh-119911)
rhettinger Jun 1, 2024
53b1981
GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (#119808)
barneygale Jun 1, 2024
c618f7d
gh-119016: Remove outdated sentences from the "classes" tutorial (#11…
nineteendo Jun 1, 2024
e378dc1
Refactor (mostly rearrange) the statistics module (gh-119930)
rhettinger Jun 2, 2024
fd6cd62
gh-118934: Fix PyEval_GetLocals docs (PEP 667) (#119932)
ncoghlan Jun 2, 2024
4aed319
gh-119775: Remove ability to create immutable types with mutable base…
sobolevn Jun 2, 2024
f79ffc8
gh-119740: Remove deprecated trunc delegation (#119743)
mdickinson Jun 2, 2024
f3b89a6
gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. (#119921)
colesbury Jun 2, 2024
aa9fe98
Improve documentation for typing.get_type_hints (#119928)
JelleZijlstra Jun 2, 2024
bd6d4ed
GH-119054: Add "Reading and writing files" section to pathlib docs (#…
barneygale Jun 2, 2024
117a8ac
gh-109975: What's New in Python 3.13: fix broken link for `telnetlib`…
TechSolomon Jun 3, 2024
0594a27
gh-117657: Fix data races report by TSAN unicode-hash (gh-119907)
corona10 Jun 3, 2024
8e6321e
gh-119961: Fix test workflow status badge in README (#119962)
wookie184 Jun 3, 2024
3ea9b92
gh-119396: Optimize unicode_decode_utf8_writer() (#119957)
vstinner Jun 3, 2024
52586f9
gh-119506: fix `_io.TextIOWrapper.write()` write during flush (#119507)
chgnrdv Jun 3, 2024
84c3191
gh-118827: Remove `Quoter` from `urllib.parse` (#118828)
sobolevn Jun 3, 2024
1e5f615
gh-116991: Improve `pygen --help` for `python` subparser (#116992)
sobolevn Jun 3, 2024
4223f1d
gh-119856: Support exiting help() with just "exit" (#119858)
vstinner Jun 3, 2024
70934fb
gh-112026: Deprecate _PyDict_GetItemStringWithError() function (#119855)
vstinner Jun 3, 2024
d7fcaa7
gh-119838: Treat Fraction as a real value in mixed arithmetic operati…
serhiy-storchaka Jun 3, 2024
cae4c80
gh-119968: Improved monitoring c-api docs (#119969)
SweetyAngel Jun 3, 2024
367adc9
gh-119786: move exception handling doc to InternalDocs (#119815)
iritkatriel Jun 3, 2024
61d3ab3
gh-116560: Add PyLong_GetSign() public function (#116561)
skirpichev Jun 3, 2024
4765e1f
gh-102511: Amend 3.13.0b1.rst (GH-119895)
nineteendo Jun 3, 2024
fd01271
gh-119679: Ensures correct import libraries are included in Windows i…
zooba Jun 3, 2024
42a34dd
gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (#119591)
jaraco Jun 3, 2024
6acb32f
Use Cirrus M1 macOS runners for CI (GH-119979)
ambv Jun 3, 2024
153b118
gh-119981: Use do while(0) in some symtable.c multi-line macros (#119…
picnixz Jun 3, 2024
1d4c2e4
gh-119057: Use better error messages for zero division (#119066)
sobolevn Jun 3, 2024
4e8aa32
gh-119727: Add --single-process option to regrtest (#119728)
vstinner Jun 3, 2024
2e0aa73
gh-118835: pyrepl: Fix prompt length computation for custom prompts c…
danielhollas Jun 3, 2024
41c1cef
gh-117657: Avoid `sem_clockwait` in TSAN (#119915)
colesbury Jun 3, 2024
b8fde5d
update CODEOWNERS (#120003)
iritkatriel Jun 3, 2024
47fb432
gh-117657: Fix race involving immortalizing objects (#119927)
colesbury Jun 3, 2024
d82a7ba
gh-117398: Add datetime Module State (gh-119810)
ericsnowcurrently Jun 3, 2024
dba7a16
gh-117142: Support Importing ctypes in Isolated Interpreters (gh-119991)
ericsnowcurrently Jun 3, 2024
105f22e
gh-117398: Use Per-Interpreter State for the _datetime Static Types (…
ericsnowcurrently Jun 3, 2024
31a4fb3
gh-119724: Revert "bpo-45759: Better error messages for non-matching …
encukou Jun 4, 2024
8d63c8d
gh-106531: Apply changes from importlib_resources 6.3.2 (#117054)
jaraco Jun 4, 2024
a8f1152
gh-119879: str.find(): Utilize last character gap for two-way periodi…
Jun 4, 2024
5c48eb0
gh-119070: Update test_shebang_executable_extension to always use non…
zooba Jun 4, 2024
26e5c6e
gh-119613: Soft deprecate the Py_MEMCPY() macro (#120020)
vstinner Jun 4, 2024
5a1205b
gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021)
vstinner Jun 4, 2024
9e05261
Fix typos in documentation and comments (#119763)
xyb Jun 4, 2024
dce14bb
gh-118868: logging QueueHandler fix passing of kwargs (GH-118869)
Kaundur Jun 4, 2024
99d945c
gh-119819: Fix regression to allow logging configuration with multipr…
vsajip Jun 4, 2024
bd8c1f9
gh-94808: Reorganize _make_posargs and mark unused code (GH-119227)
mjdominus Jun 4, 2024
e69d068
gh-117657: Fix race involving GC and heap initialization (#119923)
colesbury Jun 4, 2024
ff1857d
gh-120029: export `DEF_TYPE_PARAM` compiler flag (#120028)
picnixz Jun 4, 2024
4dcd91c
gh-119588: Update docs to reflect decision to include the change with…
jaraco Jun 4, 2024
8fc7653
gh-120041: Do not use append_to_screen when completions are visible (…
lysnikolaou Jun 4, 2024
5f03f09
Fix incorrect pull GitHub link in What's New (#120045)
treyhunner Jun 4, 2024
7111d96
gh-89928: Fix integer conversion of device numbers (GH-31794)
serhiy-storchaka Jun 4, 2024
e079935
gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681)
chrstphrchvz Jun 4, 2024
bf8e5e5
gh-120041: Refactor check for visible completion menu in completing_r…
lysnikolaou Jun 4, 2024
d419d46
gh-120039: Reduce expected timeout in test_siginterrupt_off (#120047)
colesbury Jun 4, 2024
010ea93
gh-119553: Clear reader on Ctrl-C command (GH-119801)
lysnikolaou Jun 4, 2024
bf5e106
doc: Mention the missing reflected special methods for all binary ope…
paulofreitas Jun 4, 2024
d909519
gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843)
pablogsal Jun 4, 2024
710cbea
gh-120048: Make `test_imaplib` faster (#120050)
colesbury Jun 4, 2024
109e108
gh-119819: Update test to skip if _multiprocessing is unavailable. (G…
vsajip Jun 4, 2024
4055577
gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount…
colesbury Jun 4, 2024
69b3e8e
gh-119553: Fix console when pressing Ctrl-C within a multiline block …
lysnikolaou Jun 4, 2024
770f3c1
gh-114616: Improve docs regarding changes to caches representation in…
iritkatriel Jun 4, 2024
b6b0dcb
gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library…
shoenot Jun 5, 2024
983efcf
gh-119819: Update logging configuration to support joinable multiproc…
vsajip Jun 5, 2024
5c02ea8
gh-119287: clarify doc on BaseExceptionGroup.derive and link to it fr…
iritkatriel Jun 5, 2024
4bba1c9
gh-120065: Increase `collect_in_thread` period to 5 ms. (#120068)
colesbury Jun 5, 2024
10eac02
gh-119786: add links to code in exception handling doc (#120077)
iritkatriel Jun 5, 2024
14e3c70
gh-115225: Raise error on unsupported ISO 8601 time strings (#119339)
benchatt Jun 5, 2024
e83ce85
pathlib ABCs: remove duplicate `realpath()` implementation. (#119178)
barneygale Jun 5, 2024
f878d46
gh-120128: fix description of argument to ipaddress.collapse_addresse…
zuo Jun 5, 2024
eeb8f67
gh-119786: move adaptive interpreter doc from Python to InternalsDoc …
iritkatriel Jun 6, 2024
fd104df
gh-120111: Don't use cirrus M1 macOS runners on fork (#120116)
nineteendo Jun 6, 2024
cccc9f6
gh-119679: Fix layout of PYD and DLL files on Windows when using PC/l…
zooba Jun 6, 2024
78634cf
gh-120155: Initialize variables in _tkinter.c (#120156)
vstinner Jun 6, 2024
d50a7c4
CODEOWNERS: Add myself to symtable and AST (#120139)
JelleZijlstra Jun 6, 2024
2d7ff6e
Restore decimal context after decimal doctests (GH-120149)
serhiy-storchaka Jun 6, 2024
417bec7
Add Tian Gao to CODEOWNERS and ACKS (GH-120166)
gaogaotiantian Jun 6, 2024
e21057b
gh-117657: Fix TSAN race involving import lock (#118523)
colesbury Jun 6, 2024
5bdc87b
gh-120178: Documentation typo corrections (#120179)
davidlowryduda Jun 6, 2024
14e1506
GH-119054: Add "Reading directories" section to pathlib docs (#119956)
barneygale Jun 6, 2024
6b60652
gh-119577: Adjust DeprecationWarning when testing element truth value…
jacobtylerwalls Jun 7, 2024
5c11556
Add Plausible for docs metrics (#119977)
hugovk Jun 7, 2024
bd826b9
gh-120157: Remove unused code in concurrent.future (gh-120187)
pygeek Jun 7, 2024
57ad769
gh-120080: Accept ``None`` as a valid argument for direct call of the…
Eclips4 Jun 7, 2024
6a97929
Fix typos in comments (#120188)
xyb Jun 7, 2024
47816f4
gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED…
allsey87 Jun 7, 2024
d5ba4fc
gh-120164: Fix test_os.test_win32_mkdir_700() (#120177)
Eclips4 Jun 7, 2024
6646a9d
gh-110383: Clarify "non-integral" wording in pow() docs (#119688)
adiaholic Jun 7, 2024
d68a22e
gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213)
serhiy-storchaka Jun 7, 2024
eca3f77
gh-93691: fix too broad source locations of with-statement instructio…
iritkatriel Jun 7, 2024
225aab7
gh-110383: Improve 'old string formatting' text in tutorial (#120219)
erlend-aasland Jun 7, 2024
9d66042
gh-114264: Optimize performance of copy.deepcopy by adding a fast pat…
eendebakpt Jun 7, 2024
10fb1b8
gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner …
sobolevn Jun 7, 2024
a758424
gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on…
xry111 Jun 7, 2024
90b7540
gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (#12…
vstinner Jun 7, 2024
242c749
GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. …
barneygale Jun 7, 2024
e6076d1
gh-119659: Get the datetime CAPI Tests Running Again (gh-120180)
ericsnowcurrently Jun 7, 2024
4fc82b6
gh-120225: fix crash in compiler on empty block at end of exception h…
iritkatriel Jun 7, 2024
95f4db8
gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime`…
sobolevn Jun 8, 2024
2080425
bpo-37755: Use configured output in pydoc instead of pager (GH-15105)
eht16 Jun 8, 2024
55402d3
gh-119258: Eliminate Type Guards in Tier 2 Optimizer with Watcher (GH…
saulshanabrook Jun 8, 2024
38a25e9
gh-120244: Fix re.sub() reference leak (GH-120245)
neonene Jun 8, 2024
5d59b87
gh-120121: Add InvalidStateError to concurrent.futures.__all__ (#120123)
aisk Jun 8, 2024
7c016de
gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-1…
pygeek Jun 8, 2024
34f5ae6
gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fromtimest…
Eclips4 Jun 8, 2024
0ae8579
gh-119666: fix multiple class-scope comprehensions referencing __clas…
carljm Jun 10, 2024
e5a7bc6
gh-120296: Fix format string of fcntl.ioctl() audit (#120301)
pygeek Jun 10, 2024
4829522
bpo-24766: doc= argument to subclasses of property not handled correc…
embray Jun 10, 2024
b90bd3e
gh-120155: Fix Coverity issue in zoneinfo load_data() (#120232)
vstinner Jun 10, 2024
c3b6dbf
gh-115801: Only allow sequence of strings as input for difflib.unifie…
eendebakpt Jun 10, 2024
56c3815
gh-119786: copy compiler doc from devguide to InternalDocs and conver…
iritkatriel Jun 10, 2024
7aff2de
gh-120057: Add os.environ.refresh() method (#120059)
vstinner Jun 10, 2024
6efe346
Fix the CODEOWNERS for _interpretersmodule.c (gh-120288)
aisk Jun 10, 2024
422c4fc
gh-119600: mock: do not access attributes of original when new_callab…
rbtcollins Jun 11, 2024
9e9ee50
gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.…
blhsing Jun 11, 2024
141baba
gh-120298: Fix use-after-free in `list_richcompare_impl` (#120303)
sobolevn Jun 11, 2024
7d24471
gh-120291: Fix a bashism in python-config.sh.in (#120292)
mgorny Jun 11, 2024
02c1dff
gh-120080: Mark test_round_with_none_arg_direct_call as cpython_only …
Eclips4 Jun 11, 2024
9b8611e
gh-119180: PEP 649 compiler changes (#119361)
JelleZijlstra Jun 11, 2024
ec3af29
gh-120346: Respect PYTHON_BASIC_REPL when running in interactive insp…
pablogsal Jun 11, 2024
32a0fab
gh-119517: Fixes for pasting in pyrepl (#120253)
godlygeek Jun 11, 2024
1b62bce
gh-120343: Do not reset byte_col_offset_diff after multiline tokens (…
lysnikolaou Jun 11, 2024
0335662
Fix typo in ElementTree docs (#120342)
naglis Jun 11, 2024
86a8a1c
gh-118908: Limit exposed globals from internal imports and definition…
eugenetriguba Jun 11, 2024
939c201
gh-120326: Include <intrin.h> on Windows with Free Threading (#120329)
Eclips4 Jun 11, 2024
203565b
gh-120198: Fix race condition when editing __class__ with an audit ho…
Fidget-Spinner Jun 11, 2024
34e4d32
gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL …
pablogsal Jun 11, 2024
f5a9c34
gh-120056: Add `IP_RECVERR`, `IP_RECVORIGDSTADDR`, `IP_RECVTTL` to `s…
sobolevn Jun 12, 2024
19435d2
gh-120385: Fix reference leak in symtable (#120386)
Eclips4 Jun 12, 2024
02e74c3
gh-118908: Fix completions after namespace change in REPL (#120370)
lysnikolaou Jun 12, 2024
7dd8c37
gh-101575: document Decimal.__round__() (GH-101737)
OTheDev Jun 12, 2024
755dab7
gh-120029: make `symtable.Symbol.__repr__` correctly reflect the comp…
picnixz Jun 12, 2024
97b69db
gh-93691: fix too broad source locations of for statement iterators (…
iritkatriel Jun 12, 2024
ce3879b
Fix typos in documentation (#120338)
xyb Jun 12, 2024
e16aed6
gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165)
Fidget-Spinner Jun 12, 2024
32d3e05
gh-120029: remove unused macros in ``symtable.c`` (#120222)
picnixz Jun 12, 2024
4b1e85b
gh-120400 :Support Linux perf profile to see Python calls on RISC-V a…
ixgbe00 Jun 12, 2024
42b25dd
gh-120155: Add assertion to sre.c match_getindex() (#120402)
vstinner Jun 12, 2024
92c9c6a
gh-120345: Fix incorrect use of the :class: role with the "()" suffix…
serhiy-storchaka Jun 12, 2024
fabcf6b
gh-120388: Improve deprecation warning message, when test returns non…
sobolevn Jun 12, 2024
127c1d2
gh-71587: Drop local reference cache to `_strptime` module in `_datet…
neonene Jun 12, 2024
4b5d3e0
gh-120343: Fix column offsets of multiline tokens in tokenize (#120391)
lysnikolaou Jun 12, 2024
4c6d4f5
gh-120417: Remove unused imports in the stdlib (#120420)
vstinner Jun 12, 2024
3453362
gh-118908: Protect the REPL subprocess with a timeout in tests (#120408)
pablogsal Jun 12, 2024
030b452
gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is se…
stefanor Jun 12, 2024
4e34363
Merge branch 'main' into issue_102797
nineteendo Jun 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pythongh-101575: document Decimal.__round__() (pythonGH-101737)
  • Loading branch information
OTheDev authored Jun 12, 2024
commit 7dd8c37a067f9fcb6a2a658d6a93b294cc2e6fb4
42 changes: 42 additions & 0 deletions Doc/library/decimal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,48 @@ Decimal objects
:const:`Rounded`. If given, applies *rounding*; otherwise, uses the
rounding method in either the supplied *context* or the current context.

Decimal numbers can be rounded using the :func:`.round` function:

.. describe:: round(number)
.. describe:: round(number, ndigits)

If *ndigits* is not given or ``None``,
returns the nearest :class:`int` to *number*,
rounding ties to even, and ignoring the rounding mode of the
:class:`Decimal` context. Raises :exc:`OverflowError` if *number* is an
infinity or :exc:`ValueError` if it is a (quiet or signaling) NaN.

If *ndigits* is an :class:`int`, the context's rounding mode is respected
and a :class:`Decimal` representing *number* rounded to the nearest
multiple of ``Decimal('1E-ndigits')`` is returned; in this case,
``round(number, ndigits)`` is equivalent to
``self.quantize(Decimal('1E-ndigits'))``. Returns ``Decimal('NaN')`` if
*number* is a quiet NaN. Raises :class:`InvalidOperation` if *number*
is an infinity, a signaling NaN, or if the length of the coefficient after
the quantize operation would be greater than the current context's
precision. In other words, for the non-corner cases:

* if *ndigits* is positive, return *number* rounded to *ndigits* decimal
places;
* if *ndigits* is zero, return *number* rounded to the nearest integer;
* if *ndigits* is negative, return *number* rounded to the nearest
multiple of ``10**abs(ndigits)``.

For example::

>>> from decimal import Decimal, getcontext, ROUND_DOWN
>>> getcontext().rounding = ROUND_DOWN
>>> round(Decimal('3.75')) # context rounding ignored
4
>>> round(Decimal('3.5')) # round-ties-to-even
4
>>> round(Decimal('3.75'), 0) # uses the context rounding
Decimal('3')
>>> round(Decimal('3.75'), 1)
Decimal('3.7')
>>> round(Decimal('3.75'), -1)
Decimal('0E+1')


.. _logical_operands_label:

Expand Down