summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320)Youfu Zhang2024-05-073-0/+23
| | | | | | | Fix an edge case in `binascii.a2b_base64` strict mode, where excessive padding was not detected when no padding is necessary. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* gh-117657: Use clang 18 in TSAN builds (GH-118533)mpage2024-05-071-1/+8
| | | | | Use clang 18 in TSAN builds We were using clang 14 which is a couple of years old.
* Fix typo inaccuracy in _bootstrap_external.py (GH-118619)wim glenn2024-05-071-1/+1
|
* gh-62090: Simplify argparse usage formatting (GH-105039)Ali Hamdan2024-05-073-72/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale ========= argparse performs a complex formatting of the usage for argument grouping and for line wrapping to fit the terminal width. This formatting has been a constant source of bugs for at least 10 years (see linked issues below) where defensive assertion errors are triggered or brackets and paranthesis are not properly handeled. Problem ======= The current implementation of argparse usage formatting relies on regular expressions to group arguments usage only to separate them again later with another set of regular expressions. This is a complex and error prone approach that caused all the issues linked below. Special casing certain argument formats has not solved the problem. The following are some of the most common issues: - empty `metavar` - mutually exclusive groups with `SUPPRESS`ed arguments - metavars with whitespace - metavars with brackets or paranthesis Solution ======== The following two comments summarize the solution: - https://github.com/python/cpython/issues/82091#issuecomment-1093832187 - https://github.com/python/cpython/issues/77048#issuecomment-1093776995 Mainly, the solution is to rewrite the usage formatting to avoid the group-then-separate approach. Instead, the usage parts are kept separate and only joined together at the end. This allows for a much simpler implementation that is easier to understand and maintain. It avoids the regular expressions approach and fixes the corresponding issues. This closes the following GitHub issues: - #62090 - #62549 - #77048 - #82091 - #89743 - #96310 - #98666 These PRs become obsolete: - #15372 - #96311
* gh-118107: Fix zipimporter ZIP64 handling. (GH-118108)John Sirois2024-05-077-3/+128
| | | | | | | | | | | | Add missing import to code that handles too large files and offsets. Use list, not tuple, for a mutable sequence. Add tests to prevent similar mistakes. --------- Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* Update macOS installer screens and README for 3.13.0b1 (GH-118685)Ned Deily2024-05-073-45/+11
|
* gh-118414: Fix assertion in YIELD_VALUE when tracing lines or instrs (#118683)Tian Gao2024-05-075-3/+21
|
* gh-117953: Always Run Extension Init Func in Main Interpreter First (gh-118157)Eric Snow2024-05-074-69/+216
| | | This change makes sure all extension/builtin modules have their init function run first by the main interpreter before proceeding with import in the original interpreter (main or otherwise). This means when the import of a single-phase init module fails in an isolated subinterpreter, it won't tie any global state/callbacks to the subinterpreter.
* gh-117953: Imply Single-phase Init if the Init Function Fails (gh-118684)Eric Snow2024-05-071-0/+7
| | | This ensures the kind is always either _Py_ext_module_kind_SINGLEPHASE or _Py_ext_module_kind_MULTIPHASE.
* gh-116322: Enable the GIL while loading C extension modules (#118560)Brett Simmers2024-05-079-32/+352
| | | | | | | | | | Add the ability to enable/disable the GIL at runtime, and use that in the C module loading code. We can't know before running a module init function if it supports free-threading, so the GIL is temporarily enabled before doing so. If the module declares support for running without the GIL, the GIL is later disabled. Otherwise, the GIL is permanently enabled, and will never be disabled again for the life of the current interpreter.
* Docs: add whatsnew for free-threading (#118679)Sam Gross2024-05-071-0/+46
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-110209: Add __class_getitem__ for generator and coroutine (#110212)James Hilton-Balfe2024-05-073-1/+5
|
* GH-116380: Revert move of pathlib globbing code to `pathlib._glob` (#118678)Barney Gale2024-05-074-337/+331
| | | | | | The previous change made the `glob` module slower to import, because it imported `pathlib._glob` and hence the rest of `pathlib`. Reverts a40f557d7b7a355a55bb90c068e3e9202fd9c8f2.
* gh-112075: use per-thread dict version pool (#118676)Dino Viehland2024-05-075-3/+70
| | | use thread state set of dict versions
* gh-118527: Intern code consts in free-threaded build (#118667)Sam Gross2024-05-0714-18/+375
| | | | | | We already intern and immortalize most string constants. In the free-threaded build, other constants can be a source of reference count contention because they are shared by all threads running the same code objects.
* gh-118473: Fix set_asyncgen_hooks not to be partially set when arguments are ↵Jeong, YunWon2024-05-073-9/+36
| | | | invalid (#118474)
* gh-118362: Skip tests when threading isn't available (#118666)Dino Viehland2024-05-063-16/+16
| | | | | * Skip tests when threads aren't available * Use ThreadPoolExecutor
* gh-112075: Fix race in constructing dict for instance (#118499)Dino Viehland2024-05-064-71/+216
|
* GH-118251: Bump the JIT CI timeout to 90 minutes (#118661)Brandt Bucher2024-05-061-1/+1
|
* gh-117486: Improve behavior for user-defined AST subclasses (#118212)Jelle Zijlstra2024-05-066-33/+94
| | | | | | | | Now, such classes will no longer require changes in Python 3.13 in the normal case. The test suite for robotframework passes with no DeprecationWarnings under this PR. I also added a new DeprecationWarning for the case where `_field_types` exists but is incomplete, since that seems likely to indicate a user mistake.
* fix typo in `_pyrepl.pager`: `plainpager` -> `plain_pager` (#118675)denballakh2024-05-061-1/+1
|
* Use Intel with 12 cores for free-threading tests for maximum speedup (#118677)Łukasz Langa2024-05-061-2/+2
|
* gh-118647: Add defaults to typing.Generator and typing.AsyncGenerator (#118648)Jelle Zijlstra2024-05-064-9/+51
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Test premium Mac builders (#118672)Łukasz Langa2024-05-063-5/+5
|
* gh-118527: Intern code name and filename on default build (#118576)Sam Gross2024-05-062-4/+2
| | | | Interned and non-interned strings are treated differently by `marshal`, so be consistent between the default and free-threaded build.
* GH-115709: Invalidate executors when a local variable is changed via ↵Mark Shannon2024-05-065-4/+30
| | | | | frame.f_locals (#118639) Also fix unrelated assert in debug Tier2/JIT builds.
* gh-118415: Fix issues with local tracing being enabled/disabled on a ↵Dino Viehland2024-05-062-59/+71
| | | | function (#118496)
* gh-118628: Don't display pyrepl warning on Windows (#118665)Łukasz Langa2024-05-061-3/+7
|
* gh-71592: Fix a leak in tkinter.Tk destructor when _debug is true (GH-118664)Serhiy Storchaka2024-05-061-0/+1
|
* gh-115119: Default to --with-system-libmpdec=yes (#118539)Erlend E. Aasland2024-05-066-20/+116
| | | Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
* GH-83151: Add closure support to pdb (GH-111094)Tian Gao2024-05-063-2/+156
|
* gh-118362: Fix thread safety around lookups from the type cache in the face ↵Dino Viehland2024-05-0618-124/+437
| | | | | | | 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
* gh-118518: Ensure that the code padding it's applied (#118654)Pablo Galindo Salgado2024-05-061-1/+1
|
* GH-117714: implement athrow().close() and asend().close() using throw ↵Thomas Grainger2024-05-063-4/+87
| | | | | | | | | | | | | | | | | | (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>
* gh-71592: Add ability to trace Tcl commands executed by Tkinter (GH-118291)Serhiy Storchaka2024-05-063-6/+190
| | | | | | | | | | | | 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.
* gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL ↵Petr Viktorin2024-05-0619-21/+21
| | | | (GH-118645)
* GH-115577 Clarify netloc term usage in urllib.parse docs (GH-117632)Kerim Kabirov2024-05-061-0/+5
|
* gh-118609: Add proper error check for framelocalsproxy (#118615)Tian Gao2024-05-061-46/+99
|
* gh-118271: Support more options for reading/writing images in Tkinter ↵Serhiy Storchaka2024-05-064-16/+222
| | | | | | | | (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().
* Fix typo in Doc/library/asyncio-task.rst (GH-118627)Xie Yanbo2024-05-061-1/+1
|
* gh-118225: Support more options for copying images in Tkinter (GH-118228)Serhiy Storchaka2024-05-065-17/+268
| | | | | | | | * 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().
* gh-118518: Correct type of perf_profiling in config (#118646)Pablo Galindo Salgado2024-05-061-1/+1
|
* Fix typo in Lib/zipfile/_path/__init__.py (#118622)Xie Yanbo2024-05-061-1/+1
|
* gh-116871: Improve name suggestions in tracebacks (GH-116930)Serhiy Storchaka2024-05-063-0/+45
| | | | | Only include underscored names in name suggestions for AttributeError and ImportError if the original name was underscored.
* gh-66543: Add mimetypes.guess_file_type() (GH-117258)Serhiy Storchaka2024-05-068-35/+129
|
* gh-111201: Use a more common constant in completion tests in test_pyrepl ↵Pablo Galindo Salgado2024-05-061-2/+7
| | | | (#118638)
* gh-74929: Make containment checks more efficient in `FrameLocalsProxy` (#118624)Tian Gao2024-05-061-10/+19
| | | Properly implement the `sq_contains` slot for frame locals proxy containment checks.
* gh-74929: locals() documentation update for PEP 667 (#118265)Alyssa Coghlan2024-05-061-9/+38
| | | | | | Documentation wording taken from the withdrawn PEP 558 (which had switched to the Python level semantics proposed in PEP 667 prior to its withdrawal).
* gh-111201: Fix event queue tests for pyrepl (#118635)Lysandros Nikolaou2024-05-061-14/+21
|
* gh-118465: Add __firstlineno__ attribute to class (GH-118475)Serhiy Storchaka2024-05-0617-89/+61
| | | | It is set by compiler with the line number of the first line of the class definition.