https://github.com/python/cpython

sort by:
Revision Author Date Message Commit Date
f97f25e gh-76511: Fix email.Message.as_string() for non-ASCII message with ASCII charset (GH-116125) 05 March 2024, 15:49:01 UTC
df59401 Fix the PyGetSetDef documentation (GH-116056) closure is not a function pointer, it is a user data pointer. 05 March 2024, 15:48:20 UTC
0064dfa gh-115777: Fix double versionadded directives (GH-116269) 05 March 2024, 15:41:53 UTC
23db9c6 GH-115685: Split `_TO_BOOL_ALWAYS_TRUE` into micro-ops (GH-116352) 05 March 2024, 15:23:08 UTC
0c81ce1 GH-115819: Eliminate Boolean guards when value is known (GH-116355) 05 March 2024, 15:06:00 UTC
c91bdf8 gh-116326: Handler errors correctly in `getwindowsversion` in `sysmodule` (#116339) 05 March 2024, 12:31:04 UTC
cbf3d38 GH-115685: Optimize `TO_BOOL` and variants based on truthiness of input. (GH-116311) 05 March 2024, 11:23:46 UTC
a29998a gh-116325: Raise `SyntaxError` rather than `IndexError` on ForwardRef with empty string arg (#116341) 05 March 2024, 09:14:18 UTC
ffcc450 gh-112075: Enable freeing with qsbr and fallback to lock on key changed (GH-116336) 05 March 2024, 09:08:18 UTC
7af063d GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (#116327) * GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives * Add the configure changes * Update `wasm_build.py` 05 March 2024, 08:18:53 UTC
6cddc73 gh-112087: Make list_{slice, ass_slice, subscript} to be threadsafe (gh-116233) 05 March 2024, 04:58:14 UTC
58c7919 gh-116029: Fix unused function warning on macOS (#116340) 05 March 2024, 03:06:21 UTC
88b5c66 gh-116265: Remove obsolete sentence. (#116284) Remove sentence in Tools/c-analyzer/README referring to deleted ignore-globals.txt. 04 March 2024, 21:49:42 UTC
eb22e2b gh-115490: Make the interpreter.channels and interpreter.queues Modules Handle Reloading Properly (gh-115493) The problem manifested when the .py module got reloaded and the corresponding extension module didn't. The .py module registers types with the extension and the extension was not allowing that to happen more than once. The solution: let it happen more than once. 04 March 2024, 20:59:30 UTC
207030f gh-115320: Refactor `get_hash_info` in `sysmodule.c` not to swallow errors (#115321) 04 March 2024, 20:03:59 UTC
01440d3 gh-76785: Simplify Channels XID Types (gh-116318) I had added an extra cleanup abstraction a while back that has turned out to be unnecessary. 04 March 2024, 19:32:39 UTC
ffed8d9 GH-116134: JIT aarch64-pc-windows-msvc (GH-116130) 04 March 2024, 18:16:56 UTC
981f27d GH-115802: Don't JIT zero-length jumps (GH-116177) 04 March 2024, 18:13:10 UTC
8a84eb7 gh-116316: Fix typo in `UNARY_FUNC(PyNumber_Positive)` macros (GH-116317) 04 March 2024, 17:57:01 UTC
60743a9 gh-57141: Add dircmp shallow option (GH-109499) Co-authored-by: Steve Ward <planet36@gmail.com> Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com> 04 March 2024, 17:27:43 UTC
ea1b1c5 gh-108562: Revert enabling -fstrict-overflow for libmpdec (GH-116302) gh-108562: partial reversion of pr114751 Reverts -fstrict-overflow for libmpdec 04 March 2024, 17:07:24 UTC
9b9e819 gh-116116: Backport blake2 change to fix building with clang-cl on windows-i686 (GH-116117) 04 March 2024, 16:59:57 UTC
0adfa84 gh-115832: Fix instrumentation version mismatch during interpreter shutdown (#115856) A previous commit introduced a bug to `interpreter_clear()`: it set `interp->ceval.instrumentation_version` to 0, without making the corresponding change to `tstate->eval_breaker` (which holds a thread-local copy of the version). After this happens, Python code can still run due to object finalizers during a GC, and the version check in bytecodes.c will see a different result than the one in instrumentation.c causing an infinite loop. The fix itself is straightforward: clear `tstate->eval_breaker` when clearing `interp->ceval.instrumentation_version`. 04 March 2024, 16:29:39 UTC
15dc297 Consistently spell out *predicate* instead of *pred*. (gh-116308) 04 March 2024, 15:51:29 UTC
0dfa7ce gh-115256: Remove refcycles from tarfile writing (GH-115257) 04 March 2024, 13:26:32 UTC
cfbdce7 gh-114258: Argument Clinic: refactor getset implementation (#116170) * Move param guard to param state machine * Override return converter during parsing * Don't use a custom type slot return converter; instead special case type slot functions during generation. 04 March 2024, 12:51:28 UTC
45a9243 GH-116271 Docs: provide clarification for object assignments in the Tutorial section (#116283) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> 04 March 2024, 12:22:13 UTC
eda2963 gh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled addition (GH-116301) * Increment PyExpat_CAPI_MAGIC due to SetReparseDeferralEnabled addition. This is a followup to git commit 6a95676bb526261434dd068d6c49927c44d24a9b from Github PR #115623. * RESTify news API list. 04 March 2024, 10:36:27 UTC
17c4849 gh-116296: Fix refleak in reduce_newobj() corner case (#116297) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com> 04 March 2024, 09:46:18 UTC
1dce007 pathlib ABCs: follow all symlinks in `PathBase.glob()` (#116293) Switch the default value of *follow_symlinks* from `None` to `True` in `pathlib._abc.PathBase.glob()` and `rglob()`. This speeds up recursive globbing. No change to the public pathlib classes. 04 March 2024, 02:26:33 UTC
3383d6a gh-116010: Remove link to deprecated PEP 6 in FAQ guide (#116246) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> 03 March 2024, 19:50:18 UTC
4859ecb gh-116281: Remove wrong '\' from '\*' in some doc signatures (#116282) 03 March 2024, 19:32:32 UTC
4d3ee77 Docs: update using/configure.rst (#116274) 03 March 2024, 15:40:02 UTC
87faec2 gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() (GH-115812) Improve algorithm for computing which rolled-over log files to delete in logging.TimedRotatingFileHandler. It is now reliable for handlers without namer and with arbitrary deterministic namer that leaves the datetime part in the file name unmodified. 03 March 2024, 07:42:08 UTC
002a594 gh-108562: Fix compiler warnings for libmpdec (#114751) If awailable, enable -fstrict-overflow for libmpdec. Also shut off false positive warnings (-Warray-bounds). The later was backported from mpdecimal-4.0.0. 03 March 2024, 07:25:39 UTC
67f742e gh-72971: Clarify the special no-TypeError behavior for equality (#110729) 03 March 2024, 00:45:48 UTC
d1fd060 gh-115103: Update gc.collect to process delayed objects (gh-116251) * Revert "gh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (gh-116238)" This reverts commit 2e91578a76d38fa8895fce95e2661618c3de892c. * gh-115103: Update gc.collect to process delayed objects 02 March 2024, 22:04:29 UTC
2e91578 gh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (gh-116238) 02 March 2024, 21:44:16 UTC
140d9ec gh-85644: webbrowser: Use $XDG_CURRENT_DESKTOP to check desktop (GH-21731) Usage of $GNOME_DESKTOP_SESSION_ID env variable is deprecated since GNOME 3.30.0 [1], so should not be used, while the standard XDG_CURRENT_DESKTOP should be instead preferred. [1] https://gitlab.gnome.org/GNOME/gnome-session/-/commit/00e0e6226371d53f65 02 March 2024, 12:48:24 UTC
5dc8c84 GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228) Wasmtime doesn't implement these functions in a way to pass test_posix (https://github.com/bytecodealliance/wasmtime/issues/7830). 02 March 2024, 00:52:12 UTC
cad3745 gh-116102: Silence a Compiler Warning in _xxinterpqueues (gh-116230) 02 March 2024, 00:28:05 UTC
fb5e034 gh-112087: Use QSBR technique for list_new/clear for free-thread build (gh-115875) 01 March 2024, 23:30:35 UTC
90a1e98 GH-116226: include `pthread_stubs.h` in `pycore_pythreads.h` (#116227) 01 March 2024, 23:22:31 UTC
9e88173 gh-114271: Make `_thread.ThreadHandle` thread-safe in free-threaded builds (GH-115190) Make `_thread.ThreadHandle` thread-safe in free-threaded builds We protect the mutable state of `ThreadHandle` using a `_PyOnceFlag`. Concurrent operations (i.e. `join` or `detach`) on `ThreadHandle` block until it is their turn to execute or an earlier operation succeeds. Once an operation has been applied successfully all future operations complete immediately. The `join()` method is now idempotent. It may be called multiple times but the underlying OS thread will only be joined once. After `join()` succeeds, any future calls to `join()` will succeed immediately. The internal thread handle `detach()` method has been removed. 01 March 2024, 21:43:12 UTC
5e0c7bc gh-115941: fixes in dictobject.c doc block(#116196) 01 March 2024, 19:48:26 UTC
ff96b81 gh-115480: Type propagate _BINARY_OP_ADD_UNICODE (GH-115710) 01 March 2024, 19:40:04 UTC
b5949ea gh-84995: Run sys.__interactivehook__() on asyncio REPL startup (#20517) This makes the asyncio REPL (`python -m asyncio`) more usable and similar to the regular REPL. This exposes register_readline() as a top-level function in site.py, but it's intentionally undocumented. Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Itamar Oren <itamarost@gmail.com> 01 March 2024, 19:39:16 UTC
e6e3532 gh-115773: Add missing preprocessor guard in _testexternalinspection (#116212) Add missing preprocessor guard in _testexternalinspection 01 March 2024, 17:50:48 UTC
cc6f807 gh-116171: Argument Clinic: disallow overriding return converter for __init__ methods (#116172) 01 March 2024, 17:41:20 UTC
41baa03 gh-115806: Don't mangle output of configure 'ipv6 stack type' check (#116165) 01 March 2024, 17:38:32 UTC
dac8ff4 gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915) 01 March 2024, 17:25:14 UTC
05b0490 gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187) This mostly restores information removed in c12240ed28aac6494750e00143bc550c4d6d8ad1 (GH-114749). 01 March 2024, 17:16:29 UTC
936d461 gh-76785: Fix interpreters.Queue.get_nowait() (gh-116166) I missed this change in gh-115566. 01 March 2024, 16:36:35 UTC
a7549b0 gh-112281: Allow `Union` with unhashable `Annotated` metadata (#112283) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 01 March 2024, 16:19:24 UTC
2713c2a gh-104219: Document that idunders can return NotImplemented (#104220) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 01 March 2024, 15:51:47 UTC
fee86fd gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) * Do not overwrite already rolled over files. It happened at midnight or during the DST change and caused the loss of data. * computeRollover() now always return the timestamp larger than the specified time. * Fix computation of the rollover time during the DST change. 01 March 2024, 15:50:08 UTC
9b7f253 gh-115554: Improved logic for handling multiple existing py.exe launcher installs (GH-115793) 01 March 2024, 12:58:27 UTC
59167c9 gh-101293: Fix support of custom callables and types in inspect.Signature.from_callable() (GH-115530) Support callables with the __call__() method and types with __new__() and __init__() methods set to class methods, static methods, bound methods, partial functions, and other types of methods and descriptors. Add tests for numerous types of callables and descriptors. 01 March 2024, 11:32:16 UTC
8ab6c27 build(deps-dev): bump types-setuptools from 69.0.0.20240125 to 69.1.0.20240301 in /Tools (#116190) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 01 March 2024, 11:08:46 UTC
4a63098 gh-116159: argparse: performance improvement parsing large number of options (#116162) When parsing positional vs optional arguments, the use of min with a list comprehension inside of a loop results in quadratic time based on the number of optional arguments given. When combined with use of prefix based argument files and a large number of optional flags, this can result in extremely slow parsing behavior. This replaces the min call with a simple loop with a short circuit to break at the next optional argument. Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com> 01 March 2024, 10:52:53 UTC
7b47943 build(deps): bump hypothesis from 6.97.4 to 6.98.15 in /Tools (#116189) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 01 March 2024, 10:27:35 UTC
19e16ce build(deps-dev): bump types-psutil from 5.9.5.20240106 to 5.9.5.20240205 in /Tools (#116188) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 01 March 2024, 10:24:27 UTC
0704166 gh-65824: Improve the "less" prompt in pydoc (GH-116050) Output the line number, the percentage and the help about how to get help or quit the pager. Inspired by the GNU man. 01 March 2024, 08:03:32 UTC
7895a61 gh-116098: Revert "gh-107674: Improve performance of `sys.settrace` (GH-114986)" (GH-116178) Revert "gh-107674: Improve performance of `sys.settrace` (GH-114986)" This reverts commit 0a61e237009bf6b833e13ac635299ee063377699. 01 March 2024, 06:46:33 UTC
339c8e1 gh-115999: Disable the specializing adaptive interpreter in free-threaded builds (#116013) For now, disable all specialization when the GIL might be disabled. 01 March 2024, 02:53:32 UTC
2e94a66 gh-116099: Fix refcounting bug in `_queueobj_shared()` (gh-116164) This code decrefs `qidobj` twice in some paths. Since `qidobj` isn't used after the first `Py_DECREF()`, remove the others, and replace the `Py_DECREF()` with `Py_CLEAR()` to make it clear that the variable is dead. With this fix, `python -mtest test_interpreters -R 3:3 -mtest_queues` no longer fails with `_Py_NegativeRefcount: Assertion failed: object has negative ref count`. 01 March 2024, 01:02:12 UTC
d7ddd90 gh-115491: Fix Clang compiler warning (#116153) gh-115491: Fix compiler warning on macOS 01 March 2024, 00:02:44 UTC
ca56c3a gh-103092: Add a mutex to make the PRNG state of rotatingtree concurrent-safe (#115301) 29 February 2024, 23:04:16 UTC
6a95676 gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods: - `xml.etree.ElementTree.XMLParser.flush` - `xml.etree.ElementTree.XMLPullParser.flush` - `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled` - `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` - `xml.sax.expatreader.ExpatParser.flush` Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 . ### Notes - Please treat as a security fix related to CVE-2023-52425. Includes code suggested-by: Snild Dolkow <snild@sony.com> and by core dev Serhiy Storchaka. 29 February 2024, 22:52:50 UTC
d01886c gh-115685: Type/values propagate for TO_BOOL in tier 2 (GH-115686) 29 February 2024, 22:13:38 UTC
c04a981 Fix rendering of null character in ast.rst (#116080) 29 February 2024, 22:09:06 UTC
fa1d675 gh-71052: Fix several Android build issues (#115955) This change is part of the work on PEP-738: Adding Android as a supported platform. * Remove the "1.0" suffix from libpython's filename on Android, which would prevent Gradle from packaging it into an app. * Simplify the build command in the Makefile so that libpython always gets given an SONAME with the `-Wl-h` argument, even if the SONAME is identical to the actual filename. * Disable a number of functions on Android which can be compiled and linked against, but always fail at runtime. As a result, the native _multiprocessing module is no longer built for Android. * gh-115390 (bee7bb331) added some pre-determined results to the configure script for things that can't be autodetected when cross-compiling; this change adds Android to these where appropriate. * Add a couple more pre-determined results for Android, and making them cover iOS as well. This means the --enable-ipv6 configure option will no longer be required on either platform. 29 February 2024, 21:58:20 UTC
ccfc042 gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141) 29 February 2024, 21:39:50 UTC
556749c gh-112075: Avoid locking shared keys on every assignment (#116087) 29 February 2024, 21:38:50 UTC
41d5391 gh-71052: Add test exclusions to support running the test suite on Android (#115918) 29 February 2024, 21:32:50 UTC
83c5ecd gh-108051: Update versions found by find_python.bat and clarify readme (GH-116118) 29 February 2024, 21:24:05 UTC
91c3c64 gh-73580: Docs for tunnelling TLS through TLS (GH-22539) 29 February 2024, 20:56:04 UTC
dbe44f1 Docs: mark up NotImplemented using the :data: role throughout the docs (#116135) 29 February 2024, 20:46:12 UTC
0656509 gh-116088: Insert bottom checks after all sym_set_...() calls (#116089) This changes the `sym_set_...()` functions to return a `bool` which is `false` when the symbol is `bottom` after the operation. All calls to such functions now check this result and go to `hit_bottom`, a special error label that prints a different message and then reports that it wasn't able to optimize the trace. No executor will be produced in this case. 29 February 2024, 18:55:29 UTC
3b6f4ca gh-115811: Update documentation to add some Logger attributes. (GH-116109) 29 February 2024, 18:53:19 UTC
04d1000 gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) 29 February 2024, 18:37:31 UTC
a81d950 Make the iter_except() recipe more compact. (gh-116132) Only one example is needed 29 February 2024, 17:30:18 UTC
f0df35e GH-115802: JIT "small" code for Windows (GH-115964) 29 February 2024, 16:11:28 UTC
45d8871 gh-112844: Add SBOM for external dependencies (#115789) 29 February 2024, 15:38:04 UTC
6a86030 gh-116100: Add `test` arg to `ast.If` and `op` arg to `ast.BoolOp` calls (#116101) 29 February 2024, 14:59:24 UTC
bea2795 gh-115881: Document feature_version limitations (#115980) 29 February 2024, 11:09:09 UTC
186fa93 gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105) gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error 29 February 2024, 10:40:18 UTC
fb2e17b gh-115937: Remove implementation details from inspect.signature() docs (#116086) Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 29 February 2024, 09:42:28 UTC
86e5e06 gh-115816: Generate calls to sym_new_const() etc. without _Py_uop prefix (#116077) This was left behind by GH-115987. Basically a lot of diffs like this: ``` - res = _Py_uop_sym_new_unknown(ctx); + res = sym_new_unknown(ctx); ``` 29 February 2024, 00:05:53 UTC
479ac5c gh-115859: Fix test_type_inconsistency() when run multiple times (#116079) This should fix the refleaks bots. (See https://github.com/python/cpython/pull/116062#issuecomment-1970038174 .) 28 February 2024, 23:56:58 UTC
3ea78fd gh-115821: [Enum] better error message for calling super().__new__() (GH-116063) docs now state to not call super().__new__ if super().__new__ is called, a better error message is now used 28 February 2024, 23:17:49 UTC
4d1d35b gh-116075: Skip test_external_inspection on qemu in JIT CI (#116076) 28 February 2024, 23:16:01 UTC
f484a2a Update an out-of-date example in the itertools recipe intro (gh-116082) 28 February 2024, 23:11:05 UTC
e80abd5 gh-76785: Update test.support.interpreters to Align With PEP 734 (gh-115566) This brings the code under test.support.interpreters, and the corresponding extension modules, in line with recent updates to PEP 734. (Note: PEP 734 has not been accepted at this time. However, we are using an internal copy of the implementation in the test suite to exercise the existing subinterpreters feature.) 28 February 2024, 23:08:08 UTC
67c19e5 Improve all_equal() recipe (gh-116081) Replace conjuction of next() calls with simpler len()/take() logic. Add key function. 28 February 2024, 23:04:56 UTC
81c7996 gh-112075: Use relaxed stores for places where we may race with when reading lock-free (#115786) 28 February 2024, 22:53:19 UTC
3409bc2 gh-115859: Re-enable T2 optimizer pass by default (#116062) This undoes the *temporary* default disabling of the T2 optimizer pass in gh-115860. - Add a new test that reproduces Brandt's example from gh-115859; it indeed crashes before gh-116028 with PYTHONUOPSOPTIMIZE=1 - Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE - Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable) - Fix skipIf conditions on tests in test_opt.py accordingly - Export sym_is_bottom() (for debugging) - Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter: - DECREF(temp) - out-of-space check after sym_new_const() - add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert 28 February 2024, 22:38:01 UTC
75c6c05 gh-115891: Fix debug byte filling in free-threaded build (#116018) The previous code had two bugs. First, the debug offset in the mimalloc heap includes the two pymalloc debug words, but the pointer passed to fill_mem_debug does not include them. Second, the current object heap is correct source for allocations, but not deallocations. 28 February 2024, 20:50:09 UTC
df5212d gh-112529: Simplify PyObject_GC_IsTracked and PyObject_GC_IsFinalized (#114732) 28 February 2024, 20:37:59 UTC
c43b26d gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210) Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason. Proxy bypass lists are strictly name based. Most implementations of proxy support agree. 28 February 2024, 20:15:52 UTC
back to top