summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* gh-119182: Optimize PyUnicode_FromFormat() (#120796)Victor Stinner2024-06-201-26/+26
| | | | Use strchr() and ucs1lib_find_max_char() to optimize the code path formatting sub-strings between '%' formats.
* gh-120801: Refactor importlib.metadata fixtures. (#120803)Jason R. Coombs2024-06-204-28/+11
| | | | These changes released with importlib_metadata 7.2.0.
* gh-119182: Use public PyUnicodeWriter API in union_repr() (#120797)Victor Stinner2024-06-201-24/+30
| | | | | | | | | | | | | | | The public PyUnicodeWriter API enables overallocation by default and so is more efficient. Benchmark: python -m pyperf timeit \ -s 't = int | float | complex | str | bytes | bytearray' \ ' | memoryview | list | dict' \ 'str(t)' Result: 1.29 us +- 0.02 us -> 1.00 us +- 0.02 us: 1.29x faster
* gh-119182: Use public PyUnicodeWriter API in ga_repr() (#120799)Victor Stinner2024-06-201-33/+35
| | | | | | | | | | | | | | | The public PyUnicodeWriter API enables overallocation by default and so is more efficient. Benchmark: python -m pyperf timeit \ -s 't = list[int, float, complex, str, bytes, bytearray, ' \ 'memoryview, list, dict]' \ 'str(t)' Result: 1.49 us +- 0.03 us -> 1.10 us +- 0.02 us: 1.35x faster
* gh-120769: Add pdb meta command to print frame status. (#120770)Tian Gao2024-06-203-9/+49
|
* gh-117511: Make PyMutex public in the non-limited API (#117731)Sam Gross2024-06-2018-110/+185
|
* gh-120780: Show attribute name for LOAD_SPECIAL in dis output (#120781)Jelle Zijlstra2024-06-206-7/+59
|
* gh-98442: fix locations of with statement's cleanup instructions (#120763)Irit Katriel2024-06-203-1/+38
| | | gh-98442: fix location of with statement's cleanup instructions
* gh-111259: Optimize complementary character sets in RE (GH-120742)Serhiy Storchaka2024-06-204-13/+50
| | | | | Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
* gh-119698: symtable: Fix merge race (#120779)Jelle Zijlstra2024-06-201-1/+1
|
* gh-119698: fix `symtable.Class.get_methods` and document its behaviour ↵Bénédikt Tran2024-06-204-6/+187
| | | | | | | correctly (#120151) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Fix typos in comments (#120481)Xie Yanbo2024-06-204-5/+5
|
* GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120604)Xarblu2024-06-202-1/+3
|
* gh-120606: Allow EOF to exit pdb commands definition (#120607)Tian Gao2024-06-193-0/+9
|
* gh-120732: Fix `name` passing to `Mock`, when using kwargs to ↵Nikita Sobolev2024-06-193-7/+13
| | | | `create_autospec` (#120737)
* gh-118820: Zero-valued flag enum has no name (GH-118848)Nice Zombies2024-06-191-0/+8
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Regen ``Doc/requirements-oldest-sphinx.txt`` (#120753)Kirill Podoprigora2024-06-191-4/+4
|
* gh-120521: clarify except* documentation to allow tuples (#120523)Danny Yang2024-06-191-9/+10
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-119786: move locations doc to InternalDocs (#120445)Irit Katriel2024-06-192-6/+8
|