9a388b9 | Joachim Wuttke | 28 March 2024, 13:43:07 UTC | bpo-43848: explain optional argument mtime in gzip.py. (GH-25410) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | 28 March 2024, 13:43:07 UTC |
8dbfdb2 | Sam Gross | 28 March 2024, 13:28:39 UTC | gh-110481: Fix biased reference counting queue initialization. (#117271) The biased reference counting queue must be initialized from the bound (active) thread because it uses `_Py_ThreadId()` as the key in a hash table. | 28 March 2024, 13:28:39 UTC |
9a1e55b | Chris Markiewicz | 28 March 2024, 10:59:31 UTC | gh-117178: Recover lazy loading of self-referential modules (#117179) | 28 March 2024, 10:59:31 UTC |
4c71d51 | Jelle Zijlstra | 28 March 2024, 10:30:31 UTC | gh-117266: Fix crashes on user-created AST subclasses (GH-117276) Fix crashes on user-created AST subclasses | 28 March 2024, 10:30:31 UTC |
8cb7d7f | Gregory P. Smith | 28 March 2024, 10:11:58 UTC | gh-117310: Remove extra DECREF on "no ciphers" error path in `_ssl._SSLContext` constructor (#117309) Remove extra self DECREF on ssl "no ciphers" error path. This doesn't come up in practice because nobody links against a broken OpenSSL library that provides nothing. | 28 March 2024, 10:11:58 UTC |
6c8ac8a | Erlend E. Aasland | 28 March 2024, 08:40:37 UTC | gh-116303: Handle disabled test modules in test.support helpers (#116482) Make sure test.support helpers skip iso. failing if test extension modules are disabled. Also log TEST_MODULES in test.pythoninfo. | 28 March 2024, 08:40:37 UTC |
0f27672 | Russell Keith-Magee | 28 March 2024, 08:13:13 UTC | gh-114099: Add documentation for iOS platform (GH-117057) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org> | 28 March 2024, 08:13:13 UTC |
f006338 | Russell Keith-Magee | 28 March 2024, 07:59:33 UTC | gh-114099: Additions to standard library to support iOS (GH-117052) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org> | 28 March 2024, 07:59:33 UTC |
b448982 | Tim Hatch | 28 March 2024, 06:54:51 UTC | gh-89739: gh-77140: Support zip64 in zipimport (GH-94146) * Reads zip64 files as produced by the zipfile module * Include tests (somewhat slow, however, because of the need to create "large" zips) * About the same amount of strictness reading invalid zip files as zipfile has * Still works on files with prepended data (like pex) There are a lot more test cases at https://github.com/thatch/zipimport64/ that give me confidence that this works for real-world files. Fixes #89739 and #77140. --------- Co-authored-by: Itamar Ostricher <itamarost@gmail.com> Reviewed-by: Gregory P. Smith <greg@krypto.org> | 28 March 2024, 06:54:51 UTC |
2cedd25 | Illia Volochii | 28 March 2024, 06:46:01 UTC | Revert "gh-116886: Temporarily disable CIfuzz (memory) (GH-117018)" (GH-117289) This reverts commit 1ab0d0b1167d78bf19661a3b5e533a2b68a57604. This reverts #117018. I expect the issue to be fixed based on https://github.com/google/oss-fuzz/pull/11708#issuecomment-2006442396 and https://github.com/actions/runner-images/issues/9491. | 28 March 2024, 06:46:01 UTC |
eefff68 | Malcolm Smith | 27 March 2024, 22:11:44 UTC | gh-108277: Make test_os tolerate 10 ms diff for timerfd on Android emulators (#117223) | 27 March 2024, 22:11:44 UTC |
7aa89bc | Victor Stinner | 27 March 2024, 22:10:14 UTC | gh-113317: Change how Argument Clinic lists converters (#116853) * Add a new create_parser_namespace() function for PythonParser to pass objects to executed code. * In run_clinic(), list converters using 'converters' and 'return_converters' dictionarties. * test_clinic: add 'object()' return converter. * Use also create_parser_namespace() in eval_ast_expr(). Co-authored-by: Erlend E. Aasland <erlend@python.org> | 27 March 2024, 22:10:14 UTC |
669ef49 | Seth Michael Larson | 27 March 2024, 21:56:14 UTC | gh-99108: Update and check HACL* version information (GH-117295) * Update and check HACL* version information | 27 March 2024, 21:56:14 UTC |
262fb91 | Irit Katriel | 27 March 2024, 17:38:19 UTC | gh-117288: Allocate fewer label IDs in _PyCfg_ToInstructionSequence (#117290) | 27 March 2024, 17:38:19 UTC |
74c8568 | Malcolm Smith | 27 March 2024, 16:53:27 UTC | gh-71042: Add `platform.android_ver` (#116674) | 27 March 2024, 16:53:27 UTC |
ce00de4 | Hugo van Kemenade | 27 March 2024, 14:46:35 UTC | gh-117225: doctest: only print "and X failed" when non-zero, don't pluralise "1 items" (#117228) | 27 March 2024, 14:46:35 UTC |
92397d5 | Raymond Hettinger | 27 March 2024, 14:04:32 UTC | Add statistics recipe for sampling from an estimated probability density distribution (#117221) | 27 March 2024, 14:04:32 UTC |
b3e8c78 | Tian Gao | 27 March 2024, 01:20:12 UTC | gh-113548: Allow CLI arguments to `pdb -m` (#113557) | 27 March 2024, 01:20:12 UTC |
48c0b05 | Adorilson Bezerra | 26 March 2024, 19:08:08 UTC | Change links on the index page (#117230) | 26 March 2024, 19:08:08 UTC |
af1b0e9 | AN Long | 26 March 2024, 18:26:48 UTC | gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) | 26 March 2024, 18:26:48 UTC |
79be757 | Irit Katriel | 26 March 2024, 15:18:17 UTC | gh-115775: Compiler adds __static_attributes__ field to classes (#115913) | 26 March 2024, 15:18:17 UTC |
70969d5 | Antonio | 26 March 2024, 14:10:29 UTC | gh-97901 add missing text/rtf to mimetypes (GH-97902) Co-authored-by: Noam Cohen <noam@noam.me> | 26 March 2024, 14:10:29 UTC |
4ec3477 | AN Long | 26 March 2024, 14:09:57 UTC | gh-115538: Use isolate mode when running venv test_multiprocessing_recursion() (#117116) Co-authored-by: Victor Stinner <vstinner@python.org> | 26 March 2024, 14:09:57 UTC |
743f2c6 | Hugo van Kemenade | 26 March 2024, 14:09:09 UTC | pre-commit: add `check-case-conflict` and `check-merge-conflict` (#117259) | 26 March 2024, 14:09:09 UTC |
4abca7e | Paulo Neves | 26 March 2024, 12:37:50 UTC | gh-98966: Handle stdout=subprocess.STDOUT (GH-98967) Explicitly handle the case where stdout=STDOUT as otherwise the existing error handling gets confused and reports hard to understand errors. Signed-off-by: Paulo Neves <ptsneves@gmail.com> | 26 March 2024, 12:37:50 UTC |
9654daf | Serhiy Storchaka | 26 March 2024, 11:26:45 UTC | gh-66543: Fix mimetype.guess_type() (GH-117217) Fix parsing of the following corner cases: * URLs with only a host name * URLs containing a fragment * URLs containing a query * filenames with only a UNC sharepoint on Windows Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> | 26 March 2024, 11:26:45 UTC |
8bef34f | Mark Shannon | 26 March 2024, 11:11:42 UTC | GH-117108: Set the "old space bit" to "visited" for all young objects (#117213) Change old space bit of young objects from 0 to gcstate->visited_space. This ensures that any object created *and* collected during cycle GC has the bit set correctly. | 26 March 2024, 11:11:42 UTC |
bf82f77 | Mark Shannon | 26 March 2024, 09:35:11 UTC | GH-116422: Tier2 hot/cold splitting (GH-116813) Splits the "cold" path, deopts and exits, from the "hot" path, reducing the size of most jitted instructions, at the cost of slower exits. | 26 March 2024, 09:35:11 UTC |
61599a4 | Pablo Galindo Salgado | 26 March 2024, 09:30:46 UTC | bpo-24612: Improve syntax error for 'not' after an operator (GH-28170) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> | 26 March 2024, 09:30:46 UTC |
771902c | Hugo van Kemenade | 26 March 2024, 09:13:32 UTC | gh-83845: Add tests for operator module (#115883) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com> | 26 March 2024, 09:13:32 UTC |
ea9a296 | yevgeny hong | 26 March 2024, 07:45:43 UTC | gh-115627: Fix PySSL_SetError handling SSL_ERROR_SYSCALL (GH-115628) Python 3.10 changed from using SSL_write() and SSL_read() to SSL_write_ex() and SSL_read_ex(), but did not update handling of the return value. Change error handling so that the return value is not examined. OSError (not EOF) is now returned when retval is 0. According to *recent* man pages of all functions for which we call PySSL_SetError, (in OpenSSL 3.0 and 1.1.1), their return value should be used to determine whether an error happened (i.e. if PySSL_SetError should be called), but not what kind of error happened (so, PySSL_SetError shouldn't need retval). To get the error, we need to use SSL_get_error. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> | 26 March 2024, 07:45:43 UTC |
d52bdfb | Victor Stinner | 26 March 2024, 07:35:59 UTC | gh-83434: Disable XML in regrtest when -R option is used (#117232) | 26 March 2024, 07:35:59 UTC |
9f74e86 | Sebastian Pipping | 26 March 2024, 01:48:27 UTC | gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix. When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing. * sax|etree: Simplify Expat version guard where simplifiable Idea by Matěj Cepl * sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0 This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix. (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package) | 26 March 2024, 01:48:27 UTC |
872e212 | Jonathan Protzenko | 26 March 2024, 00:35:26 UTC | gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) Pulls in a new update from https://github.com/hacl-star/hacl-star and fixes our C "namespacing" done by `Modules/_hacl/refresh.sh`. | 26 March 2024, 00:35:26 UTC |
8945b7f | Eric V. Smith | 25 March 2024, 23:59:14 UTC | gh-109870: Dataclasses: batch up exec calls (gh-110851) Instead of calling `exec()` once for each function added to a dataclass, only call `exec()` once per dataclass. This can lead to speed improvements of up to 20%. | 25 March 2024, 23:59:14 UTC |
7ebad77 | Raymond Hettinger | 25 March 2024, 23:49:44 UTC | Sync main docs and docstring for median_grouped(). (gh-117214) | 25 March 2024, 23:49:44 UTC |
0821923 | Nice Zombies | 25 March 2024, 22:55:11 UTC | gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115) | 25 March 2024, 22:55:11 UTC |
c227617 | Adorilson Bezerra | 25 March 2024, 22:34:20 UTC | Add information about negative indexes to sequence datamodel doc (#110903) Co-authored by Terry Jan Reedy | 25 March 2024, 22:34:20 UTC |
23e4f80 | Mark Shannon | 25 March 2024, 20:43:51 UTC | A few minor tweaks to get stats working and compiling cleanly. (#117219) Fixes a compilation error when configured with `--enable-pystats`, an array size issue, and an unused variable. | 25 March 2024, 20:43:51 UTC |
507896d | Victor Stinner | 25 March 2024, 16:32:20 UTC | gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937) | 25 March 2024, 16:32:20 UTC |
0c1a42c | Serhiy Storchaka | 25 March 2024, 15:32:11 UTC | gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() (GH-117160) Create a new bytes object and destroy the old one if it has refcount > 1. | 25 March 2024, 15:32:11 UTC |
01e7405 | Tian Gao | 25 March 2024, 15:18:09 UTC | gh-112948: Make pdb completion similar to repl completion (#112950) | 25 March 2024, 15:18:09 UTC |
9db2a8f | Raymond Hettinger | 25 March 2024, 14:26:42 UTC | Minor markup and grammar fixes in the statistics docs (gh-117216) | 25 March 2024, 14:26:42 UTC |
eebea7e | Kirill Podoprigora | 24 March 2024, 18:34:55 UTC | gh-117176: Fix compiler warning in Python/optimizer_bytecodes.c (GH-117199) | 24 March 2024, 18:34:55 UTC |
83485a0 | Totally a booplicate | 24 March 2024, 15:48:40 UTC | gh-112571: Move fish venv activation script into the common folder (GH-117169) pythongh-112571: allow using fish venv activation script on windows The fish shell can be used on windows under cygwin or msys2. This change moves the script to the common folder so the venv module will install it on both posix and nt systems (like the bash script). | 24 March 2024, 15:48:40 UTC |
78a651f | Terry Jan Reedy | 24 March 2024, 15:38:34 UTC | gh-117194: Properly format 'base64' header in What's New (#117198) It needs 6, not 3, '-'s. | 24 March 2024, 15:38:34 UTC |
f267d5b | Kerim Kabirov | 24 March 2024, 13:59:14 UTC | GH-115986 Docs: promote pprint.pp usage as a default (#116614) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> | 24 March 2024, 13:59:14 UTC |
39df773 | LilKS | 24 March 2024, 10:01:07 UTC | gh-101760: Improve the imaplib.IMAP4 example (#101764) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 24 March 2024, 10:01:07 UTC |
a1e948e | Raymond Hettinger | 24 March 2024, 09:35:58 UTC | Add cumulative option for the new statistics.kde() function. (#117033) | 24 March 2024, 09:35:58 UTC |
d610d82 | Irit Katriel | 23 March 2024, 22:32:33 UTC | gh-112383: teach dis how to interpret ENTER_EXECUTOR (#117171) | 23 March 2024, 22:32:33 UTC |
6c83352 | Ken Jin | 23 March 2024, 22:19:17 UTC | gh-117180: Complete call sequence when trace stack overflow (GH-117184) --------- Co-authored-by: Peter Lazorchak <lazorchakp@gmail.com> Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> | 23 March 2024, 22:19:17 UTC |
f11d0d8 | Erik Soma | 23 March 2024, 15:39:35 UTC | gh-91227: Ignore ERROR_PORT_UNREACHABLE in proactor recvfrom() (#32011) | 23 March 2024, 15:39:35 UTC |
9967b56 | Victor Stinner | 23 March 2024, 12:01:20 UTC | gh-117008: Fix functools test_recursive_pickle() (#117009) Use support.infinite_recursion() in test_recursive_pickle() of test_functools to prevent a stack overflow on "ARM64 Windows Non-Debug" buildbot. Lower Py_C_RECURSION_LIMIT to 1,000 frames on Windows ARM64. | 23 March 2024, 12:01:20 UTC |
72eea51 | Barney Gale | 22 March 2024, 19:14:09 UTC | GH-106747: Document another difference between `glob` and `pathlib`. (#116518) Document that `path.glob()` might return *path*, whereas `glob.glob(root_dir=path)` will never return an empty string corresponding to *path*. | 22 March 2024, 19:14:09 UTC |
e28477f | Mark Shannon | 22 March 2024, 18:43:25 UTC | GH-117108: Change the size of the GC increment to about 1% of the total heap size. (GH-117120) | 22 March 2024, 18:43:25 UTC |
e2e0b4b | Serhiy Storchaka | 22 March 2024, 18:19:10 UTC | gh-113024: C API: Add PyObject_GenericHash() function (GH-113025) | 22 March 2024, 18:19:10 UTC |
567ab3b | Serhiy Storchaka | 22 March 2024, 18:08:00 UTC | gh-117084: Fix ZIP file extraction for directory entry names with backslashes on Windows (GH-117129) | 22 March 2024, 18:08:00 UTC |
5a78f6e | Serhiy Storchaka | 22 March 2024, 18:03:48 UTC | gh-117134: Microoptimize glob() for include_hidden=True (GH-117135) | 22 March 2024, 18:03:48 UTC |
00baaa2 | Vinay Sajip | 22 March 2024, 17:25:51 UTC | [docs] Fix typo in docstring and add example to logging cookbook. (GH-117157) | 22 March 2024, 17:25:51 UTC |
40d75c2 | Jakub Stasiak | 22 March 2024, 16:49:56 UTC | GH-113171: Fix "private" (non-global) IP address ranges (GH-113179) * GH-113171: Fix "private" (really non-global) IP address ranges The _private_networks variables, used by various is_private implementations, were missing some ranges and at the same time had overly strict ranges (where there are more specific ranges considered globally reachable by the IANA registries). This patch updates the ranges with what was missing or otherwise incorrect. I left 100.64.0.0/10 alone, for now, as it's been made special in [1] and I'm not sure if we want to undo that as I don't quite understand the motivation behind it. The _address_exclude_many() call returns 8 networks for IPv4, 121 networks for IPv6. [1] https://github.com/python/cpython/issues/61602 | 22 March 2024, 16:49:56 UTC |
3be9b9d | Steve Dower | 22 March 2024, 15:00:50 UTC | Fix get_packagefamilyname helper function on Windows 32-bit (GH-117153) | 22 March 2024, 15:00:50 UTC |
63d6f26 | NGRsoftlab | 22 March 2024, 11:25:38 UTC | gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069) Co-authored-by: i.khabibulin <i.khabibulin@ngrsoftlab.ru> | 22 March 2024, 11:25:38 UTC |
42ae924 | Petr Viktorin | 22 March 2024, 09:42:18 UTC | gh-117127: glob tests: Reopen dir_fd to pick up directory changes (GH-117128) | 22 March 2024, 09:42:18 UTC |
8383915 | Tim Peters | 22 March 2024, 03:27:25 UTC | GH-116939: Rewrite binarysort() (#116940) Rewrote binarysort() for clarity. Also changed the signature to be more coherent (it was mixing sortslice with raw pointers). No change in method or functionality. However, I left some experiments in, disabled for now via `#if` tricks. Since this code was first written, some kinds of comparisons have gotten enormously faster (like for lists of floats), which changes the tradeoffs. For example, plain insertion sort's simpler innermost loop and highly predictable branches leave it very competitive (even beating, by a bit) binary insertion when comparisons are very cheap, despite that it can do many more compares. And it wins big on runs that are already sorted (moving the next one in takes only 1 compare then). So I left code for a plain insertion sort, to make future experimenting easier. Also made the maximum value of minrun a `#define` (``MAX_MINRUN`) to make experimenting with that easier too. And another bit of `#if``-disabled code rewrites binary insertion's innermost loop to remove its unpredictable branch. Surprisingly, this doesn't really seem to help overall. I'm unclear on why not. It certainly adds more instructions, but they're very simple, and it's hard to be believe they cost as much as a branch miss. | 22 March 2024, 03:27:25 UTC |
97ba910 | Guido van Rossum | 22 March 2024, 01:27:48 UTC | gh-108716:: Remove _PyStaticCode_Init/Fini (#117141) More deepfreeze cleanup. | 22 March 2024, 01:27:48 UTC |
b3d25df | Eric Snow | 22 March 2024, 00:20:20 UTC | gh-105716: Fix _PyInterpreterState_IsRunningMain() For Embedders (gh-117140) When I added _PyInterpreterState_IsRunningMain() and friends last year, I tried to accommodate applications that embed Python but don't call _PyInterpreterState_SetRunningMain() (not that they're expected to). That mostly worked fine until my recent changes in gh-117049, where the subtleties with the fallback code led to failures; the change ended up breaking test_tools.test_freeze, which exercises a basic embedding situation. The simplest fix is to drop the fallback code I originally added to _PyInterpreterState_IsRunningMain() (and later to _PyThreadState_IsRunningMain()). I've kept the fallback in the _xxsubinterpreters module though. I've also updated Py_FrozenMain() to call _PyInterpreterState_SetRunningMain(). | 22 March 2024, 00:20:20 UTC |
c4bf58a | Thomas A Caswell | 21 March 2024, 23:54:50 UTC | gh-116745: Remove all internal usage of @LIBPYTHON@ (#116746) Replace with MODULE_LDFLAGS. | 21 March 2024, 23:54:50 UTC |
3ec5730 | Malcolm Smith | 21 March 2024, 23:52:29 UTC | gh-71052: Add Android build script and instructions (#116426) | 21 March 2024, 23:52:29 UTC |
50f9b0b | Victor Stinner | 21 March 2024, 22:17:09 UTC | gh-117061: Fix test_posix.test_sched_setaffinity() on RHEL9 (#117126) On RHEL9, sched_setaffinity(0, []) does not fail. | 21 March 2024, 22:17:09 UTC |
0907871 | Ned Batchelder | 21 March 2024, 19:47:09 UTC | docs: fix over-linking in dataclasses.rst (#117005) | 21 March 2024, 19:47:09 UTC |
570a82d | Guido van Rossum | 21 March 2024, 19:37:41 UTC | gh-117045: Add code object to function version cache (#117028) Changes to the function version cache: - In addition to the function object, also store the code object, and allow the latter to be retrieved even if the function has been evicted. - Stop assigning new function versions after a critical attribute (e.g. `__code__`) has been modified; the version is permanently reset to zero in this case. - Changes to `__annotations__` are no longer considered critical. (This fixes gh-109998.) Changes to the Tier 2 optimization machinery: - If we cannot map a function version to a function, but it is still mapped to a code object, we continue projecting the trace. The operand of the `_PUSH_FRAME` and `_POP_FRAME` opcodes can be either NULL, a function object, or a code object with the lowest bit set. This allows us to trace through code that calls an ephemeral function, i.e., a function that may not be alive when we are constructing the executor, e.g. a generator expression or certain nested functions. We will lose globals removal inside such functions, but we can still do other peephole operations (and even possibly [call inlining](https://github.com/python/cpython/pull/116290), if we decide to do it), which only need the code object. As before, if we cannot retrieve the code object from the cache, we stop projecting. | 21 March 2024, 19:37:41 UTC |
c85d841 | Will Childs-Klein | 21 March 2024, 19:16:36 UTC | gh-116333: Relax error string text expectations in SSL-related tests (GH-116334) * Relax error string text expectations in SSL-related tests As suggested [here][1], this change relaxes the OpenSSL error string text expectations in a number of tests. This was specifically done in support of more easily building CPython [AWS-LC][2], but because AWS-LC is a fork of [BoringSSL][3], it should increase compatibility with that library as well. In addition to the error string relaxations, we also add some guards around the `tls-unique` channel binding being used with TLSv1.3, as that feature (described in [RFC 6929][4]) is [not defined][5] for TLSv1.3. [1]: https://discuss.python.org/t/support-building-ssl-and-hashlib-modules-against-aws-lc/44505/4 [2]: https://github.com/aws/aws-lc [3]: https://github.com/google/boringssl [4]: https://datatracker.ietf.org/doc/html/rfc5929#section-3 [5]: https://datatracker.ietf.org/doc/html/rfc8446#appendix-C.5 | 21 March 2024, 19:16:36 UTC |
1f72fb5 | Sam Gross | 21 March 2024, 18:21:02 UTC | gh-116522: Refactor `_PyThreadState_DeleteExcept` (#117131) Split `_PyThreadState_DeleteExcept` into two functions: - `_PyThreadState_RemoveExcept` removes all thread states other than one passed as an argument. It returns the removed thread states as a linked list. - `_PyThreadState_DeleteList` deletes those dead thread states. It may call destructors, so we want to "start the world" before calling `_PyThreadState_DeleteList` to avoid potential deadlocks. | 21 March 2024, 18:21:02 UTC |
50369e6 | Michael Droettboom | 21 March 2024, 17:27:46 UTC | gh-116996: Add pystats about _Py_uop_analyse_and_optimize (GH-116997) | 21 March 2024, 17:27:46 UTC |
617158e | Eric Snow | 21 March 2024, 17:15:02 UTC | gh-76785: Drop PyInterpreterID_Type (gh-117101) I added it quite a while ago as a strategy for managing interpreter lifetimes relative to the PEP 554 (now 734) implementation. Relatively recently I refactored that implementation to no longer rely on InterpreterID objects. Thus now I'm removing it. | 21 March 2024, 17:15:02 UTC |
abdd1f9 | Victor Stinner | 21 March 2024, 16:45:43 UTC | gh-85283: Build _testconsole extension with limited C API (#117125) | 21 March 2024, 16:45:43 UTC |
8bea6c4 | Victor Stinner | 21 March 2024, 16:07:00 UTC | gh-115754: Add Py_GetConstant() function (#116883) Add Py_GetConstant() and Py_GetConstantBorrowed() functions. In the limited C API version 3.13, getting Py_None, Py_False, Py_True, Py_Ellipsis and Py_NotImplemented singletons is now implemented as function calls at the stable ABI level to hide implementation details. Getting these constants still return borrowed references. Add _testlimitedcapi/object.c and test_capi/test_object.py to test Py_GetConstant() and Py_GetConstantBorrowed() functions. | 21 March 2024, 16:07:00 UTC |
5a76d1b | Eric Snow | 21 March 2024, 16:06:35 UTC | gh-105716: Update interp->threads.main After Fork (gh-117049) I missed this in gh-109921. We also update Py_Exit() to call _PyInterpreterState_SetNotRunningMain(), if necessary. | 21 March 2024, 16:06:35 UTC |
bbee57f | Eric Snow | 21 March 2024, 15:56:12 UTC | gh-76785: Clean Up Interpreter ID Conversions (gh-117048) Mostly we unify the two different implementations of the conversion code (from PyObject * to int64_t. We also drop the PyArg_ParseTuple()-style converter function, as well as rename and move PyInterpreterID_LookUp(). | 21 March 2024, 15:56:12 UTC |
e728303 | Sam Gross | 21 March 2024, 14:01:16 UTC | gh-116522: Stop the world before fork() and during shutdown (#116607) This changes the free-threaded build to perform a stop-the-world pause before deleting other thread states when forking and during shutdown. This fixes some crashes when using multiprocessing and during shutdown when running with `PYTHON_GIL=0`. This also changes `PyOS_BeforeFork` to acquire the runtime lock (i.e., `HEAD_LOCK(&_PyRuntime)`) before forking to ensure that data protected by the runtime lock (and not just the GIL or stop-the-world) is in a consistent state before forking. | 21 March 2024, 14:01:16 UTC |
1f8b24e | Malcolm Smith | 21 March 2024, 13:20:57 UTC | gh-71052: Implement `ctypes.util.find_library` on Android (GH-116379) | 21 March 2024, 13:20:57 UTC |
d16c9d1 | Tian Gao | 21 March 2024, 10:30:10 UTC | gh-116987: Support class code objects in inspect.findsource() (GH-117025) | 21 March 2024, 10:30:10 UTC |
6547330 | Adam Turner | 21 March 2024, 03:49:10 UTC | GH-109653: Defer import of ``importlib.metadata._adapters`` (#109829) * adapters * Add comments for deferred imports with links to rationale. * Add blurb --------- Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> | 21 March 2024, 03:49:10 UTC |
667294d | Jason R. Coombs | 21 March 2024, 03:01:24 UTC | gh-117089: Apply changes from importlib_metadata 7.1.0 (#117094) * Apply changes from importlib_metadata 7.1.0 * Include the data sources in the makefile (even though they're not needed) | 21 March 2024, 03:01:24 UTC |
f4cc77d | Victor Stinner | 20 March 2024, 23:06:24 UTC | gh-116869: Enable -Werror in test_cext for Free Threading (#117106) Check for warnings, but don't enable the compiler flag -Werror=declaration-after-statement. | 20 March 2024, 23:06:24 UTC |
104602a | Victor Stinner | 20 March 2024, 22:52:23 UTC | gh-105927: Limit PyWeakref_GetRef() to limited C API 3.13 (#117091) | 20 March 2024, 22:52:23 UTC |
8ad8898 | Jason R. Coombs | 20 March 2024, 21:11:00 UTC | gh-117089: Move importlib.metadata tests to their own package (#117092) * Ensure importlib.metadata tests do not leak references in sys.modules. * Move importlib.metadata tests to their own package for easier syncing with importlib_metadata. * Update owners and makefile for new directories. * Add blurb | 20 March 2024, 21:11:00 UTC |
7d44654 | Carol Willing | 20 March 2024, 21:00:59 UTC | Fix sort order for "locale encoding" glossary item (#115794) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> | 20 March 2024, 21:00:59 UTC |
63289b9 | Mark Shannon | 20 March 2024, 18:24:02 UTC | GH-117066: Tier 2 optimizer: Don't throw away good traces if we can't optimize them perfectly. (GH-117067) | 20 March 2024, 18:24:02 UTC |
dcaf33a | Petr Viktorin | 20 March 2024, 16:33:08 UTC | gh-114314: ctypes: remove stgdict and switch to heap types (GH-116458) Before this change, ctypes classes used a custom dict subclass, `StgDict`, as their `tp_dict`. This acts like a regular dict but also includes extra information about the type. This replaces stgdict by `StgInfo`, a C struct on the type, accessed by `PyObject_GetTypeData()` (PEP-697). All usage of `StgDict` (mainly variables named `stgdict`, `dict`, `edict` etc.) is converted to `StgInfo` (named `stginfo`, `info`, `einfo`, etc.). Where the dict is actually used for class attributes (as a regular PyDict), it's now called `attrdict`. This change -- not overriding `tp_dict` -- is made to make me comfortable with the next part of this PR: moving the initialization logic from `tp_new` to `tp_init`. The `StgInfo` is set up in `__init__` of each class, with a guard that prevents calling `__init__` more than once. Note that abstract classes (like `Array` or `Structure`) are created using `PyType_FromMetaclass` and do not have `__init__` called. Previously, this was done in `__new__`, which also wasn't called for abstract classes. Since `__init__` can be called from Python code or skipped, there is a tested guard to ensure `StgInfo` is initialized exactly once before it's used. Co-authored-by: neonene <53406459+neonene@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> | 20 March 2024, 16:33:08 UTC |
44fbab4 | Russell Keith-Magee | 20 March 2024, 15:32:56 UTC | gh-117058: Update GUI and packaging recommendations for macOS. (#117059) | 20 March 2024, 15:32:56 UTC |
9221ef2 | Brett Simmers | 20 March 2024, 15:18:26 UTC | gh-116908: Only write to `_pending_calls.calls_to_do` with atomic operations (#117044) These writes to `pending->calls_to_do` need to be atomic, because other threads can read (atomically) from `calls_to_do` without holding `pending->mutex`. | 20 March 2024, 15:18:26 UTC |
fc45998 | jkriegshauser | 20 March 2024, 14:33:28 UTC | gh-116773: Ensure overlapped objects on Windows are not deallocated too early by asyncio (GH-116774) | 20 March 2024, 14:33:28 UTC |
519b2ae | Serhiy Storchaka | 20 March 2024, 13:39:53 UTC | gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064) | 20 March 2024, 13:39:53 UTC |
8182319 | Nikita Sobolev | 20 March 2024, 10:43:20 UTC | gh-94808: add tests covering `PyFunction_{Get,Set}Closure` (GH-99429) | 20 March 2024, 10:43:20 UTC |
1530932 | Mark Shannon | 20 March 2024, 08:54:42 UTC | GH-108362: Incremental Cycle GC (GH-116206) | 20 March 2024, 08:54:42 UTC |
d5ebf8b | Victor Stinner | 19 March 2024, 22:23:17 UTC | gh-116869: Fix test_cext for Free Threading (#117043) Don't check for warnings on Free Threading. | 19 March 2024, 22:23:17 UTC |
438de10 | Victor Stinner | 19 March 2024, 21:58:13 UTC | gh-116869: Fix test_cext on RHEL7 (#117010) Remove -std option from CC command line. Skip C++14 test for now on non-Windows platforms (like RHEL7). | 19 March 2024, 21:58:13 UTC |
2d17309 | Serhiy Storchaka | 19 March 2024, 21:30:25 UTC | gh-117041: Add "-X gil" in the Python CLI help (GH-117042) | 19 March 2024, 21:30:25 UTC |
332ac46 | Ned Batchelder | 19 March 2024, 19:55:20 UTC | docs: announce venv creation before installing packages (#117036) | 19 March 2024, 19:55:20 UTC |