]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Stanley [Wed, 21 Sep 2022 04:16:39 +0000 (21:16 -0700)]
gh-71141: Add note on rejecting "leading-dot" syntax for with statements (#96928)
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Nikita Sobolev [Wed, 21 Sep 2022 01:34:13 +0000 (04:34 +0300)]
gh-90808: add more examples to `test_sched.test_priority` (#31144)
wim glenn [Tue, 20 Sep 2022 23:31:05 +0000 (18:31 -0500)]
[Enum] fix typos (GH-96285)
Nikita Sobolev [Tue, 20 Sep 2022 23:08:39 +0000 (02:08 +0300)]
gh-95591: [Enum] use `_FlagTests` base class (GH-96475)
Виталий Дмитриев [Tue, 20 Sep 2022 19:54:33 +0000 (22:54 +0300)]
gh-96947: Fix comment on `pyruntimestate->pyinterpreters` struct for `next_id` (GH-96949)
`_next_interp_id` appeared on [this commit](https://github.com/python/cpython/commit/
e377416c10eb0bf055b0728cdcdc4488fdfd3b5f #diff-7ac11e526f79b42d6ea9d3592cb99da46775640c69fa5510f4a6de87cced7141R68) renamed to `next_id` ([by this commit](https://github.com/python/cpython/commit/
2ebc5ce42a8a9e047e790aefbf9a94811569b2b6 #diff-bccfc01bd96b58c022dde77486b8a896cbb31d7581bd4a4156b32c3654afe468R59)).
Also, now, `next_id` gets initialized in` _PyInterpreterState_Enable()` https://github.com/python/cpython/blob/
12c5f328d2479ac3432df5e266adc4e59adeabfe /Python/pystate.c#L241-L244 because `_PyInterpreterState_Init()` function doesn't exist at all.
Brandt Bucher [Tue, 20 Sep 2022 19:22:24 +0000 (12:22 -0700)]
GH-95921: Fix positions for some chained comparisons (GH-96968)
Samuel [Tue, 20 Sep 2022 12:17:40 +0000 (13:17 +0100)]
Fix minor comment typo in dictobject.c (GH-96960)
Fix a minor comment typo in the Objects/dictobject.c file.
Automerge-Triggered-By: GH:methane
Irit Katriel [Tue, 20 Sep 2022 12:14:07 +0000 (13:14 +0100)]
gh-87092: in compiler, move the detection of exception handlers before the CFG optimization stage (GH-96935)
serge-sans-paille [Tue, 20 Sep 2022 10:00:34 +0000 (10:00 +0000)]
gh-96711: Enhance SystemError message upon Invalid opcode (#96712)
Raise verbose SystemError instead of printing debug information
upon Invalid opcode.
Fix #96711
Vinay Sajip [Tue, 20 Sep 2022 08:40:06 +0000 (09:40 +0100)]
gh-96727: Document restrictions on Handler.emit() with respect to locking. (GH-96948)
Gregory P. Smith [Mon, 19 Sep 2022 23:43:11 +0000 (16:43 -0700)]
gh-96512: Update int_max_str docs to say 3.11 (#96942)
It was unknown if it'd be before 3.11.0 when creating the original
changes. It's in 3.11rc2, so 3.11 it is.
Gregory P. Smith [Mon, 19 Sep 2022 23:06:25 +0000 (16:06 -0700)]
gh-95865: Further reduce quote_from_bytes memory consumption (#96860)
on large input values. Based on Dennis Sweeney's chunking idea.
Victor Stinner [Mon, 19 Sep 2022 22:13:56 +0000 (00:13 +0200)]
gh-96387: take_gil() resets drop request before exit (#96869)
At Python exit, sometimes a thread holding the GIL can wait forever
for a thread (usually a daemon thread) which requested to drop the
GIL, whereas the thread already exited. To fix the race condition,
the thread which requested the GIL drop now resets its request before
exiting.
take_gil() now calls RESET_GIL_DROP_REQUEST() before
PyThread_exit_thread() if it called SET_GIL_DROP_REQUEST to fix a
race condition with drop_gil().
Issue discovered and analyzed by Mingliang ZHAO.
Brandt Bucher [Mon, 19 Sep 2022 21:02:24 +0000 (14:02 -0700)]
GH-96864: Check for error between line and opcode events (GH-96880)
Shantanu [Mon, 19 Sep 2022 19:09:41 +0000 (12:09 -0700)]
gh-96917: link to typing.readthedocs.io from typing.rst (#96921)
See the discussion at https://github.com/python/cpython/issues/91533
C.A.M. Gerlach [Mon, 19 Sep 2022 13:44:01 +0000 (08:44 -0500)]
gh-95913: Copyedit, link & format Typing Features section in 3.11 What's New (GH-96097)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
C.A.M. Gerlach [Mon, 19 Sep 2022 13:32:51 +0000 (08:32 -0500)]
gh-95913: Fix and copyedit New Features section of 3.11 What's New (GH-95915)
Matthias Görgens [Mon, 19 Sep 2022 07:59:13 +0000 (15:59 +0800)]
gh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915)
* gh-96821: Assert for demonstrating undefined behaviour
* Fix UB
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Raymond Hettinger [Sun, 18 Sep 2022 21:36:20 +0000 (16:36 -0500)]
GH-96851: Add link to FAQ entry for caching method calls. (GH-96902)
partev [Sun, 18 Sep 2022 21:35:22 +0000 (17:35 -0400)]
fix various typos in random module's documentation (GH-96912)
Scott Main [Sun, 18 Sep 2022 08:05:43 +0000 (01:05 -0700)]
gh-94787: [doc] Add to argparse doc an example of a mutually-exclusive group nested in an argument group (GH-94807)
Raymond Hettinger [Sun, 18 Sep 2022 02:09:39 +0000 (21:09 -0500)]
Clarify that the expression is regular math notation, not Python. (#96903)
Terry Jan Reedy [Sat, 17 Sep 2022 21:53:23 +0000 (17:53 -0400)]
gh-87179: Fix more IDLE class headers (#96899)
Remove unneeded '(object)' and '()'.
Guido van Rossum [Sat, 17 Sep 2022 21:12:45 +0000 (14:12 -0700)]
Revert "gh-87079: Warn on unintended signal wakeup fd override in `asyncio` (#96807)" (#96898)
This reverts commit
05878106989c6f5b9dd35a6c15a21bee59312827 .
Reason: This broke buildbots (some warnings added by that commit are turned to errors in the SSL buildbot).
Repro: ./python Lib/test/ssltests.py
Lysandros Nikolaou [Sat, 17 Sep 2022 17:09:28 +0000 (19:09 +0200)]
gh-91210: Improve error message when non-default param follows default (GH-95933)
- Improve error message when parameter without a default follows one with a default
- Show same error message when positional-only params precede the default/non-default sequence
Raymond Hettinger [Sat, 17 Sep 2022 16:31:04 +0000 (11:31 -0500)]
Simplify sieve() recipe. Add edge case tests. (GH-96892)
Michel Hidalgo [Sat, 17 Sep 2022 15:07:54 +0000 (12:07 -0300)]
gh-87079: Warn on unintended signal wakeup fd override in `asyncio` (#96807)
Warn on loop initialization, when setting the wakeup fd disturbs a previously set wakeup fd, and on loop closing, when upon resetting the wakeup fd, we find it has been changed by someone else.
Vinay Sajip [Sat, 17 Sep 2022 11:58:31 +0000 (14:58 +0300)]
gh-96861: Check for unset sys.executable during venv creation. (GH-96887)
Christian Heimes [Sat, 17 Sep 2022 11:23:39 +0000 (13:23 +0200)]
gh-96883: browser: include concurrent.futures (GH-96886)
Benjamin Peterson [Fri, 16 Sep 2022 18:26:02 +0000 (11:26 -0700)]
fixes gh-96841: replace Mercurial with VCS (#96879)
Victor Stinner [Fri, 16 Sep 2022 18:04:37 +0000 (20:04 +0200)]
gh-95778: Mention sys.set_int_max_str_digits() in error message (#96874)
When ValueError is raised if an integer is larger than the limit,
mention sys.set_int_max_str_digits() in the error message.
Serhiy Storchaka [Fri, 16 Sep 2022 14:37:30 +0000 (17:37 +0300)]
gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)
Previously codeop.compile_command() emitted compiler warnings (SyntaxWarning or
DeprecationWarning) and raised a SyntaxError for incomplete input containing
a potentially incorrect code. Now it always returns None for incomplete input
without emitting any warnings.
Dong-hee Na [Fri, 16 Sep 2022 10:40:05 +0000 (19:40 +0900)]
gh-89536: Use ThinLTO policy if possible (gh-96766)
Erlend E. Aasland [Thu, 15 Sep 2022 21:11:52 +0000 (23:11 +0200)]
gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (#96832)
Dennis Sweeney [Thu, 15 Sep 2022 17:31:45 +0000 (13:31 -0400)]
Fix ResourceWarning in test.test_frame (GH-96831)
adphrost [Thu, 15 Sep 2022 15:42:37 +0000 (08:42 -0700)]
GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)
Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Nikita Sobolev [Thu, 15 Sep 2022 09:33:13 +0000 (12:33 +0300)]
gh-96751: Remove dead code from `CALL_FUNCTION_EX` opcode (GH-96752)
Ruan Comelli [Thu, 15 Sep 2022 01:33:43 +0000 (22:33 -0300)]
Fix type annotation of `pstats.FunctionProfile.ncalls` (#96741)
* fix: annotate `pstats.FunctionProfile.ncalls` as `str`
This change aligns the type annotation of `pstats.FunctionProfile.ncalls` with its runtime type.
Brandt Bucher [Thu, 15 Sep 2022 00:05:04 +0000 (17:05 -0700)]
GH-90997: Improve inline cache performance for MSVC (GH-96781)
Benjamin Peterson [Wed, 14 Sep 2022 14:59:23 +0000 (07:59 -0700)]
Revert accidental removal from 3.12 doc. (gh-96826)
Yusuke Kadowaki [Wed, 14 Sep 2022 13:34:40 +0000 (22:34 +0900)]
gh-77171 Support WAVE_FORMAT_EXTENSIBLE in the wave module (GH-96777)
The test file, a modified version of Lib/test/audiodata/pluck-pcm24.wav, was provided by Andrea Celletti on the bug tracker.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Kevin Modzelewski [Wed, 14 Sep 2022 03:44:32 +0000 (23:44 -0400)]
ceval: Use _PyTuple_FromArraySteal in BUILD_TUPLE (GH-96516)
Nikita Sobolev [Wed, 14 Sep 2022 02:35:52 +0000 (05:35 +0300)]
gh-96784: Cover more typing special forms in `get_args()` (#96791)
Nikita Sobolev [Wed, 14 Sep 2022 02:35:16 +0000 (05:35 +0300)]
gh-96769: Cover more typing special forms to be unsubclassable (#96772)
Raymond Hettinger [Wed, 14 Sep 2022 02:10:47 +0000 (21:10 -0500)]
Itertools sieve() recipe (#96813)
Benjamin Peterson [Tue, 13 Sep 2022 22:45:12 +0000 (15:45 -0700)]
closes gh-96734: Update to Unicode 15.0.0. (GH-96809)
Dennis Sweeney [Tue, 13 Sep 2022 18:25:10 +0000 (14:25 -0400)]
gh-94808: improve comments and coverage of fastsearch.h (GH-96760)
Laurie O [Tue, 13 Sep 2022 15:56:08 +0000 (01:56 +1000)]
Add dataclass field default change to 3.11 what's new (#96790)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Alex Waygood [Tue, 13 Sep 2022 15:22:50 +0000 (16:22 +0100)]
gh-95778: Fix `sys.set_int_max_str_digits()` parameter name (#96798)
Discovered in https://github.com/python/typeshed/pull/8733
Matthias Görgens [Tue, 13 Sep 2022 13:14:35 +0000 (21:14 +0800)]
gh-96678: Fix UB of null pointer arithmetic (GH-96782)
Automerge-Triggered-By: GH:pablogsal
Matthias Görgens [Tue, 13 Sep 2022 12:15:11 +0000 (20:15 +0800)]
gh-96678: Avoid undefined behaviour in test (#96672)
Pablo Galindo Salgado [Tue, 13 Sep 2022 12:12:15 +0000 (13:12 +0100)]
gh-93503: Document the new tracing/profiling APIs in the What's new document (#96681)
Co-authored-by: Victor Stinner <vstinner@python.org>
Irit Katriel [Tue, 13 Sep 2022 12:03:41 +0000 (13:03 +0100)]
gh-87092: reduce redundancy and repetition in compiler's optimization stage (GH-96713)
Erlend E. Aasland [Tue, 13 Sep 2022 08:28:57 +0000 (10:28 +0200)]
gh-96702: Order methods before attrs in sqlite3.Connection docs (#96703)
Mark Shannon [Tue, 13 Sep 2022 08:25:16 +0000 (09:25 +0100)]
GH-96754: Check whether the interpreter frame is complete before creating frame object. (GH-96776)
Eric Snow [Mon, 12 Sep 2022 17:09:31 +0000 (11:09 -0600)]
gh-90110: Fix the c-analyzer Tool (gh-96731)
This includes:
* update the whitelists
* fixes so we can stop ignoring some of the files
* ensure Include/cpython/*.h get analyzed
adang1345 [Mon, 12 Sep 2022 14:23:13 +0000 (10:23 -0400)]
gh-96729: Ensure installers built with Tools/msi/buildrelease.bat have matching UUIDs with official releases (GH-96755)
zhanpon [Sun, 11 Sep 2022 19:56:30 +0000 (04:56 +0900)]
gh-96706: [doc] Don't recomment deprecated use of get_event_loop() in examples (#96707)
Christian Heimes [Sun, 11 Sep 2022 08:10:00 +0000 (10:10 +0200)]
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
Christian Heimes [Sun, 11 Sep 2022 07:51:23 +0000 (09:51 +0200)]
gh-95853: Multiple ops and debug for wasm_build.py (#96744)
Dong-hee Na [Sat, 10 Sep 2022 20:44:10 +0000 (05:44 +0900)]
gh-90751: memoryview now supports half-float (#96738)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Maksym Medvied [Sat, 10 Sep 2022 18:14:01 +0000 (22:14 +0400)]
Fix typo in 3.12 whatsnew (GH-96740)
Hendrik Makait [Sat, 10 Sep 2022 14:34:14 +0000 (16:34 +0200)]
gh-94972: document that shield users need to keep a reference to their task (#96724)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Mark Shannon [Sat, 10 Sep 2022 00:12:06 +0000 (01:12 +0100)]
GH-96678: Fix undefined behavior in ceval.c (#96708)
Brandt Bucher [Fri, 9 Sep 2022 21:43:10 +0000 (14:43 -0700)]
Replace ad-hoc labels with JUMP_TO_INSTRUCTION (GH-96634)
Brandt Bucher [Fri, 9 Sep 2022 21:42:29 +0000 (14:42 -0700)]
GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)
Gregory P. Smith [Fri, 9 Sep 2022 19:51:34 +0000 (12:51 -0700)]
gh-96710: Make the test timing more lenient for the int/str DoS regression test. (#96717)
A regression would still absolutely fail and even a flaky pass isn't
harmful as it'd fail most of the time across our N system test runs.
Windows has a low resolution timer and CI systems are prone to odd
timing so this just gives more leeway to avoid flakiness.
Kumar Aditya [Fri, 9 Sep 2022 11:33:40 +0000 (17:03 +0530)]
Fix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)
Nikita Sobolev [Fri, 9 Sep 2022 08:37:02 +0000 (11:37 +0300)]
gh-96364: Fix text signatures of `__getitem__` for `list` and `dict` (GH-96365)
Dennis Sweeney [Fri, 9 Sep 2022 03:46:13 +0000 (23:46 -0400)]
gh-96624: Fix test_dotted_but_module_not_loaded in testpatch.py (GH-96691)
* Update test_dotted_but_module_not_loaded to reflect the move of unittest.test to test.test_unittest.
Guido van Rossum [Fri, 9 Sep 2022 02:32:40 +0000 (19:32 -0700)]
GH-46412: More efficient bool() for ndbm/_gdbmmodule (#96692)
Steve Dower [Thu, 8 Sep 2022 21:02:04 +0000 (22:02 +0100)]
gh-96684: Silently suppress COM security errors in _wmi module (GH-96690)
Zachary Ware [Thu, 8 Sep 2022 18:52:07 +0000 (13:52 -0500)]
gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96689)
Automerge-Triggered-By: GH:zware
finefoot [Thu, 8 Sep 2022 18:51:44 +0000 (20:51 +0200)]
gh-92734: Add indentation feature to reprlib.Repr (GH-92735)
Mark Shannon [Thu, 8 Sep 2022 16:16:48 +0000 (17:16 +0100)]
GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
philg314 [Thu, 8 Sep 2022 11:12:14 +0000 (13:12 +0200)]
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (#96353)
Pablo Galindo Salgado [Thu, 8 Sep 2022 11:04:41 +0000 (12:04 +0100)]
gh-96143: Clear instruction cache after mprotect call (#96476)
Victor Stinner [Thu, 8 Sep 2022 10:20:22 +0000 (12:20 +0200)]
gh-96652: Fix faulthandler chained signal without sigaction() (#96666)
Fix the faulthandler implementation of faulthandler.register(signal,
chain=True) if the sigaction() function is not available: don't call
the previous signal handler if it's NULL.
Itamar Ostricher [Thu, 8 Sep 2022 08:22:32 +0000 (01:22 -0700)]
gh-96653: Remove duplicate CALL_STAT_INC(inlined_py_calls) in BINARY_SUBSCR_GETITEM (GH-96654)
Vinay Sajip [Thu, 8 Sep 2022 07:22:33 +0000 (08:22 +0100)]
gh-88287: Add BufferingFormatter documentation. (GH-96608)
Kumar Aditya [Wed, 7 Sep 2022 22:02:08 +0000 (03:32 +0530)]
GH-90699: use statically allocated interned strings in typeobject's slotdefs (GH-94706)
Steve Dower [Wed, 7 Sep 2022 21:53:33 +0000 (22:53 +0100)]
gh-96665: Fixes build break on older MSVC versions due to C++20 features in argument clinic (GH-96667)
Michael Droettboom [Wed, 7 Sep 2022 21:23:54 +0000 (17:23 -0400)]
gh-96268: Fix loading invalid UTF-8 (#96270)
This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8.
It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8.
Charlie Zhao [Wed, 7 Sep 2022 20:26:53 +0000 (04:26 +0800)]
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)
Steve Dower [Wed, 7 Sep 2022 20:09:20 +0000 (21:09 +0100)]
gh-89545: Updates platform module to use new internal _wmi module on Windows to directly query OS properties (GH-96289)
Steve Dower [Wed, 7 Sep 2022 17:01:35 +0000 (18:01 +0100)]
gh-96577: Fixes buffer overrun in _msi module (GH-96633)
Raymond Hettinger [Wed, 7 Sep 2022 15:31:50 +0000 (10:31 -0500)]
GH-96465: Cache hashes for Fraction instances (GH-96483)
Irit Katriel [Wed, 7 Sep 2022 13:01:57 +0000 (14:01 +0100)]
gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one place (GH-96513)
Michael Droettboom [Wed, 7 Sep 2022 11:51:50 +0000 (07:51 -0400)]
gh-94808: Improve coverage of _PyBytes_FormatEx (GH-95895)
There were two specific areas not covered:
- %(name) syntax
- %*s syntax
Automerge-Triggered-By: GH:iritkatriel
Nikita Sobolev [Wed, 7 Sep 2022 11:13:07 +0000 (14:13 +0300)]
gh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)
Brandt Bucher [Wed, 7 Sep 2022 04:07:20 +0000 (21:07 -0700)]
GH-91432: Remove the iterator_exhausted_no_error label (GH-96517)
Dennis Sweeney [Tue, 6 Sep 2022 23:37:18 +0000 (19:37 -0400)]
gh-96538: Fix refleak in _bisectmodule.c (gh-96619)
Irit Katriel [Tue, 6 Sep 2022 23:24:34 +0000 (00:24 +0100)]
gh-96628: remove deprecated and ignored arg of sysconfig.is_python_build() (GH-96629)
Michael Droettboom [Tue, 6 Sep 2022 23:12:16 +0000 (19:12 -0400)]
gh-96611: Fix error message for invalid UTF-8 in mid-multiline string (#96623)
Kumar Aditya [Tue, 6 Sep 2022 18:02:41 +0000 (23:32 +0530)]
GH-96572: fix use after free in trace refs build mode (#96618)
Mark Shannon [Tue, 6 Sep 2022 16:37:47 +0000 (17:37 +0100)]
GH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613)
Jelle Zijlstra [Tue, 6 Sep 2022 16:33:09 +0000 (09:33 -0700)]
gh-96478: Fix new test when run in refleak mode (#96615)
./python.exe -m test -R : test.test_typing would fail, apparently
because the dictionary used in the @patch decorator was modified.
Mark Shannon [Tue, 6 Sep 2022 15:45:43 +0000 (16:45 +0100)]
GH-96569: Add two NULL checks to avoid undefined behavior. (GH-96585)
Brandt Bucher [Tue, 6 Sep 2022 11:11:38 +0000 (04:11 -0700)]
GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)
Nikita Sobolev [Mon, 5 Sep 2022 21:35:05 +0000 (00:35 +0300)]
gh-96478: Test `@overload` on C functions (#96479)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>