Tian Gao
e91ef13861
gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)
...
Log call events in sys.setprofile when it is a method with a C function.
2024-07-23 15:25:26 -07:00
Jelle Zijlstra
7b7b90d1ce
gh-119180: Add `annotationlib` module to support PEP 649 ( #119891 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-23 21:16:50 +00:00
Serhiy Storchaka
4606eff0aa
gh-122129: Improve support of method descriptors and wrappers in the help title (GH-122157)
2024-07-23 20:45:21 +03:00
Serhiy Storchaka
e6b25e9a09
gh-122163: Add notes for JSON serialization errors (GH-122165)
...
This allows to identify the source of the error.
2024-07-23 20:02:54 +03:00
Sebastian Rittau
375c9f6dfb
gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` ( #122086 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-23 10:59:28 +01:00
Donghee Na
a9bb3c7b3b
gh-121996: Introduce --disable-safety and --enable-slower-safety options ( #122054 )
...
* gh-121996: Introduce --disable-safty and --enable-slower-safty
* Update GA
* fix
* Address code review
* Update CI
2024-07-23 09:22:04 +09:00
Jelle Zijlstra
2762c6cc5e
gh-121637: Syntax error for optimized-away incorrect await ( #121656 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-22 14:12:43 -07:00
HarryLHW
2408a8a22b
gh-121795: Improve performance of set membership testing from set arguments ( #121796 )
2024-07-22 10:05:23 -05:00
Bénédikt Tran
c09d4c4a26
gh-119698: deprecate ``symtable.Class.get_methods`` ( #121902 )
2024-07-22 07:04:17 -07:00
Łukasz Langa
dc93d1125f
gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958)
...
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
2024-07-22 13:04:08 +02:00
Russell Keith-Magee
728432c804
gh-120522: Apply App Store compliance patch during installation ( #121947 )
...
Adds a --with-app-store-compliance configuration option that patches out code known to be an issue with App Store review processes. This option is applied automatically on iOS, and optionally on macOS.
2024-07-22 07:36:08 +08:00
Barney Gale
094375b9b7
GH-73991: Add `pathlib.Path.rmtree()` ( #119060 )
...
Add a `Path.rmtree()` method that removes an entire directory tree, like
`shutil.rmtree()`. The signature of the optional *on_error* argument
matches the `Path.walk()` argument of the same name, but differs from the
*onexc* and *onerror* arguments to `shutil.rmtree()`. Consistency within
pathlib is probably more important.
In the private pathlib ABCs, we add an implementation based on `walk()`.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-20 20:14:13 +00:00
Pablo Galindo Salgado
2009e25e26
gh-122026: Fix identification of mismatched parentheses inside f-strings ( #122028 )
2024-07-19 19:08:08 +02:00
Rodrigo Oliveira
d66b06107b
gh-118830: Bump pickle.DEFAULT_PROTOCOL to 5 (GH-119340)
2024-07-19 16:47:10 +02:00
Serhiy Storchaka
1a0c7b9ba4
gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907)
2024-07-19 08:06:02 +00:00
Serhiy Storchaka
c8d2630995
gh-82017: Support as_integer_ratio() in the Fraction constructor (GH-120271)
...
Any objects that have the as_integer_ratio() method (e.g. numpy.float128)
can now be converted to a fraction.
2024-07-19 08:06:53 +03:00
Tian Gao
1ab1778283
gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free ( #120297 )
2024-07-18 12:47:22 -07:00
Nate Ohlson
bdab67e1c7
gh-112301: Add fortify source level 3 to default compiler options (gh-121520)
2024-07-19 01:06:51 +09:00
Matthieu Caneill
cecaceea31
gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
2024-07-18 14:48:05 +02:00
Jelle Zijlstra
63ddd28cf3
gh-121921: Make bogus_code_obj.py crash the interpreter ( #121922 )
2024-07-18 04:02:08 -04:00
Alex Waygood
ac07451116
gh-120678: pyrepl: Include globals from modules passed with `-i` (GH-120904)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 16:18:42 +02:00
Terry Jan Reedy
58753f33e4
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz ( #121876 )
...
Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width'). IDLE does not access them
and they are private implementation details.
2024-07-17 09:33:33 -04:00
Brett Cannon
f589f263bc
GH-120371: Add WASI SDK 22 support (GH-121870)
...
Required disabling stub functions now provided by wasi-libc.
2024-07-16 20:00:39 +00:00
Tian Gao
e65cb4c6f0
gh-118934: Make PyEval_GetLocals return borrowed reference ( #119769 )
...
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-07-16 12:17:47 -07:00
Sam Gross
162b41f577
gh-121860: Fix crash when materializing managed dict ( #121866 )
...
The object's inline values may be marked invalid if the materialized
dict was already initialized and then deleted.
2024-07-16 14:58:36 -04:00
Pablo Galindo Salgado
c46d64e0ef
gh-121130: Fix f-string format specifiers with debug expressions ( #121150 )
2024-07-16 19:57:22 +01:00
Andreas Stocker
8f2532168b
gh-59022: Added tests for `pkgutil.extend_path` ( #59022 ) (GH-121673)
...
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
2024-07-16 17:14:26 +02:00
Petr Viktorin
263c7e611b
gh-121160: Add some tests for readline.set_history_length (GH-121326)
2024-07-16 16:09:08 +02:00
Petr Viktorin
b4aedb23ae
gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API ( #121364 )
...
* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs
* Document immortality in some functions that take `const char *`
This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.
Always point out a non-immortalizing alternative.
* Don't immortalize user-provided attr names in _ctypes
2024-07-16 15:36:21 +02:00
Petr Viktorin
956270d08d
gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)
...
Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
2024-07-16 15:17:29 +02:00
Ned Deily
f27593a87c
gh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch out problematic code" (gh-120984) ( #121844 )
...
This reverts commit 48cd104b0c
prior
to the release of 3.13.0b4 to allow for additional review time.
2024-07-16 06:49:36 -04:00
Russell Keith-Magee
7e91e0dcfe
gh-120831: Increase the default minimum supported iOS version to 13.0 ( #121250 )
...
Increases the default minimum iOS version to 13.0.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-16 12:23:35 +08:00
Marta Gómez Macías
498a94c198
gh-121295: Fix blocked console after interrupting a long paste (GH-121815)
2024-07-16 01:38:54 +02:00
Tian Gao
2b1b68939b
gh-121814: Only check f_trace_opcodes if Python frame exists ( #121818 )
...
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2024-07-15 16:11:02 -07:00
Sam Gross
d23be3947c
gh-121794: Don't set `ob_tid` to zero in fast-path dealloc ( #121799 )
...
We should maintain the invariant that a zero `ob_tid` implies the
refcount fields are merged.
* Move the assignment in `_Py_MergeZeroLocalRefcount` to immediately
before the refcount merge.
* Update `_PyTrash_thread_destroy_chain` to set `ob_ref_shared` to
`_Py_REF_MERGED` when setting `ob_tid` to zero.
Also check this invariant with assertions in the GC in debug builds.
That uncovered a bug when running out of memory during GC.
2024-07-15 17:50:10 -04:00
Sergey B Kirpichev
05d413764c
gh-121245: Refactor site.register_readline() (GH-121659)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-15 22:12:41 +02:00
Rodrigo Girão Serrão
6522f0e438
gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754)
2024-07-15 19:47:56 +02:00
Serhiy Storchaka
94bee45dee
gh-84978: Add float.from_number() and complex.from_number() (GH-26827)
...
They are alternate constructors which only accept numbers
(including objects with special methods __float__, __complex__
and __index__), but not strings.
2024-07-15 16:07:00 +00:00
Dominic H
8303d32ff5
gh-117765: Improve documentation for `mocker.patch.dict` ( #121755 )
2024-07-15 07:14:17 +00:00
Jelle Zijlstra
50eec501fe
gh-57141: Make shallow argument to filecmp.dircmp keyword-only ( #121767 )
...
It is our general practice to make new optional parameters keyword-only,
even if the existing parameters are all positional-or-keyword. Passing
this parameter as positional would look confusing and could be error-prone
if additional parameters are added in the future.
2024-07-14 15:53:32 -07:00
Samuel Thibault
d005f2c186
gh-121731: Fix mimalloc compile error on GNU/Hurd ( #121732 )
2024-07-14 12:50:25 -04:00
Dominic H
26dfb27712
gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750)
2024-07-14 10:11:10 +00:00
Bruno Lima
04130b290b
gh-121562: optimized hex_from_char ( #121563 )
...
Performance improvement to `float.fromhex`: use a lookup table
for computing the hexadecimal value of a character, in place of the
previous switch-case construct. Patch by Bruno Lima.
2024-07-14 10:05:35 +01:00
Gregor
178e44de8f
gh-121657: Display correct error message for yield from outside of a function (GH-121680)
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-13 17:14:39 +02:00
Pablo Galindo Salgado
4b9e10d0ea
gh-121499: Fix multi-line history rendering in the REPL ( #121531 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-07-13 12:54:10 +02:00
Marta Gómez Macías
e745996b2d
gh-121609: Fix pasting of characters containing unicode character joiner ( #121667 )
2024-07-13 10:44:18 +00:00
Bas Bloemsaat
0759cecd9d
gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663)
...
Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
2024-07-13 11:52:08 +02:00
Pablo Galindo Salgado
4e36dd7d87
gh-121497: Make Pyrepl respect correctly the history with input hook set ( #121498 )
2024-07-13 09:42:14 +00:00
Zachary Ware
dc03ce797a
gh-95144: Improve error message of `... in None` (GH-119888)
2024-07-12 16:34:17 +00:00
Savannah Ostrowski
65fededf9c
Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638)
...
Address comments
2024-07-12 10:34:30 +02:00