summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-121163: Add "all" as an valid alias for "always" in ↵Kirill Podoprigora2024-06-305-43/+49
| | | | | | warnings.simplefilter() (#121164) Add support for ``all`` as an valid alias for ``always`` in ``warnings.simplefilter()`` and ``warnings.filterswarnings()``.
* [doc] Update element positions and styles in logging flow diagram. (GH-121182)Vinay Sajip2024-06-301-132/+155
| | | Update element positions and styles.
* gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178)Yureka2024-06-301-7/+3
|
* gh-120522: Add a `--with-app-store-compliance` configure option to patch out ↵Russell Keith-Magee2024-06-309-2/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problematic code (#120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> * Regenerate configure script. * Silence the patch echo output. --------- Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-119054: Add alt text to pathlib inheritance diagram (#121158)Barney Gale2024-06-291-0/+6
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* GH-119054: Add "Expanding and resolving paths" section to pathlib docs. ↵Barney Gale2024-06-291-101/+101
| | | | | | | | | | | | | | | | | | (#120970) Add dedicated subsection for `home()`, `expanduser()`, `cwd()`, `absolute()`, `resolve()` and `readlink()`. The position of this section keeps all the `Path` constructors (`Path()`, `Path.from_uri()`, `Path.home()` and `Path.cwd()`) near the top. Within the section, closely related methods are kept adjacent. Specifically: -.`home()` and `expanduser()` (the former calls the latter) - `cwd()` and `absolute()` (the former calls the latter) - `absolute()` and `resolve()` (both make paths absolute) - `resolve()` and `readlink()` (both read symlink targets) - Ditto `cwd()` and `absolute()` - Ditto `absolute()` and `resolve()` The "Other methods" section is removed.
* gh-119372: Recover inf's and zeros in _Py_c_quot (GH-119457)Sergey B Kirpichev2024-06-293-2/+56
| | | | | | In some cases, previously computed as (nan+nanj), we could recover meaningful component values in the result, see e.g. the C11, Annex G.5.2, routine _Cdivd().
* gh-121101: Document -Wall option (an alias for -Walways) (#121102)Wim Jeantine-Glenn2024-06-292-0/+3
|
* gh-120713: Normalize year with century for datetime.strftime (GH-120820)blhsing2024-06-297-16/+174
|
* gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c ↵Justin Applegate2024-06-281-0/+2
| | | | | (#121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
* gh-117139: Fix a few wrong steals in bytecodes.c (GH-121127)Ken Jin2024-06-284-33/+33
| | | Fix a few wrong steals in bytecodes.c
* gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)Steve Dower2024-06-285-9/+33
|
* gh-121018: Fix more cases of exiting in argparse when exit_on_error=False ↵Serhiy Storchaka2024-06-283-16/+59
| | | | | | | | | (GH-121056) * parse_intermixed_args() now raises ArgumentError instead of calling error() if exit_on_error is false. * Internal code now always raises ArgumentError instead of calling error(). It is then caught at the higher level and error() is called if exit_on_error is true.
* Check for compiler warnings in test_cext on Windows (#121088)Victor Stinner2024-06-285-5/+18
| | | | | | | | On Windows, test_cext and test_cppext now pass /WX flag to the MSC compiler to treat all compiler warnings as errors. In verbose mode, these tests now log the compiler commands to help debugging. Change Py_BUILD_ASSERT_EXPR implementation on Windows to avoid a compiler warning about an unnamed structure.
* gh-120804: remove `is_active` method from internal child watchers ↵Kumar Aditya2024-06-281-6/+0
| | | | implementation in asyncio (#121124)
* gh-121096: Ignore dlopen() leaks in Valgrind suppression file (#121097)Victor Stinner2024-06-281-0/+43
|
* gh-107803: add whatsnew for asyncio double linked list implementation (#120995)Kumar Aditya2024-06-281-0/+8
|
* gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051)Donghee Na2024-06-271-2/+36
|
* gh-121035: Update logging flow chart to include the lastResort handler. ↵Alexander Bessman2024-06-273-2/+283
| | | | (GH-121036)
* gh-121065: Temporarily skip flaky test on free-threaded build (#121100)Sam Gross2024-06-271-0/+1
|
* gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887)Craig Robson2024-06-272-3/+5
| | | | | | | | | The check for whether the log file is a real file is expensive on NFS filesystems. This commit reorders the rollover condition checking to not do the file type check if the expected file size is less than the rotation threshold. Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-115986 Improve pprint docs formatting (GH-117401)Kerim Kabirov2024-06-271-91/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | * Move pprinter parameters description to the table The change improves readability. Suggested in the GH#116085 PR discussion. * Make pprint doc with params markup * Fix formatting Indentation of code blocks made them nested "Version changed" is better placed after the code block * Fix formatting for tests * fix code indentation for autotests * Fix identation for autotests * Remove duplication of the parameters' description * Rearrange parameters description in a correct order --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-121027: Add a future warning in functools.partial.__get__ (#121086)Serhiy Storchaka2024-06-277-17/+75
|
* gh-121082: Fix build failure when the developer use `--enable-pystats` ↵Nadeshiko Manju2024-06-272-2/+4
| | | | | | | | arguments in configuration command after #118450 (#121083) Signed-off-by: Manjusaka <me@manjusaka.me> Co-authored-by: Ken Jin <kenjin4096@gmail.com>
* gh-120593: Check -Wcast-qual flag in test_cext (#121081)Victor Stinner2024-06-271-0/+3
| | | | Check the usage of the 'const' qualifier in the Python C API in test_cext.
* gh-120686: remove unused internal c api functions (#120687)Irit Katriel2024-06-277-54/+0
|
* gh-121040: Use __attribute__((fallthrough)) (#121044)Victor Stinner2024-06-2729-104/+131
| | | | | | | | | | | | | Fix warnings when using -Wimplicit-fallthrough compiler flag. Annotate explicitly "fall through" switch cases with a new _Py_FALLTHROUGH macro which uses __attribute__((fallthrough)) if available. Replace "fall through" comments with _Py_FALLTHROUGH. Add _Py__has_attribute() macro. No longer define __has_attribute() macro if it's not defined. Move also _Py__has_builtin() at the top of pyport.h. Co-Authored-By: Nikita Sobolev <mail@sobolevn.me>
* gh-120888: Bump bundled pip to 24.1.1 (#120889)Pradyun Gedam2024-06-274-1/+2
| | | | | | | Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: T. Wouters <thomas@python.org>
* gh-119521: Remove _IncompleteInputError from the docs (GH-120993)Petr Viktorin2024-06-272-1/+3
|
* gh-120868: Fix breaking change in `logging.config` when using `QueueHandler` ↵Janek Nouvertné2024-06-273-17/+81
| | | | (GH-120872)
* gh-113433: Automatically Clean Up Subinterpreters in Py_Finalize() (gh-121060)Eric Snow2024-06-263-9/+151
| | | This change makes things a little less painful for some users. It also fixes a failing assert (gh-120765), by making sure all subinterpreters are destroyed before the main interpreter. As part of that, we make sure Py_Finalize() always runs with the main interpreter active.
* gh-120937: Reference weakref from the `__del__` documentation (#120940)chaen2024-06-261-0/+2
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-117139: Convert the evaluation stack to stack refs (#118450)Ken Jin2024-06-2635-3745/+5215
| | | | | | | | | | | | | | | | | This PR sets up tagged pointers for CPython. The general idea is to create a separate struct _PyStackRef for everything on the evaluation stack to store the bits. This forces the C compiler to warn us if we try to cast things or pull things out of the struct directly. Only for free threading: We tag the low bit if something is deferred - that means we skip incref and decref operations on it. This behavior may change in the future if Mark's plans to defer all objects in the interpreter loop pans out. This implies a strict stack reference discipline is required. ALL incref and decref operations on stackrefs must use the stackref variants. It is unsafe to untag something then do normal incref/decref ops on it. The new incref and decref variants are called dup and close. They mimic a "handle" API operating on these stackrefs. Please read Include/internal/pycore_stackref.h for more information! --------- Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
* gh-118908: Use __main__ for the default PyREPL namespace (#121054)Łukasz Langa2024-06-264-67/+75
|
* gh-120593: Fix const qualifier in _PyLong_CompactValue() (#121053)Victor Stinner2024-06-263-6/+6
| | | | | | | | | | | | | | | | | | Remove the const qualifier of the argument of functions: * _PyLong_IsCompact() * _PyLong_CompactValue() Py_TYPE() argument is not const. Fix the compiler warning: Include/cpython/longintrepr.h: In function ‘_PyLong_CompactValue’: Include/pyport.h:19:31: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual] (...) Include/cpython/longintrepr.h:133:30: note: in expansion of macro ‘Py_TYPE’ assert(PyType_HasFeature(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS));
* gh-120593: Fix const qualifier in pyatomic.h (#121055)Victor Stinner2024-06-261-4/+4
|
* gh-121008: Fix idlelib.run tests (#121046)Victor Stinner2024-06-261-6/+13
| | | | When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.
* gh-119786: move frames documentation to InternalDocs and add details (#121009)Irit Katriel2024-06-262-55/+38
|
* gh-120642: Move private PyCode APIs to the internal C API (#120643)Victor Stinner2024-06-2618-227/+212
| | | | | | | | | | | | | | | * Move _Py_CODEUNIT and related functions to pycore_code.h. * Move _Py_BackoffCounter to pycore_backoff.h. * Move Include/cpython/optimizer.h content to pycore_optimizer.h. * Remove Include/cpython/optimizer.h. * Remove PyUnstable_Replace_Executor(). Rename functions: * PyUnstable_GetExecutor() => _Py_GetExecutor() * PyUnstable_GetOptimizer() => _Py_GetOptimizer() * PyUnstable_SetOptimizer() => _Py_SetTier2Optimizer() * PyUnstable_Optimizer_NewCounter() => _PyOptimizer_NewCounter() * PyUnstable_Optimizer_NewUOpOptimizer() => _PyOptimizer_NewUOpOptimizer()
* gh-121016: Add test for `PYTHON_BASIC_REPL` envioronment variable (#121017)devdanzin2024-06-263-1/+32
|
* gh-121040: Remove fallthrough warnings compiler option (gh-121041)Nate Ohlson2024-06-262-40/+0
| | | Remove fallthrough warnings
* gh-73991: Skip permission test if running as *nix superuser (GH-120994)Petr Viktorin2024-06-261-0/+1
|
* gh-121025: Improve partialmethod.__repr__ (GH-121033)Bénédikt Tran2024-06-264-10/+18
| | | It no longer contains redundant commas and spaces.
* gh-121026: Include -Werror with new compiler flag checks to ensure ↵Nate Ohlson2024-06-262-33/+25
| | | | compatibility (gh-121030)
* gh-121018: Ensure ArgumentParser.parse_args with exit_on_error=False raises ↵blhsing2024-06-263-2/+9
| | | | instead of exiting when given unrecognized arguments (GH-121019)
* gh-107803: fix thread safety issue in double linked list implementation ↵Kumar Aditya2024-06-262-4/+9
| | | | (#121007)
* gh-112301: Enable compiler flags with low performance impact and no warnings ↵Nate Ohlson2024-06-263-0/+136
| | | | (gh-120975)
* gh-120838: Add _PyThreadState_WHENCE_FINI (gh-121010)Eric Snow2024-06-258-27/+27
| | | | | We also add _PyThreadState_NewBound() and drop _PyThreadState_SetWhence(). This change only affects internal API.
* gh-120155: Fix Coverity issue in parse_string() (#120997)Victor Stinner2024-06-251-0/+5
|
* gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 and PEP ↵Alex Waygood2024-06-254-11/+132
| | | | 563 (#120272)