summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-57141: Add dircmp shallow option (GH-109499)Tobias Rautenkranz2024-03-044-31/+120
| | | | | Co-authored-by: Steve Ward <planet36@gmail.com> Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
* gh-108562: Revert enabling -fstrict-overflow for libmpdec (GH-116302)Sergey B Kirpichev2024-03-043-13/+1
| | | | | gh-108562: partial reversion of pr114751 Reverts -fstrict-overflow for libmpdec
* gh-116116: Backport blake2 change to fix building with clang-cl on ↵Yuriy Chernyshov2024-03-044-6/+8
| | | | windows-i686 (GH-116117)
* gh-115832: Fix instrumentation version mismatch during interpreter shutdown ↵Brett Simmers2024-03-044-2/+53
| | | | | | | | | | | | | (#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`.
* Consistently spell out *predicate* instead of *pred*. (gh-116308)Raymond Hettinger2024-03-042-26/+19
|
* gh-115256: Remove refcycles from tarfile writing (GH-115257)pan3242024-03-043-2/+28
|
* gh-114258: Argument Clinic: refactor getset implementation (#116170)Erlend E. Aasland2024-03-043-35/+18
| | | | | | * 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.
* GH-116271 Docs: provide clarification for object assignments in the Tutorial ↵Kerim Kabirov2024-03-041-7/+24
| | | | | | | section (#116283) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled ↵Gregory P. Smith2024-03-042-6/+6
| | | | | | | | | | 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.
* gh-116296: Fix refleak in reduce_newobj() corner case (#116297)Erlend E. Aasland2024-03-042-0/+2
| | | Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
* pathlib ABCs: follow all symlinks in `PathBase.glob()` (#116293)Barney Gale2024-03-042-39/+34
| | | | | | | 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.
* gh-116010: Remove link to deprecated PEP 6 in FAQ guide (#116246)Iman Tabrizian2024-03-031-3/+5
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-116281: Remove wrong '\' from '\*' in some doc signatures (#116282)HarryLHW2024-03-033-6/+6
|
* Docs: update using/configure.rst (#116274)Hugo van Kemenade2024-03-031-23/+31
|
* gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() (GH-115812)Serhiy Storchaka2024-03-033-36/+56
| | | | | | | 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.
* gh-108562: Fix compiler warnings for libmpdec (#114751)Sergey B Kirpichev2024-03-035-3/+16
| | | | | | If awailable, enable -fstrict-overflow for libmpdec. Also shut off false positive warnings (-Warray-bounds). The later was backported from mpdecimal-4.0.0.
* gh-72971: Clarify the special no-TypeError behavior for equality (#110729)Gouvernathor2024-03-031-1/+4
|
* gh-115103: Update gc.collect to process delayed objects (gh-116251)Donghee Na2024-03-020-0/+0
| | | | | | | * 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
* gh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (gh-116238)Donghee Na2024-03-021-0/+18
|
* gh-85644: webbrowser: Use $XDG_CURRENT_DESKTOP to check desktop (GH-21731)Marco Trevisan2024-03-022-3/+11
| | | | | | | | 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
* GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228)Brett Cannon2024-03-022-0/+13
| | | Wasmtime doesn't implement these functions in a way to pass test_posix (https://github.com/bytecodealliance/wasmtime/issues/7830).
* gh-116102: Silence a Compiler Warning in _xxinterpqueues (gh-116230)Eric Snow2024-03-021-1/+1
|
* gh-112087: Use QSBR technique for list_new/clear for free-thread build ↵Donghee Na2024-03-011-6/+29
| | | | (gh-115875)
* 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.