summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-96670: Raise SyntaxError when parsing NULL bytes (#97594)Pablo Galindo Salgado2022-09-2710-21/+65
|
* gh-96959: Update more HTTP links (GH-97536)Serhiy Storchaka2022-09-2722-101/+101
| | | | Use HTTPS for documents which are available by both HTTP and HTTPS links, but there is no redirection from HTTP to HTTPS or vice versa.
* gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Serhiy Storchaka2022-09-276-3/+58
| | | | | | Previously, checkbuttons in different parent widgets could have the same short name and share the same state if arguments "name" and "variable" are not specified. Now they are globally unique.
* gh-97545: Make Semaphore run faster. (#97549)Cyker Way2022-09-263-23/+19
|
* GH-65046: Fix docs about logging in `asyncio` (#97559)Kumar Aditya2022-09-261-0/+4
| | | Explain that logging should not use network I/O.
* bpo-38748: Add ctypes test for stack corruption due to misaligned arguments ↵Michael Curran2022-09-262-0/+26
| | | | (GH-26204)
* Fix typo in docstring and remove duplicate signal.h include in ↵chgnrdv2022-09-261-2/+1
| | | | | faulthandler.c (#96720) This fix corrects a typo in dump_traceback_later function docstring and removes duplicate signal.h include directive
* gh-96848: Fix -X int_max_str_digits option parsing (#96988)Victor Stinner2022-09-263-1/+7
| | | | | Fix command line parsing: reject "-X int_max_str_digits" option with no value (invalid) when the PYTHONINTMAXSTRDIGITS environment variable is set to a valid limit.
* gh-82530: Create blank function instead of invalid import for email example ↵Stanley2022-09-261-5/+9
| | | | | (#97529) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Reject invalid opcode names in assertInBytecode (GH-97548)Dennis Sweeney2022-09-251-0/+2
|
* GH-78724: Initialize struct.Struct in __new__ (GH-94532)Kumar Aditya2022-09-254-41/+49
| | | | Closes https://github.com/python/cpython/issues/75960 Closes https://github.com/python/cpython/issues/78724
* gh-96735: Fix undefined behaviour in struct unpacking functions (#96739)Mark Dickinson2022-09-252-26/+71
| | | | | | | | | | This PR fixes undefined behaviour in the struct module unpacking support functions `bu_longlong`, `lu_longlong`, `bu_int` and `lu_int`; thanks to @kumaraditya303 for finding these. The fix is to accumulate the bytes in an unsigned integer type instead of a signed integer type, then to convert to the appropriate signed type. In cases where the width matches, that conversion will typically be compiled away to a no-op. (Evidence from Godbolt: https://godbolt.org/z/5zvxodj64 .) To make the conversions efficient, I've specialised the relevant functions for their output size: for `bu_longlong` and `lu_longlong`, this only entails checking that the output size is indeed `8`. But `bu_int` and `lu_int` were used for format sizes `2` and `4` - I've split those into two separate functions each. No tests, because all of the affected cases are already exercised by the test suite.
* gh-90716: Refactor PyLong_FromString to separate concerns (GH-96808)Oscar Benjamin2022-09-252-258/+299
| | | | | | | | | | | This is a preliminary PR to refactor `PyLong_FromString` which is currently quite messy and has spaghetti like code that mixes up different concerns as well as duplicating logic. In particular: - `PyLong_FromString` now only handles sign, base and prefix detection and calls a new function `long_from_string_base` to parse the main body of the string. - The `long_from_string_base` function handles all string validation and then calls `long_from_binary_base` or a new function `long_from_non_binary_base` to construct the actual `PyLong`. - The existing `long_from_binary_base` function is simplified by factoring duplicated logic to `long_from_string_base`. - The new function `long_from_non_binary_base` factors out much of the code from `PyLong_FromString` including in particular the quadratic algorithm reffered to in gh-95778 so that this can be seen separately from unrelated concerns such as string validation.
* gh-97519: Synchronize links in other copies of HISTORY OF THE SOFTWARE ↵Serhiy Storchaka2022-09-253-8/+8
| | | | | | | (GH-97520) HTTP links in the "HISTORY OF THE SOFTWARE" section of Doc/license.rst were converted to HTTPS in f62ff97f31a775cc7956adeae32c14e7c85bdc15. But there were other copies of these links, which were left HTTP links.
* gh-97527: IDLE: protect macosx Tk() call when no GUI (#97530)Terry Jan Reedy2022-09-241-13/+17
| | | | | Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui') does not raise. This function can be called as an unintended side-effect of calling other idlelib code as part of tests on macOS without a GUI enabled.
* gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961)Serhiy Storchaka2022-09-2424-63/+63
|
* gh-94808: Coverage: Test uppercase string literal prefixes (GH-95925)Michael Droettboom2022-09-241-0/+7
|
* gh-77171: Fixes SubFormat check to compare the entire value. Add docs (GH-97509)Steve Dower2022-09-233-6/+21
|
* gh-96965: Update Windows release to libffi 3.4.3 (GH-97512)Steve Dower2022-09-233-4/+5
|
* gh-75608: Add Windows FAQ entry for missing UCRT (GH-92765)Stanley2022-09-231-0/+8
|
* gh-96761: Fix build process of the clang compiler for _bootstrap_python ↵Dong-hee Na2022-09-233-4/+43
| | | | | (gh-96945) Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
* gh-96397: Document that keywords in calls need not be identifiers (#96393)Jeff Allen2022-09-221-2/+12
| | | | This represents the official SC stance, see https://github.com/python/steering-council/issues/142#issuecomment-1252172695
* GH-85760: Fix race in calling process_exited callback too early (#97009)Kumar Aditya2022-09-222-1/+3
|
* gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (#93222)Cyker Way2022-09-223-22/+143
| | | | | | | | | The main problem was that an unluckily timed task cancellation could cause the semaphore to be stuck. There were also doubts about strict FIFO ordering of tasks allowed to pass. The Semaphore implementation was rewritten to be more similar to Lock. Many tests for edge cases (including cancellation) were added.
* GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97003)Brandt Bucher2022-09-224-3/+79
|
* include OrderedDict import in TimeBoundedLRU example (GH-96962)Harry2022-09-221-0/+1
|
* gh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006)Dong-hee Na2022-09-228-17/+28
| | | Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* Doc: fix link redirect (GH-96606)partev2022-09-211-1/+1
| | | "Hyperbolic_function" -> "Hyperbolic_functions"
* gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291)Stanley2022-09-212-1/+12
|
* gh-96954: Add tests for unicodedata.name/lookup (#96955)Batuhan Taskaya2022-09-211-1/+9
| | | | | | | They were undertested, and since #96954 might involve a rewrite of this part of the code we want to ensure that there won't be any behavioral change. Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
* gh-71141: Add note on rejecting "leading-dot" syntax for with statements ↵Stanley2022-09-211-0/+4
| | | | | (#96928) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* gh-90808: add more examples to `test_sched.test_priority` (#31144)Nikita Sobolev2022-09-211-4/+17
|
* [Enum] fix typos (GH-96285)wim glenn2022-09-201-2/+2
|
* gh-95591: [Enum] use `_FlagTests` base class (GH-96475)Nikita Sobolev2022-09-201-4/+4
|
* gh-96947: Fix comment on `pyruntimestate->pyinterpreters` struct for ↵Виталий Дмитриев2022-09-201-2/+2
| | | | | | | `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.
* GH-95921: Fix positions for some chained comparisons (GH-96968)Brandt Bucher2022-09-203-0/+28
|
* Fix minor comment typo in dictobject.c (GH-96960)Samuel2022-09-201-1/+1
| | | | | Fix a minor comment typo in the Objects/dictobject.c file. Automerge-Triggered-By: GH:methane
* gh-87092: in compiler, move the detection of exception handlers before the ↵Irit Katriel2022-09-201-16/+32
| | | | CFG optimization stage (GH-96935)
* gh-96711: Enhance SystemError message upon Invalid opcode (#96712)serge-sans-paille2022-09-202-3/+16
| | | | | | Raise verbose SystemError instead of printing debug information upon Invalid opcode. Fix #96711
* gh-96727: Document restrictions on Handler.emit() with respect to locking. ↵Vinay Sajip2022-09-201-0/+16
| | | | (GH-96948)
* gh-96512: Update int_max_str docs to say 3.11 (#96942)Gregory P. Smith2022-09-198-36/+11
| | | | 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.
* gh-95865: Further reduce quote_from_bytes memory consumption (#96860)Gregory P. Smith2022-09-193-1/+16
| | | on large input values. Based on Dennis Sweeney's chunking idea.
* gh-96387: take_gil() resets drop request before exit (#96869)Victor Stinner2022-09-192-0/+16
| | | | | | | | | | | | | 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.
* GH-96864: Check for error between line and opcode events (GH-96880)Brandt Bucher2022-09-193-1/+17
|
* gh-96917: link to typing.readthedocs.io from typing.rst (#96921)Shantanu2022-09-191-0/+5
| | | See the discussion at https://github.com/python/cpython/issues/91533
* gh-95913: Copyedit, link & format Typing Features section in 3.11 What's New ↵C.A.M. Gerlach2022-09-191-23/+50
| | | | | | | (GH-96097) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-95913: Fix and copyedit New Features section of 3.11 What's New (GH-95915)C.A.M. Gerlach2022-09-192-35/+40
|
* gh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915)Matthias Görgens2022-09-192-1/+4
| | | | | | | * gh-96821: Assert for demonstrating undefined behaviour * Fix UB Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-96851: Add link to FAQ entry for caching method calls. (GH-96902)Raymond Hettinger2022-09-182-0/+5
|
* fix various typos in random module's documentation (GH-96912)partev2022-09-181-4/+4
|