summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-116226: include `pthread_stubs.h` in `pycore_pythreads.h` (#116227)Brett Cannon2024-03-011-1/+2
|
* gh-114271: Make `_thread.ThreadHandle` thread-safe in free-threaded builds ↵mpage2024-03-015-101/+225
| | | | | | | | | | | | | | | | | (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.
* gh-115941: fixes in dictobject.c doc block(#116196)Humbulani2024-03-011-1/+2
|
* gh-115480: Type propagate _BINARY_OP_ADD_UNICODE (GH-115710)Ken Jin2024-03-013-8/+66
|
* gh-84995: Run sys.__interactivehook__() on asyncio REPL startup (#20517)Rémi Lapeyre2024-03-013-39/+62
| | | | | | | | | | 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>
* gh-115773: Add missing preprocessor guard in _testexternalinspection (#116212)Malcolm Smith2024-03-011-1/+1
| | | Add missing preprocessor guard in _testexternalinspection
* gh-116171: Argument Clinic: disallow overriding return converter for ↵Erlend E. Aasland2024-03-013-41/+10
| | | | __init__ methods (#116172)
* gh-115806: Don't mangle output of configure 'ipv6 stack type' check (#116165)Erlend E. Aasland2024-03-012-3/+3
|
* gh-104711: Add security warning to the CGIHTTPRequestHandler document ↵AN Long2024-03-011-0/+6
| | | | (GH-115915)
* gh-116035: Document that both tzinfo and fold are ignored in comparisons if ↵Serhiy Storchaka2024-03-011-2/+8
| | | | | tzinfo is the same (GH-116187) This mostly restores information removed in c12240ed28aac6494750e00143bc550c4d6d8ad1 (GH-114749).
* gh-76785: Fix interpreters.Queue.get_nowait() (gh-116166)Eric Snow2024-03-012-48/+75
| | | I missed this change in gh-115566.
* gh-112281: Allow `Union` with unhashable `Annotated` metadata (#112283)Nikita Sobolev2024-03-014-18/+156
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104219: Document that idunders can return NotImplemented (#104220)Gouvernathor2024-03-011-2/+4
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191)Serhiy Storchaka2024-03-013-32/+373
| | | | | | | * 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.
* gh-115554: Improved logic for handling multiple existing py.exe launcher ↵Steve Dower2024-03-014-74/+140
| | | | installs (GH-115793)
* gh-101293: Fix support of custom callables and types in ↵Serhiy Storchaka2024-03-013-89/+438
| | | | | | | | | | | 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.
* build(deps-dev): bump types-setuptools from 69.0.0.20240125 to ↵dependabot[bot]2024-03-011-1/+1
| | | | | | 69.1.0.20240301 in /Tools (#116190) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-116159: argparse: performance improvement parsing large number of options ↵Amethyst Reese2024-03-011-4/+5
| | | | | | | | | | | | | | (#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>
* build(deps): bump hypothesis from 6.97.4 to 6.98.15 in /Tools (#116189)dependabot[bot]2024-03-011-1/+1
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump types-psutil from 5.9.5.20240106 to 5.9.5.20240205 in ↵dependabot[bot]2024-03-011-1/+1
| | | | | | /Tools (#116188) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-65824: Improve the "less" prompt in pydoc (GH-116050)Serhiy Storchaka2024-03-012-1/+11
| | | | | | | Output the line number, the percentage and the help about how to get help or quit the pager. Inspired by the GNU man.
* gh-116098: Revert "gh-107674: Improve performance of `sys.settrace` ↵Tian Gao2024-03-017-64/+53
| | | | | | | (GH-114986)" (GH-116178) Revert "gh-107674: Improve performance of `sys.settrace` (GH-114986)" This reverts commit 0a61e237009bf6b833e13ac635299ee063377699.
* gh-115999: Disable the specializing adaptive interpreter in free-threaded ↵Brett Simmers2024-03-019-3/+96
| | | | | builds (#116013) For now, disable all specialization when the GIL might be disabled.
* gh-116099: Fix refcounting bug in `_queueobj_shared()` (gh-116164)Brett Simmers2024-03-011-3/+1
| | | | | | | | | 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`.
* gh-115491: Fix Clang compiler warning (#116153)Sam Gross2024-03-011-1/+1
| | | gh-115491: Fix compiler warning on macOS
* gh-103092: Add a mutex to make the PRNG state of rotatingtree ↵AN Long2024-02-294-3/+12
| | | | concurrent-safe (#115301)
* gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) ↵Sebastian Pipping2024-02-2916-21/+435
| | | | | | | | | | | | | | | | | | | | | (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.
* gh-115685: Type/values propagate for TO_BOOL in tier 2 (GH-115686)Ken Jin2024-02-296-30/+163
|
* Fix rendering of null character in ast.rst (#116080)Shantanu2024-02-291-1/+1
|
* gh-71052: Fix several Android build issues (#115955)Malcolm Smith2024-02-296-21/+87
| | | | | | | | | | | | | | | | | | | 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.
* gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141)Tian Gao2024-02-293-0/+14
|
* gh-112075: Avoid locking shared keys on every assignment (#116087)Dino Viehland2024-02-291-12/+20
|
* gh-71052: Add test exclusions to support running the test suite on Android ↵Malcolm Smith2024-02-2912-27/+58
| | | | (#115918)
* gh-108051: Update versions found by find_python.bat and clarify readme ↵Steve Dower2024-02-292-7/+18
| | | | (GH-116118)
* gh-73580: Docs for tunnelling TLS through TLS (GH-22539)Carl Bordum Hansen2024-02-291-0/+3
|
* Docs: mark up NotImplemented using the :data: role throughout the docs (#116135)Erlend E. Aasland2024-02-2916-39/+39
|
* gh-116088: Insert bottom checks after all sym_set_...() calls (#116089)Guido van Rossum2024-02-297-47/+106
| | | | | | | | | 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.
* gh-115811: Update documentation to add some Logger attributes. (GH-116109)Vinay Sajip2024-02-291-0/+36
|
* gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped ↵Michael Felt2024-02-291-0/+4
| | | | (GH-18312)
* Make the iter_except() recipe more compact. (gh-116132)Raymond Hettinger2024-02-291-20/+1
| | | Only one example is needed
* GH-115802: JIT "small" code for Windows (GH-115964)Brandt Bucher2024-02-2926-93/+126
|
* gh-112844: Add SBOM for external dependencies (#115789)Seth Michael Larson2024-02-293-17/+266
|
* gh-116100: Add `test` arg to `ast.If` and `op` arg to `ast.BoolOp` calls ↵Kirill Podoprigora2024-02-291-2/+2
| | | | (#116101)
* gh-115881: Document feature_version limitations (#115980)Shantanu2024-02-291-6/+9
|
* gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error ↵Petr Viktorin2024-02-291-0/+4
| | | | | (GH-116105) gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error
* gh-115937: Remove implementation details from inspect.signature() docs (#116086)Erlend E. Aasland2024-02-291-3/+7
| | | | | 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>
* gh-115816: Generate calls to sym_new_const() etc. without _Py_uop prefix ↵Guido van Rossum2024-02-293-104/+104
| | | | | | | | | (#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); ```
* gh-115859: Fix test_type_inconsistency() when run multiple times (#116079)Guido van Rossum2024-02-281-3/+7
| | | | | This should fix the refleaks bots. (See https://github.com/python/cpython/pull/116062#issuecomment-1970038174 .)
* gh-115821: [Enum] better error message for calling super().__new__() (GH-116063)Ethan Furman2024-02-284-1/+22
| | | | docs now state to not call super().__new__ if super().__new__ is called, a better error message is now used
* gh-116075: Skip test_external_inspection on qemu in JIT CI (#116076)Erlend E. Aasland2024-02-281-2/+2
|