https://github.com/python/cpython

sort by:
Revision Author Date Message Commit Date
0cba289 Enable colour for doctest on GitHub Actions (#123536) 31 August 2024, 14:15:44 UTC
5414b97 gh-123309: Remove check for redefined memo entry in pickletools.dis() (GH-123374) Such pickles are supported by the Unpickler even if the Pickler does not produce them. 31 August 2024, 13:21:49 UTC
fc897fc gh-76960: Fix urljoin() and urldefrag() for URIs with empty components (GH-123273) * urljoin() with relative reference "?" sets empty query and removes fragment. * Preserve empty components (authority, params, query, fragment) in urljoin(). * Preserve empty components (authority, params, query) in urldefrag(). Also refactor the code and get rid of double _coerce_args() and _coerce_result() calls in urljoin(), urldefrag(), urlparse() and urlunparse(). 31 August 2024, 09:42:08 UTC
e5a567b gh-123309: Add more tests for the pickletools module (GH-123355) Add tests for genops() and dis(). 31 August 2024, 09:30:05 UTC
5332d98 gh-123407: Enable translating literal and code blocks (#123408) 31 August 2024, 06:31:36 UTC
10bf615 gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011) When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox". https://github.com/python/cpython/issues/108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 31 August 2024, 06:11:57 UTC
74bfb53 gh-121313: Limit the reading size from pipes to their default buffer size on POSIX systems (GH-121315) See https://github.com/python/cpython/issues/121313 for analysis, but this greatly reduces memory overallocation and overhead when multiprocessing is sending non-small data over its pipes between processes. 31 August 2024, 05:57:22 UTC
1ce9e58 Make self turtledemo codeowner (#123524) 31 August 2024, 01:59:12 UTC
6bfbfc6 gh-121404: rearrange code in compile.c so that codegen functions come first and compiler functions second (#123510) 30 August 2024, 21:54:42 UTC
e451a89 gh-123440: Improve error message for `except as` used with not a name (#123442) 30 August 2024, 16:21:59 UTC
d8e69b2 gh-122854: Add Py_HashBuffer() function (#122855) 30 August 2024, 15:42:27 UTC
3d60dfb gh-121645: Add PyBytes_Join() function (#121646) * Replace _PyBytes_Join() with PyBytes_Join(). * Keep _PyBytes_Join() as an alias to PyBytes_Join(). 30 August 2024, 12:57:33 UTC
7fca268 gh-123484: Fix the debug offsets for PyLongObject (#123485) 30 August 2024, 11:39:28 UTC
103a047 gh-123492: Remove unnecessary `:func:` parentheses (#123493) 30 August 2024, 11:34:09 UTC
8aaf752 gh-123189: [`Modules/blake2module.c`]: Move function definitions and their usage under the macros (#123190) 30 August 2024, 10:28:32 UTC
f8a736b gh-123446: Fix empty function names in `TypeError`s in `typeobject` (#123470) 30 August 2024, 07:36:51 UTC
32c7dbb gh-121485: Always use 64-bit integers for integers bits count (GH-121486) Use 64-bit integers instead of platform specific size_t or Py_ssize_t to represent the number of bits in Python integer. 30 August 2024, 05:13:24 UTC
58ce131 gh-123446: Fix empty function names in `TypeError`s in `_csv` module (#123462) 29 August 2024, 08:12:37 UTC
303f92a gh-123446: Fix empty function names in `TypeError`s in `_csv` module (#123461) 29 August 2024, 06:53:57 UTC
0c3ea30 gh-123431: Harmonize extension code checks in pickle (GH-123434) This checks are redundant in normal circumstances and can only work if the extension registry was intentionally broken. * The Python implementation now raises exception for the extension code with false boolean value. * Simplify the C code. RuntimeError is now raised in explicit checks. * Add many tests. 29 August 2024, 05:26:16 UTC
c9930f5 gh-123448: Move `_PyNoDefault_Type` to the static types array (#123449) 29 August 2024, 01:27:40 UTC
b379f1b gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423) 28 August 2024, 20:36:42 UTC
61bef62 gh-123142: fix too wide source location of GET_ITER/GET_AITER (#123420) 28 August 2024, 16:11:52 UTC
40fff90 gh-101860: document `property.__name__` (GH-123399) 28 August 2024, 14:10:13 UTC
be083ce gh-123344: Add missing ast optimizations for PEP 696 (#123377) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 28 August 2024, 13:38:56 UTC
9e108b8 Fix typos in docs, error messages and comments (#123336) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> 28 August 2024, 11:41:04 UTC
4c6dca8 gh-120389: Add PyLong_FromInt64() and PyLong_AsInt64() (#120390) Add new functions to convert C <stdint.h> numbers from/to Python int: * PyLong_FromInt32() * PyLong_FromUInt32() * PyLong_FromInt64() * PyLong_FromUInt64() * PyLong_AsInt32() * PyLong_AsUInt32() * PyLong_AsInt64() * PyLong_AsUInt64() 28 August 2024, 10:16:13 UTC
1a0b828 gh-122561: Clean up and microoptimize str.translate and charmap codec (GH-122932) * Replace PyLong_AS_LONG() with PyLong_AsLong(). * Call PyLong_AsLong() only once per the replacement code. * Use PyMapping_GetOptionalItem() instead of PyObject_GetItem(). 28 August 2024, 09:11:13 UTC
6f563e3 gh-123254: Improve `tuple` C API docs with more info about errors (#123255) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> 28 August 2024, 07:30:21 UTC
6a7765b gh-123363: Show string value of CONTAINS_OP oparg in dis (#123387) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> 28 August 2024, 06:15:34 UTC
2231286 gh-123270: Replaced SanitizedNames with a more surgical fix. (#123354) Applies changes from zipp 3.20.1 and jaraco/zipp#124 27 August 2024, 21:10:30 UTC
7e38e67 gh-123271: Make builtin zip method safe under free-threading (#123272) The `zip_next` function uses a common optimization technique for methods that generate tuples. The iterator maintains an internal reference to the returned tuple. When the method is called again, it checks if the internal tuple's reference count is 1. If so, the tuple can be reused. However, this approach is not safe under the free-threading build: after checking the reference count, another thread may perform the same check and also reuse the tuple. This can result in a double decref on the items of the replaced tuple and a double incref (memory leak) on the items of the tuple being set. This adds a function, `_PyObject_IsUniquelyReferenced` that encapsulates the stricter logic necessary for the free-threaded build: the internal tuple must be owned by the current thread, have a local refcount of one, and a shared refcount of zero. 27 August 2024, 19:22:43 UTC
d24d1c9 gh-121404: split compiler_nameop into a codegen part and a compiler part (#123398) 27 August 2024, 15:57:31 UTC
08c0166 gh-109975: Fix a typo in What's New in Python 3.13 (#123393) 27 August 2024, 14:53:45 UTC
f49a916 GH-117759: Document incremental GC (GH-123266) * Update what's new * Update gc module docs and fix inconsistency in gc.get_objects 27 August 2024, 14:23:39 UTC
460ee5b gH-80788: remove old weakset workaround for thread safety (#123388) 27 August 2024, 13:42:44 UTC
03f5abf gh-123089: Make weakref.WeakSet safe against concurrent mutations while it is being iterated (#123279) * Make `weakref.WeakSet` safe against concurrent mutations while it is being iterated. `_IterationGuard` is no longer used for `WeakSet`, it now relies on copying the underlying set which is an atomic operation while iterating so that it can be modified by other threads. 27 August 2024, 13:04:03 UTC
6754566 gh-120426: Reword the glossary term "immortal" (GH-123191) Reword the glossary term "immortal", mark it as an implementation detail 27 August 2024, 11:37:56 UTC
da43026 gh-121404: compiler_visit_* --> codegen_visit_* (#123382) 27 August 2024, 11:32:24 UTC
54a05a4 GH-123232: Factor BINARY_SLICE and STORE_SLICE to handle stats properly for tier 2. (GH-123381) 27 August 2024, 09:49:39 UTC
89328f7 GH-115775: Use `__static_attributes__` to initialize shared keys (GH-118468) 27 August 2024, 09:34:46 UTC
fe85a82 Further revise idlelib/Icons/README.text (#123364) In particular, add trademark derivative approval information. 26 August 2024, 21:44:35 UTC
9f9b00d gh-122666: Tests for ast optimizations (#122667) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 26 August 2024, 19:27:22 UTC
1eed0f9 gh-123340: Show string value of `IS_OP` oparg in `dis` (#123348) 26 August 2024, 18:59:50 UTC
7bd6ebf GH-73991: Prune `pathlib.Path.copy()` and `copy_into()` arguments (#123337) Remove *ignore* and *on_error* arguments from `pathlib.Path.copy[_into]()`, because these arguments are under-designed. Specifically: - *ignore* is appropriated from `shutil.copytree()`, but it's not clear how it should apply when the user copies a non-directory. We've changed the callback signature from the `shutil` version, but I'm not confident the new signature is as good as it can be. - *on_error* is a generalisation of `shutil.copytree()`'s error handling, which is to accumulate exceptions and raise a single `shutil.Error` at the end. It's not obvious which solution is better. Additionally, this arguments may be challenging to implement in future user subclasses of `PathBase`, which might utilise a native recursive copying method. 26 August 2024, 16:05:34 UTC
033d537 GH-73991: Make `pathlib.Path.delete()` private. (#123315) Per feedback from Paul Moore on GH-123158, it's better to defer making `Path.delete()` public than ship it with under-designed error handling capabilities. We leave a remnant `_delete()` method, which is used by `move()`. Any functionality not needed by `move()` is deleted. 26 August 2024, 15:26:34 UTC
a1ddaae gh-111495: Remove test_capi test_rshift_print() (#123338) The suggestion for "print >> value" was removed recently: commit 9375b9ca3a4998678ba74ff5c77ed540a4dcf887. 26 August 2024, 14:39:32 UTC
2f20f5a gh-111495: Add tests for PyNumber C API (#111996) 26 August 2024, 13:59:22 UTC
c68a93c GH-73991: Add `pathlib.Path.copy_into()` and `move_into()` (#123314) These two methods accept an *existing* directory path, onto which we join the source path's base name to form the final target path. A possible alternative implementation is to check for directories in `copy()` and `move()` and adjust the target path, which is done in several `shutil` functions. This behaviour is helpful in a shell context, but less so in a stored program that explicitly specifies destinations. For example, a user that calls `Path('foo.py').copy('bar.py')` might not imagine that `bar.py/foo.py` would be created, but under the alternative implementation this will happen if `bar.py` is an existing directory. 26 August 2024, 13:14:23 UTC
dbc1752 gh-111495: Add tests for PyTuple C API (#118757) Co-authored-by: kalyanr <kalyan.ben10@live.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> 26 August 2024, 09:57:52 UTC
6401cdf Rewrite idlelib/Icons/README.txt (#123329) 26 August 2024, 02:11:59 UTC
602fcf9 gh-123177: Fix prompt for wrapped lines in pyrepl (#123324) When display lines above the cursor come from the cache, the first line to not come from the cache may be a wrapped line, starting half way through a logical line in the buffer. Detect and handle this case to avoid accidentally drawing a stray prompt in the middle of a logical line. 25 August 2024, 22:54:06 UTC
70bfef5 gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (#123286) 25 August 2024, 22:50:43 UTC
fdb3f9b gh-123177: Deactivate line wrap for Apple Terminal via scape codes in the new REPL (#123267) 25 August 2024, 21:38:49 UTC
c535a49 gh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (#123298) 25 August 2024, 20:01:58 UTC
249b083 gh-122982: Extend the deprecation period for bool inversion by two years (#123306) 25 August 2024, 19:24:44 UTC
625d070 GH-73991: Add `pathlib.Path.move()` (#122073) Add a `Path.move()` method that moves a file or directory tree, and returns a new `Path` instance pointing to the target. This method is similar to `shutil.move()`, except that it doesn't accept a *copy_function* argument, and it doesn't check whether the destination is an existing directory. 25 August 2024, 15:51:51 UTC
aa90592 gh-123228: don't leak file descriptors in pyrepl test (#123302) 25 August 2024, 14:52:51 UTC
74ff496 GH-109975: Copyedit 3.13 What's New: Optimizations (#123301) 25 August 2024, 13:17:46 UTC
9b37498 GH-123299: Move ctypes What's New entry to 3.14 (#123300) 25 August 2024, 00:41:44 UTC
52caaef Revert "GH-120754: Add a strace helper and test set of syscalls for o… (#123303) Revert "GH-120754: Add a strace helper and test set of syscalls for open().read() (#121143)" This reverts commit e38d0afe3548b856ccf0b05c01ed3eefc69cb3e7. 24 August 2024, 21:54:31 UTC
e38d0af GH-120754: Add a strace helper and test set of syscalls for open().read() (#121143) 24 August 2024, 20:42:41 UTC
86f06cb Remove comment from pystate created in 2003 (#123259) 24 August 2024, 20:36:42 UTC
ca18ff2 gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (#123281) Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> 24 August 2024, 15:46:05 UTC
c4ee4e7 GH-122890: Fix low-level error handling in `pathlib.Path.copy()` (#122897) Give unique names to our low-level FD copying functions, and try each one in turn. Handle errors appropriately for each implementation: - `fcntl.FICLONE`: suppress `EBADF`, `EOPNOTSUPP`, `ETXTBSY`, `EXDEV` - `posix._fcopyfile`: suppress `EBADF`, `ENOTSUP` - `os.copy_file_range`: suppress `ETXTBSY`, `EXDEV` - `os.sendfile`: suppress `ENOTSOCK` 24 August 2024, 14:11:39 UTC
127660b GH-109975: Copyedit 3.13 What's New: Improved Modules (#123132) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> 24 August 2024, 13:32:35 UTC
b178bee Docs: Fix Makefile syntax (#123287) 24 August 2024, 12:57:38 UTC
5ff638f gh-123243: Fix reference leak in `_decimal` (#123244) 24 August 2024, 04:07:01 UTC
556e855 gh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975) `Py_DECREF` and `PyStackRef_CLOSE` are now implemented as macros in the free-threaded build in ceval.c. There are two motivations; * MSVC has problems inlining functions in ceval.c in the PGO build. * We will want to mark escaping calls in order to spill the stack pointer in ceval.c and we will want to do this around `_Py_Dealloc` (or `_Py_MergeZeroLocalRefcount` or `_Py_DecRefShared`), not around the entire `Py_DECREF` or `PyStackRef_CLOSE` call. 23 August 2024, 19:36:14 UTC
67f2c84 gh-123205: `Python/bytecodes.c`: Fix compiler warning (#123206) Fix MSVC warning "conversion from '__int64' to 'int'" 23 August 2024, 19:35:25 UTC
d7ae4dc GH-73991: Disallow copying directory into itself via `pathlib.Path.copy()` (#122924) 23 August 2024, 19:03:11 UTC
bf1b5d3 gh-121404: more compiler_* -> codegen_*, class_body and comprehensions (#123262) 23 August 2024, 18:53:15 UTC
58fdb16 Fix typo mentioning threads instead of tasks (#123203) 23 August 2024, 16:24:12 UTC
126910e gh-122272: Guarantee specifiers %F and %C for datetime.strftime to be 0-padded (GH-122436) 23 August 2024, 15:45:03 UTC
7cd3aa4 GH-122298: Restore printing of GC stats (GH-123261) 23 August 2024, 15:39:08 UTC
adc5190 gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (#123263) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> 23 August 2024, 12:33:45 UTC
0b0f7be GH-123232: Fix "not specialized" stats (GH-123236) 23 August 2024, 09:46:03 UTC
5fce482 gh-121404: compiler_annassign --> codegen_annassign (#123245) 23 August 2024, 09:39:42 UTC
5d3201f GH-123040: Specialize shadowed `LOAD_ATTR`. (GH-123219) 23 August 2024, 09:22:35 UTC
90b6d0e gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions (GH-123214) 23 August 2024, 09:12:58 UTC
a64aa47 GH-99108: Amend Modules/Setup (#123146) 23 August 2024, 06:40:31 UTC
4c3f0cb gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233) 22 August 2024, 23:25:33 UTC
297f2e0 gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092) 22 August 2024, 14:49:09 UTC
4abc1c1 gh-121404: remove redundant c_nestlevel. more compiler abstractions. more macro usage consistency (#123225) 22 August 2024, 14:08:16 UTC
31acc4d gh-123165: correct tests for `dis.dis(func, show_positions=True)` (#123220) 22 August 2024, 13:30:31 UTC
a3d8c05 GH-123197: Only count an instruction as deferred if it hasn't deopted first. (GH-123222) Only count an instruction as deferred if hasn't deopted first. 22 August 2024, 13:17:10 UTC
3d7b1a5 gh-122546: use same filename for different exceptions in new repl (#123217) * gh-122546: use same filename for different exceptions in new repl * +1 22 August 2024, 11:55:30 UTC
427b106 GH-118093: Specialize calls to non-vectorcall classes as `CALL_NON_PY_GENERAL` (GH-123212) Specialize classes without vectorcall as CALL_NON_PY_GENERAL 22 August 2024, 10:50:55 UTC
79ddf75 gh-122712: Test `CALL_ALLOC_AND_ENTER_INIT` handles reassignment of `__code__` (GH-122713) 22 August 2024, 07:38:04 UTC
ec89620 gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (#123173) 21 August 2024, 18:12:05 UTC
a4fd7aa GH-115776: Allow any fixed sized object to have inline values (GH-123192) 21 August 2024, 14:52:04 UTC
4b7c488 gh-121404: split fblock handling into compiler_* and codegen_* parts (#123199) 21 August 2024, 14:48:56 UTC
b1d3bd2 gh-123165: make `dis` functions render positions on demand (#123168) 21 August 2024, 13:46:24 UTC
94036e4 Fix typos in comments (#123201) 21 August 2024, 12:49:23 UTC
7b26c4d GH-123197: Increment correct stat for CALL_KW (GH-123200) 21 August 2024, 11:52:28 UTC
1eba8ba GH-123185: Check for `NULL` after calling `_PyEvalFramePushAndInit` (GH-123194) 21 August 2024, 11:44:56 UTC
90c892e gh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit() (GH-123179) 21 August 2024, 07:17:38 UTC
9dbd123 gh-123084: Turn `shutil.ExecError` into a deprecated alias of `RuntimeError` (#123125) 21 August 2024, 00:39:24 UTC
f88c14d gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001) Look up __firstlineno__ only in the class' dict, without searching in base classes. 20 August 2024, 17:10:15 UTC
bb1d303 GH-118093: Make `CALL_ALLOC_AND_ENTER_INIT` suitable for tier 2. (GH-123140) * Convert CALL_ALLOC_AND_ENTER_INIT to micro-ops such that tier 2 supports it * Allow inexact arguments for CALL_ALLOC_AND_ENTER_INIT. 20 August 2024, 15:52:58 UTC
back to top