summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add --with-lto back to Linux JIT CI (GH-120921)Savannah Ostrowski2024-06-241-4/+2
|
* GH-119054: Add "Permissions and ownership" section to pathlib docs. (#120505)Barney Gale2024-06-241-47/+51
| | | | | | Add dedicated subsection for `pathlib.owner()`, `group()`, `chmod()` and `lchmod()`. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-120858: PyDict_Next should not lock the dict (#120859)Sam Gross2024-06-244-8/+34
| | | | | | | | | PyDict_Next no longer locks the dictionary in the free-threaded build. Locking around individual PyDict_Next calls is not sufficient because the function returns borrowed references and because it allows concurrent modifications during the iteraiton loop. The internal locking also interferes with correct external synchronization because it may suspend outer critical sections created by the caller.
* gh-120860: Fix a few bugs in `type_setattro` error paths. (#120861)Sam Gross2024-06-241-37/+41
| | | | | | Moves the logic to update the type's dictionary to its own function in order to make the lock scoping more clear. Also, ensure that `name` is decref'd on the error path.
* Fix typos in comments (#120821)Xie Yanbo2024-06-248-10/+10
|
* gh-120834: fix over-allocation in PyGenObject, PyCoroObject, ↵Irit Katriel2024-06-241-3/+3
| | | | PyAsyncGenObject. (#120941)
* gh-120956: Avoid comparison of int to Py_ssize_t in parser (#120959)Lysandros Nikolaou2024-06-242-117/+117
|
* Fixes loop variables to be the same types as their limit (GH-120958)Steve Dower2024-06-2414-26/+26
|
* gh-119182: Add PyUnicodeWriter_WriteUCS4() function (#120849)Victor Stinner2024-06-247-6/+131
|
* GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854)Brandt Bucher2024-06-245-12/+7
|
* gh-119521: Use `PyAPI_DATA`, not `extern`, for `_PyExc_IncompleteInputError` ↵Petr Viktorin2024-06-241-1/+2
| | | | (GH-120955)
* gh-70278: Fix PyUnicode_FromFormat() with precision for %s and %V (GH-120365)Serhiy Storchaka2024-06-243-4/+59
| | | | | | PyUnicode_FromFormat() no longer produces the ending \ufffd character for truncated C string when use precision with %s and %V. It now truncates the string before the start of truncated multibyte sequences.
* docs: puremagic.what() as replacement for imghdr.what() (#120871)Christian Clauss2024-06-241-0/+3
|
* gh-120373: Mark test_audit.test_http as requiring the network resource (#120374)Itamar Oren2024-06-241-0/+1
|
* gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove ↵Pablo Galindo Salgado2024-06-2411-17/+20
| | | | | | | from public API/ABI (GH-119680) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-120834: fix type of *_iframe field in _PyGenObject_HEAD declaration (#120835)Irit Katriel2024-06-2412-79/+81
|
* gh-119614: Fix truncation of strings with embedded null characters in ↵Serhiy Storchaka2024-06-244-7/+68
| | | | | | | Tkinter (GH-120909) Now the null character is always represented as \xc0\x80 for Tcl_NewStringObj().
* gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage ↵Alek Kowalczyk2024-06-241-0/+8
| | | | | | | and implications. (#112191) Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709)Serhiy Storchaka2024-06-243-3/+15
| | | | | The integer part of the timestamp can be rounded up, while the millisecond calculation truncates, causing the log timestamp to be wrong by up to 999 ms (affected roughly 1 in 8 million timestamps).
* Use _PyLong_IsNegative instead of _PyLong_Sign if appropriate. (GH-120493)Serhiy Storchaka2024-06-243-7/+3
| | | It is faster and more obvious.
* GH-73991: Add `pathlib.Path.copytree()` (#120718)Barney Gale2024-06-236-0/+231
| | | | | | | | | | | | | | | | | | | | Add `pathlib.Path.copytree()` method, which recursively copies one directory to another. This differs from `shutil.copytree()` in the following respects: 1. Our method has a *follow_symlinks* argument, whereas shutil's has a *symlinks* argument with an inverted meaning. 2. Our method lacks something like a *copy_function* argument. It always uses `Path.copy()` to copy files. 3. Our method lacks something like a *ignore_dangling_symlinks* argument. Instead, users can filter out danging symlinks with *ignore*, or ignore exceptions with *on_error* 4. Our *ignore* argument is a callable that accepts a single path object, whereas shutil's accepts a path and a list of child filenames. 5. We add an *on_error* argument, which is a callable that accepts an `OSError` instance. (`Path.walk()` also accepts such a callable). Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* Docs makefile/RTD: Use uv if installed (#120711)Hugo van Kemenade2024-06-232-6/+22
|
* gh-120910: Fix issue resolving relative paths outside site-packages. (#120911)Jason R. Coombs2024-06-234-1/+38
| | | Incorporates changes from importlib_metadata 7.2.1.
* Typing docs: normalize some indents in code examples (#120912)Nyakku Shigure2024-06-231-4/+5
|
* gh-101830: Fix Tcl_Obj to string conversion (GH-120884)Serhiy Storchaka2024-06-233-22/+78
| | | | | Accessing the Tkinter object's string representation no longer converts the underlying Tcl object to a string on Windows.
* GH-120804: add docs for removal for asyncio child watchers (#120895)Kumar Aditya2024-06-237-214/+31
| | | Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
* GH-120804: Remove `PidfdChildWatcher`, `ThreadedChildWatcher` and ↵Kumar Aditya2024-06-235-259/+39
| | | | `AbstractChildWatcher` from asyncio APIs (#120893)
* gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` ↵Nice Zombies2024-06-231-1/+1
| | | | (#120898)
* GH-120804: Remove `get_child_watcher` and `set_child_watcher` from asyncio ↵Kumar Aditya2024-06-236-227/+18
| | | | (#120818)
* GH-107803: double linked list implementation for asyncio tasks (GH-107804)Kumar Aditya2024-06-228-97/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * linked list * add tail optmiization to linked list * wip * wip * wip * more fixes * finally it works * add tests * remove weakreflist * add some comments * reduce code duplication in _asynciomodule.c * address some review comments * add invariants about the state of the linked list * add better explanation * clinic regen * reorder branches for better branch prediction * Update Modules/_asynciomodule.c * Apply suggestions from code review Co-authored-by: Itamar Oren <itamarost@gmail.com> * fix capturing of eager tasks * add comment to task finalization * fix tests and couple c implmentation to c task improved linked-list logic and more comments * fix test --------- Co-authored-by: Itamar Oren <itamarost@gmail.com>
* gh-119182: Add checks to PyUnicodeWriter APIs (#120870)Victor Stinner2024-06-221-0/+13
|
* gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877)Serhiy Storchaka2024-06-223-36/+104
|
* gh-120873: Add test for "state" option in ttk.Scale (GH-120874)Serhiy Storchaka2024-06-221-12/+10
| | | Also refactor the "state" option tests for other ttk widgets.
* gh-119182: Use PyUnicodeWriter_WriteWideChar() (#120851)Victor Stinner2024-06-221-6/+8
| | | Use PyUnicodeWriter_WriteWideChar() in PyUnicode_FromFormat()
* gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824)Serhiy Storchaka2024-06-226-137/+250
| | | | | | | | | | | | | | | | | | | | | | The tests are now passed with the current version of Tcl/Tk under development (8.7b1+ and 9.0b3+). The following changes were also made to make the tests more flexible: * Helper methods like checkParam() now interpret the expected error message as a regular expression instead of a literal. * Add support of new arguments in checkEnumParam(): - allow_empty=True skips testing with empty string; - fullname= specifies the name for error message if it differs from the option name; - sort=True sorts values for error message. * Add support of the allow_empty argument in checkReliefParam(): allow_empty=True adds an empty string to the list of accepted values. * Attributes _clip_highlightthickness, _clip_pad and _clip_borderwidth specify how negative values of options -highlightthickness, -padx, -pady and -borderwidth are handled. * Use global variables for some common error messages. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-119344: Make critical section API public (#119353)Sam Gross2024-06-2115-225/+459
| | | | | | | | | | This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once. * `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()` * `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()` The supporting functions and structs used by the macros are also exposed for cases where C macros are not available.
* gh-120838: Add a Note in the Docs About Expectations for Py_Finalize() ↵Eric Snow2024-06-211-3/+10
| | | | (gh-120839)
* gh-119003: Clarify slice assignments (#119935)Nice Zombies2024-06-211-1/+1
|
* Amend categories of @nineteendo's news entries (#120735)Nice Zombies2024-06-214-93/+93
|
* gh-119182: Rewrite PyUnicodeWriter tests in Python (#120845)Victor Stinner2024-06-212-262/+336
|
* gh-119182: Add PyUnicodeWriter_DecodeUTF8Stateful() (#120639)Victor Stinner2024-06-215-68/+332
| | | | | | Add PyUnicodeWriter_WriteWideChar() and PyUnicodeWriter_DecodeUTF8Stateful() functions. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-120811: Fix reference leak upon `_PyContext_Exit` failure (#120812)Peter2024-06-212-0/+2
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-120782: Update internal type cache when reloading datetime (#120829)neonene2024-06-213-0/+24
|
* gh-113993: Allow interned strings to be mortal, and fix related issues ↵Petr Viktorin2024-06-2142-1136/+2460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-120520) * Add an InternalDocs file describing how interning should work and how to use it. * Add internal functions to *explicitly* request what kind of interning is done: - `_PyUnicode_InternMortal` - `_PyUnicode_InternImmortal` - `_PyUnicode_InternStatic` * Switch uses of `PyUnicode_InternInPlace` to those. * Disallow using `_Py_SetImmortal` on strings directly. You should use `_PyUnicode_InternImmortal` instead: - Strings should be interned before immortalization, otherwise you're possibly interning a immortalizing copy. - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in backports, as they are now part of public API and version-specific ABI. * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery. * Make sure the statically allocated string singletons are unique. This means these sets are now disjoint: - `_Py_ID` - `_Py_STR` (including the empty string) - one-character latin-1 singletons Now, when you intern a singleton, that exact singleton will be interned. * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic). * Intern `_Py_STR` singletons at startup. * For free-threaded builds, intern `_Py_LATIN1_CHR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
* gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and ↵Bénédikt Tran2024-06-213-21/+81
| | | | `bytearray` objects in protocol version 5. (GH-120422)
* gh-120773: document introspective attributes of an async generator object in ↵blhsing2024-06-211-214/+227
| | | | the inspect module (#120778)
* gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (#120442)Nikita Sobolev2024-06-214-12/+58
|
* GH-120804: Remove SafeChildWatcher, FastChildWatcher and ↵Kumar Aditya2024-06-215-1041/+4
| | | | | MultiLoopChildWatcher from asyncio (#120805) Remove SafeChildWatcher, FastChildWatcher and MultiLoopChildWatcher from asyncio. These child watchers have been deprecated since Python 3.12. The tests are also removed and some more tests will be added after the rewrite of child watchers.
* gh-111259: Document idiomatic RE pattern (?s:.) that matches any character ↵Serhiy Storchaka2024-06-201-1/+1
| | | | (GH-120745)
* gh-119182: Use public PyUnicodeWriter in contextvar_tp_repr() (#120809)Victor Stinner2024-06-201-32/+15
| | | | The public PyUnicodeWriter API enables overallocation by default and so is more efficient. It also makes the code simpler and shorter.