summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-112066: Use `PyDict_SetDefaultRef` in place of `PyDict_SetDefault`. (#112211)Sam Gross2024-02-076-25/+32
| | | | | This changes a number of internal usages of `PyDict_SetDefault` to use `PyDict_SetDefaultRef`. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-114828: Fix __class__ in class-scope inlined comprehensions (#115139)Carl Meyer2024-02-073-0/+33
|
* GH-108362: Revert "GH-108362: Incremental GC implementation (GH-108038)" ↵Mark Shannon2024-02-0713-647/+392
| | | | | | | (#115132) Revert "GH-108362: Incremental GC implementation (GH-108038)" This reverts commit 36518e69d74607e5f094ce55286188e4545a947d.
* gh-101100: Fix Py_DEBUG dangling Sphinx references (#115003)Skip Montanaro2024-02-072-8/+9
|
* gh-114505: Add missing header file dependencies (#114513)Skip Montanaro2024-02-071-241/+259
| | | Also move PYTHON_HEADERS up and make _testembed.o depend on it.
* gh-115114: Add missing slash to file URI prefix `file:/` (#115115)Edgar Ramírez Mondragón2024-02-071-1/+1
| | | Add missing slash to file URI prefix `file:/`
* gh-115106 docs: 'enum.Flag.__iter__()' did not exist prior to Python 3.11 ↵Finite State Machine2024-02-071-3/+1
| | | | | (GH-115107) change versionchanged to versionadded
* gh-115009: Update Windows installer to use SQLite 3.45.1 (#115065)Erlend E. Aasland2024-02-064-3/+4
|
* gh-112075: Add critical sections for most dict APIs (#114508)Dino Viehland2024-02-066-284/+782
| | | | | | | | | Starts adding thread safety to dict objects. Use @critical_section for APIs which are exposed via argument clinic and don't directly correlate with a public C API which needs to acquire the lock Use a _lock_held suffix for keeping changes to complicated functions simple and just wrapping them with a critical section Acquire and release the lock in an existing function where it won't be overly disruptive to the existing logic
* gh-115035: Mark ThreadHandles as non-joinable earlier after forking (#115042)Sam Gross2024-02-067-41/+50
| | | | | | This marks dead ThreadHandles as non-joinable earlier in `PyOS_AfterFork_Child()` before we execute any Python code. The handles are stored in a global linked list in `_PyRuntimeState` because `fork()` affects the entire process.
* gh-103224: Resolve paths properly in test_sysconfig (GH-103292)Artem Mukhin2024-02-061-14/+23
| | | | | | To pass tests when executed through a Python symlink. Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* #gh-75705: Set unixfrom envelope in mailbox._mboxMMDF (GH-107117)Matthieu Caneill2024-02-063-3/+15
|
* gh-112529: Stop the world around gc.get_referents (#114823)Sam Gross2024-02-061-13/+28
| | | | | | | We do not want to add locking in `tp_traverse` slot implementations. Instead, stop the world when calling `gc.get_referents`. Note that the the stop the world call is a no-op in the default build. Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* gh-112087: Make list_{count, index, contains} to be thread-safe. (gh-114916)Donghee Na2024-02-061-19/+33
|
* gh-112066: Add `PyDict_SetDefaultRef` function. (#112123)Sam Gross2024-02-067-20/+160
| | | | | | | The `PyDict_SetDefaultRef` function is similar to `PyDict_SetDefault`, but returns a strong reference through the optional `**result` pointer instead of a borrowed reference. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-114756: Update FAQ section on removing the GIL (#114957)da-woods2024-02-061-23/+29
| | | | | Update FAQ section on removing the GIL to reflect recent progress on PEP 703 and PEP 684. Co-authored-by: AN Long <aisk@users.noreply.github.com>
* gh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning (GH-106234)Nikita Sobolev2024-02-063-11/+32
|
* gh-91602: Add iterdump() support for filtering database objects (#114501)Mariusz Felisiak2024-02-0611-17/+176
| | | | | | Add optional 'filter' parameter to iterdump() that allows a "LIKE" pattern for filtering database objects to dump. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (#115038)Seth Michael Larson2024-02-062-35/+37
|
* gh-115009: Update macOS installer to use SQLite 3.45.1 (#115066)Erlend E. Aasland2024-02-062-3/+4
| | | Co-authored-by: Ned Deily <nad@python.org>
* GH-106747: Make pathlib ABC globbing more consistent with `glob.glob()` ↵Barney Gale2024-02-062-18/+18
| | | | | | | | | | | | (#115056) When expanding `**` wildcards, ensure we add a trailing slash to the topmost directory path. This matches `glob.glob()` behaviour: >>> glob.glob('dirA/**', recursive=True) ['dirA/', 'dirA/dirB', 'dirA/dirB/dirC'] This does not affect `pathlib.Path.glob()`, because trailing slashes aren't supported in pathlib proper.
* gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (#115050)Ned Deily2024-02-064-6/+9
| | | Also update multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1.
* gh-109991: Update macOS installer to use OpenSSL 3.0.13. (GH-115052)Ned Deily2024-02-062-3/+4
|
* gh-109991: Update Windows build to use OpenSSL 3.0.13 (#115043)Zachary Ware2024-02-053-4/+5
|
* gh-83648: Support deprecation of options, arguments and subcommands in ↵Serhiy Storchaka2024-02-055-27/+262
| | | | argparse (GH-114086)
* gh-114944: Fix race between `_PyParkingLot_Park` and ↵mpage2024-02-052-2/+3
| | | | | | | | | | | | | | | | | | | | | `_PyParkingLot_UnparkAll` when handling interrupts (#114945) Fix race between `_PyParkingLot_Park` and `_PyParkingLot_UnparkAll` when handling interrupts There is a potential race when `_PyParkingLot_UnparkAll` is executing in one thread and another thread is unblocked because of an interrupt in `_PyParkingLot_Park`. Consider the following scenario: 1. Thread T0 is blocked[^1] in `_PyParkingLot_Park` on address `A`. 2. Thread T1 executes `_PyParkingLot_UnparkAll` on address `A`. It finds the `wait_entry` for `T0` and unlinks[^2] its list node. 3. Immediately after (2), T0 is woken up due to an interrupt. It then segfaults trying to unlink[^3] the node that was previously unlinked in (2). To fix this we mark each waiter as unparking before releasing the bucket lock. `_PyParkingLot_Park` will wait to handle the coming wakeup, and not attempt to unlink the node, when this field is set. `_PyParkingLot_Unpark` does this already, presumably to handle this case.
* gh-82626: Emit a warning when bool is used as a file descriptor (GH-111275)Serhiy Storchaka2024-02-0511-0/+75
|
* gh-115015: Argument Clinic: fix generated code for METH_METHOD methods ↵Erlend E. Aasland2024-02-0530-68/+153
| | | | without params (#115016)
* gh-109475: Fix support of explicit option value "--" in argparse (GH-114814)Serhiy Storchaka2024-02-053-1/+19
| | | For example "--option=--".
* gh-114967: Fix "Built-in Exceptions" documentation ambiguous wording (#114968)HarryLHW2024-02-051-1/+1
| | | | | | Change the somewhat vague "listed below" to "listed in this chapter" in Doc/library/exceptions.rst. The exceptions are listed in multiple sections after two intermediate sections. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-112075: Add gc shared bits (#114931)Dino Viehland2024-02-051-0/+17
| | | Add GC shared flags for objects to the GC bit states in free-threaded builds
* GH-108362: Incremental GC implementation (GH-108038)Mark Shannon2024-02-0513-392/+647
|
* gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)Serhiy Storchaka2024-02-056-21/+106
| | | | | | | | | * When called with a single argument to get a value, it allow to omit the minus prefix. * It can be called with keyword arguments to set attributes. * w.wm_attributes(return_python_dict=True) returns a dict instead of a tuple (it will be the default in future). * Setting wantobjects to 0 no longer affects the result.
* GH-113462: Limit the number of versions that a single class can use. (GH-114900)Mark Shannon2024-02-054-1/+22
|
* gh-115026: Argument Clinic: handle PyBuffer_FillInfo errors in generated ↵Nikita Sobolev2024-02-054-10/+24
| | | | code (#115027)
* gh-115020: Remove a debugging print in test_frame (GH-115021)Kirill Podoprigora2024-02-051-1/+0
|
* Remove bogus syntax error marker in csv doc (#115017)Terry Jan Reedy2024-02-051-1/+0
|
* gh-114628: Display csv.Error without context (#115005)Terry Jan Reedy2024-02-052-2/+4
| | | | | When cvs.Error is raised when TypeError is caught, the TypeError display and 'During handling' note is just noise with duplicate information. Suppress with 'from None'.
* gh-114099: Add test exclusions to support running the test suite on iOS ↵Russell Keith-Magee2024-02-0531-150/+224
| | | | | | | | | | | | | (#114889) Add test annotations required to run the test suite on iOS (PEP 730). The majority of the change involve annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons, and including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks. `is_apple` and `is_apple_mobile` test helpers have been added to identify *any* Apple platform, and "any Apple platform except macOS", respectively.
* gh-114392: Improve test_capi.test_structmembers (GH-114393)Serhiy Storchaka2024-02-041-124/+93
| | | | | | Test all integer member types with extreme values and values outside of the valid range. Test support of integer-like objects. Test warnings for wrapped out values.
* gh-114685: PyBuffer_FillInfo() now raises on PyBUF_{READ,WRITE} (GH-114802)Nikita Sobolev2024-02-044-5/+56
|
* gh-113803: Fix inaccurate documentation for shutil.move when dst is an ↵Dai Wentao2024-02-042-16/+19
| | | | | | existing directory (#113837) * fix the usage of dst and destination in shutil.move doc * update shutil.move doc
* gh-114388: Fix an error in GH-114391 (GH-115000)Serhiy Storchaka2024-02-041-0/+2
|
* gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds ↵Serhiy Storchaka2024-02-043-11/+117
| | | | | | | | | | | "funcid" (GH-113955) Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and Canvas widgets destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now they remove only "funcid" from the binding for "sequence", keeping other commands, and delete the "funcid" command. They leave "sequence" unbound only if "funcid" was the last bound command.
* gh-114388: Fix warnings when assign an unsigned integer member (GH-114391)Serhiy Storchaka2024-02-043-28/+97
| | | | | | | * Fix a RuntimeWarning emitted when assign an integer-like value that is not an instance of int to an attribute that corresponds to a C struct member of type T_UINT and T_ULONG. * Fix a double RuntimeWarning emitted when assign a negative integer value to an attribute that corresponds to a C struct member of type T_UINT.
* gh-113280: Always close socket if SSLSocket creation failed (GH-114659)Serhiy Storchaka2024-02-043-64/+78
| | | Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* gh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.12 ↵Serhiy Storchaka2024-02-045-16/+14
| | | | | | (#106588)" (GH-114470) This reverts commit 8fc071345b50dd3de61ebeeaa287ccef21d061b2.
* gh-69893: Add the close() method for xml.etree.ElementTree.iterparse() ↵Serhiy Storchaka2024-02-045-4/+105
| | | | iterator (GH-114534)
* gh-83383: Always mark the dbm.dumb database as unmodified after open() and ↵Serhiy Storchaka2024-02-043-1/+80
| | | | | | | | sync() (GH-114560) The directory file for a newly created database is now created immediately after opening instead of deferring this until synchronizing or closing.
* gh-114071: [Enum] update docs and code for tuples/subclasses (GH-114871)Ethan Furman2024-02-044-5/+69
| | | | | | | | | | | | | | | | | | | | | | | Update documentation with `__new__` and `__init__` entries. Support use of `auto()` in tuple subclasses on member assignment lines. Previously, auto() was only supported on the member definition line either solo or as part of a tuple: RED = auto() BLUE = auto(), 'azul' However, since Python itself supports using tuple subclasses where tuples are expected, e.g.: from collections import namedtuple T = namedtuple('T', 'first second third') def test(one, two, three): print(one, two, three) test(*T(4, 5, 6)) # 4 5 6 it made sense to also support tuple subclasses in enum definitions.