Commit Graph

122078 Commits

Author SHA1 Message Date
Łukasz Langa 5a9eeafa05
Use Intel with 12 cores for free-threading tests for maximum speedup (#118677) 2024-05-07 00:49:45 +02:00
Jelle Zijlstra 8419f01673
gh-118647: Add defaults to typing.Generator and typing.AsyncGenerator (#118648)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-06 22:35:06 +00:00
Łukasz Langa 9fd33af5ac
Test premium Mac builders (#118672) 2024-05-07 00:08:17 +02:00
Sam Gross 2ba2c142a6
gh-118527: Intern code name and filename on default build (#118576)
Interned and non-interned strings are treated differently by `marshal`,
so be consistent between the default and free-threaded build.
2024-05-06 17:24:14 -04:00
Mark Shannon 616b745b89
GH-115709: Invalidate executors when a local variable is changed via frame.f_locals (#118639)
Also fix unrelated assert in debug Tier2/JIT builds.
2024-05-06 21:21:06 +00:00
Dino Viehland 00d913c671
gh-118415: Fix issues with local tracing being enabled/disabled on a function (#118496) 2024-05-06 13:06:09 -07:00
Łukasz Langa 9bf00322ba
gh-118628: Don't display pyrepl warning on Windows (#118665) 2024-05-06 19:35:22 +00:00
Serhiy Storchaka 67ce820d51
gh-71592: Fix a leak in tkinter.Tk destructor when _debug is true (GH-118664) 2024-05-06 19:25:20 +00:00
Erlend E. Aasland 325a1da18d
gh-115119: Default to --with-system-libmpdec=yes (#118539)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2024-05-06 21:16:08 +02:00
Tian Gao e5353d49dc
GH-83151: Add closure support to pdb (GH-111094) 2024-05-06 11:34:13 -07:00
Dino Viehland 5a1618a2c8
gh-118362: Fix thread safety around lookups from the type cache in the face of concurrent mutators (#118454)
Add _PyType_LookupRef and use incref before setting attribute on type
Makes setting an attribute on a class and signaling type modified atomic
Avoid adding re-entrancy exposing the type cache in an inconsistent state by decrefing after type is updated
2024-05-06 10:50:35 -07:00
Pablo Galindo Salgado e6b213ee3f
gh-118518: Ensure that the code padding it's applied (#118654) 2024-05-06 18:20:42 +01:00
Thomas Grainger e5c699280d
GH-117714: implement athrow().close() and asend().close() using throw (GH-117906)
* GH-117714: replace athrow().close() and asend().close() stubs with implimentations

* test athrow().close() and asend().close() raises RuntimeError

* 📜🤖 Added by blurb_it.

* Update Objects/genobject.c

Co-authored-by: Petr Viktorin <encukou@gmail.com>

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-05-06 17:13:15 +00:00
Serhiy Storchaka 1ff626ebda
gh-71592: Add ability to trace Tcl commands executed by Tkinter (GH-118291)
This is an experimental feature, for internal use.

Setting tkinter._debug = True before creating the root window enables
printing every executed Tcl command (or a Tcl command equivalent to the
used Tcl C API).

This will help to convert a Tkinter example into Tcl script to check
whether the issue is caused by Tkinter or exists in the underlying Tcl/Tk
library.
2024-05-06 20:12:51 +03:00
Petr Viktorin 417dd3aca7
gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL (GH-118645) 2024-05-06 18:59:36 +02:00
Kerim Kabirov 3ed3bc379a
GH-115577 Clarify netloc term usage in urllib.parse docs (GH-117632) 2024-05-06 18:55:22 +02:00
Tian Gao 7528b84e94
gh-118609: Add proper error check for framelocalsproxy (#118615) 2024-05-06 08:46:15 -07:00
Serhiy Storchaka 709ca90a00
gh-118271: Support more options for reading/writing images in Tkinter (GH-118273)
* Add PhotoImage.read() to read an image from a file.
* Add PhotoImage.data() to get the image data.
* Add background and grayscale parameters to PhotoImage.write().
2024-05-06 15:06:06 +00:00
Xie Yanbo fc50f1bdba
Fix typo in Doc/library/asyncio-task.rst (GH-118627) 2024-05-06 08:00:31 -07:00
Serhiy Storchaka 1b639a04ca
gh-118225: Support more options for copying images in Tkinter (GH-118228)
* Add the PhotoImage method copy_replace() to copy a region
  from one image to other image, possibly with pixel zooming and/or
  subsampling.
* Add from_coords parameter to PhotoImage methods copy(), zoom() and subsample().
* Add zoom and subsample parameters to PhotoImage method copy().
2024-05-06 17:33:15 +03:00
Pablo Galindo Salgado 09871c9223
gh-118518: Correct type of perf_profiling in config (#118646) 2024-05-06 15:30:30 +01:00
Xie Yanbo c3f4a6b524
Fix typo in Lib/zipfile/_path/__init__.py (#118622) 2024-05-06 13:58:27 +00:00
Serhiy Storchaka 0085c3ae8f
gh-116871: Improve name suggestions in tracebacks (GH-116930)
Only include underscored names in name suggestions for AttributeError and
ImportError if the original name was underscored.
2024-05-06 15:53:15 +03:00
Serhiy Storchaka d6fa1d4bee
gh-66543: Add mimetypes.guess_file_type() (GH-117258) 2024-05-06 15:50:52 +03:00
Pablo Galindo Salgado d3c7821335
gh-111201: Use a more common constant in completion tests in test_pyrepl (#118638) 2024-05-06 10:56:47 +00:00
Tian Gao afbe5bf9c8
gh-74929: Make containment checks more efficient in `FrameLocalsProxy` (#118624)
Properly implement the `sq_contains` slot for frame locals proxy containment checks.
2024-05-06 20:16:48 +10:00
Alyssa Coghlan 757fd3e010
gh-74929: locals() documentation update for PEP 667 (#118265)
Documentation wording taken from the
withdrawn PEP 558 (which had switched to the
Python level semantics proposed in PEP 667 prior
to its withdrawal).
2024-05-06 20:06:07 +10:00
Lysandros Nikolaou 8e750b83a8
gh-111201: Fix event queue tests for pyrepl (#118635) 2024-05-06 10:50:42 +01:00
Serhiy Storchaka 153b3f7530
gh-118465: Add __firstlineno__ attribute to class (GH-118475)
It is set by compiler with the line number of the first line of
the class definition.
2024-05-06 12:02:37 +03:00
Erlend E. Aasland 716ec4bfcf
gh-115119: Bump CI to use Ubuntu 22.04 (#118631)
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
2024-05-06 10:39:43 +02:00
Pieter Eendebak 05adfbba2a
gh-95382: Improve performance of json encoder with indent (GH-118105) 2024-05-06 11:04:39 +03:00
Terry Jan Reedy 7758be4318
gh-78955: Use user-selected color theme for Help => IDLE Doc (#9502) 2024-05-06 03:55:56 -04:00
Nikita Sobolev a8e5fed100
gh-118613: Fix error handling of `_PyEval_GetFrameLocals` in `ceval.c` (#118614) 2024-05-06 10:34:56 +03:00
Russell Keith-Magee 1506d5adc4
Set a DerivedData path for iOS test builds. (GH-118621) 2024-05-05 23:58:14 -04:00
Russell Keith-Magee dd37e85518
Correct timing sensitivity in iOS testing Makefile target. (GH-118620) 2024-05-05 22:34:59 -04:00
Pablo Galindo Salgado 2eb99914c4
Add Lysandros Nikolaou to the News entry of gh-111201 (#118616) 2024-05-05 22:13:50 +00:00
Gregory P. Smith b744fa5d3e
gh-111140: minor docs typos cleanup in the C example API calls. (#118612) 2024-05-05 21:43:42 +00:00
Tian Gao b4f8eb0de2
gh-118605: Fix reference leak in FrameLocalsProxy (#118607)
Also add some error checks.
2024-05-05 21:31:35 +00:00
Barney Gale d8d94911e2
Move pathlib implementation out of `__init__.py` (#118582)
Use the `__init__.py` file only for imports that define the API, following the example of asyncio.
2024-05-05 20:57:19 +01:00
Pablo Galindo Salgado f27f8c790a
gh-111201: A new Python REPL (GH-111567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-05 21:32:23 +02:00
Guido van Rossum 40cc809902
gh-117549: Don't use designated initializers in headers (#118580)
The designated initializer syntax in static inline functions in pycore_backoff.h
causes problems for C++ or MSVC users who aren't yet using C++20.
While internal, pycore_backoff.h is included (indirectly, via pycore_code.h)
by some key 3rd party software that does so for speed.
2024-05-05 19:28:55 +00:00
Nikita Sobolev 44f67916da
gh-117389: Fix `test_compileall.EncodingTest` (#117390) 2024-05-05 21:46:37 +03:00
Raymond Hettinger 5092ea238e
Fix negative bandwidth test and add online code path test. (gh-118600) 2024-05-05 12:29:23 -05:00
Guido van Rossum 9c13d9e37a
gh-74929: Rudimentary docs for PEP 667 (#118581)
This is *not* sufficient for the final 3.13 release, but it will do for beta 1:

- What's new entry
- Updated changelog entry (news blurb)
- Mention the proxy for f_globals in the datamodel and Python frame object docs

This doesn't have any C API details (what's new refers to the PEP).
2024-05-05 15:31:26 +00:00
Tian Gao 5a0022a1d7
GH-111744: Make breakpoint() enter the debugger immediately (GH-118579) 2024-05-05 07:05:01 -07:00
Nikita Sobolev 1511bc95c4
gh-101137: Add `text/x-rst` to `mimetypes` (#118593) 2024-05-05 13:39:50 +00:00
Ryan Batchelder b6f0ab5b1c
gh-83505: Add markdown mimetype mapping (#17995) 2024-05-05 13:09:59 +00:00
Pablo Galindo Salgado aeb36c5bb9
gh-118518: Use the raw syscall directly for gettid (#118592) 2024-05-05 12:37:32 +00:00
Victor Stinner aa61f8bfcf
gh-110850: Remove _PyTime_TimeUnchecked() function (#118552)
Use the new public Raw functions:

* _PyTime_PerfCounterUnchecked() with PyTime_PerfCounterRaw()
* _PyTime_TimeUnchecked() with PyTime_TimeRaw()
* _PyTime_MonotonicUnchecked() with PyTime_MonotonicRaw()

Remove internal functions:

* _PyTime_PerfCounterUnchecked()
* _PyTime_TimeUnchecked()
* _PyTime_MonotonicUnchecked()
2024-05-05 12:15:19 +02:00
Raymond Hettinger c7c9b913c0
gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559) 2024-05-05 01:42:30 -05:00