| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
values in Element tree (GH-119762) (#120190)
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)
Adjust DeprecationWarning when testing element truth values in
ElementTree, we're planning to go with the more natural True return
rather than a disruptive harder to code around exception raise, and are
deferring the behavior change for a few more releases.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 68840e91ac6689d3954b98a9ab136e194b5250b8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(GH-120820) (GH-121145)" (GH-122409)
This reverts commit 027902b56f2176c571e5e244c3c23dc7247b67dc.
|
| |
|
|
|
| |
(cherry picked from commit 3b034d26eb8480f8d12ae11f42d038d24cf8498a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-122338) (#122345)
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338)
(cherry picked from commit c08696286f52d286674f264eecf7b33a335a890b)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-122265)
Serializing objects with complex __qualname__ (such as unbound methods and
nested classes) by name no longer involves serializing parent objects by value
in pickle protocols < 4.
(cherry picked from commit dc07f65a53baf60d9857186294d3d7ba92d5606d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
| |
(GH-122117)
|
| |
|
|
|
| |
point" (GH-121907) (GH-122013)
(cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
|
| |
|
|
|
|
|
|
| |
(GH-121998) (#122001)
gh-120289: Add external timer in traverse of _lsprof.Profiler (GH-121998)
(cherry picked from commit eaf094c09b5b1c33435c60ef49b1cec78c32573c)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
| |
|
|
|
|
|
|
| |
prevent use-after-free (GH-120297) (#121989)
gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297)
(cherry picked from commit 1ab17782832bb1b6baa915627aead3e3516a0894)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-121792) (#121840)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit 8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
(GH-120820) (GH-121145)
(cherry picked from commit 6d34938dc8163f4a4bcc68069a1645a7ab76e935)
Co-authored-by: blhsing <blhsing@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
_pickle.c (GH-121136) (#121140)
gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH-121136)
PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
(cherry picked from commit 92893fd8dc803ed7cdde55d29d25f84ccb5e3ef0)
Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
Tkinter (GH-120909) (GH-120939)
Now the null character is always represented as \xc0\x80 for
Tcl_NewStringObj().
(cherry picked from commit c38e2f64d012929168dfef7363c9e48bd1a6c731)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
Accessing the Tkinter object's string representation no longer converts
the underlying Tcl object to a string on Windows.
(cherry picked from commit f4ddaa396715855ffbd94590f89ab7d55feeec07)
|
| |
|
|
|
|
|
|
|
| |
(GH-119507) (#119965)
gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)
(cherry picked from commit 52586f930f62bd80374f0f240a4ecce0c0238174)
Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-120588) (#120617)
gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588)
(cherry picked from commit 3df2022931f77c5cadb3f51b371be6ae17587ede)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
`_datetime` (gh-120431)
The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).
(cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224)
|
| |
|
|
|
|
|
|
|
| |
gh-120155: Add assertion to sre.c match_getindex() (GH-120402)
Add an assertion to help static analyzers to detect that i*2 cannot
overflow.
(cherry picked from commit 42b25dd61ff3593795c4cc2ffe876ab766098b24)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#120311)
gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232)
Declare the 'rv' varaible at the top of the load_data() function to
make sure that it's initialized before the first 'goto error' which
uses 'rv' (return rv).
Fix the Coverity issue:
Error: UNINIT (CWE-457):
Python-3.12.2/Modules/_zoneinfo.c:1233:5: skipped_decl: Jumping over declaration of ""rv"".
Python-3.12.2/Modules/_zoneinfo.c:1284:5: uninit_use: Using uninitialized value ""rv"".
1282| }
1283|
1284|-> return rv;
1285| }
1286|
(cherry picked from commit b90bd3e5bbc136f53b24ee791824acd6b17e0d42)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 38a25e9560cf0ff0b80d9e90bce793ff24c6e027)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0.
* Use Tcl_Size instead of int where needed.
(cherry picked from commit e0799352823289fafb8131341abd751923ee9c08)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f)
|
| |
|
|
|
|
|
|
|
|
| |
(#1… (#119905)
Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)"
This reverts commit 078da88ad19e8f7474b6943edd39b7e61511bd20.
The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.
|
| |
|
|
|
|
|
|
|
|
|
| |
`PyThreadState_Clear()` (GH-119753) (#119861)
Make sure that `gilstate_counter` is not zero in when calling
`PyThreadState_Clear()`. A destructor called from `PyThreadState_Clear()` may
call back into `PyGILState_Ensure()` and `PyGILState_Release()`. If
`gilstate_counter` is zero, it will try to create a new thread state before
the current active thread state is destroyed, leading to an assertion failure
or crash.
(cherry picked from commit bcc1be39cb1d04ad9fc0bd1b9193d3972835a57c)
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-103846) (GH-119831)
Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585e99abc2d060cedc77b3c03e06b4a0a9c4)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
| |
|
| |
Also backports a minor improvement to test_audit.
|
| |
|
|
| |
posixmodule (GH-119608)
|
| |
|
|
|
|
|
|
| |
gh-69214: Fix fcntl.ioctl() request type (#119498)
Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
(cherry picked from commit 92fab3356f4c61d4c73606e4fae705c6d8f6213b)
|
| |
|
|
|
|
|
|
|
|
|
| |
Interpreters (gh-119331) (gh-119425)
_PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed.
This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple.
This change also fixes a bug where only the most recent parser was added to the global linked list.
(cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf)
|
| |
|
|
| |
This refactoring will make future backports easier without changing behaviours,
apart from correcting a bug when passing a pipe to `ntpath.isfile`.
|
| |
|
|
|
| |
(cherry picked from commit 94591dca510c796c7d40e9b4167ea56f2fdf28ca)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
| |
(GH-118999) (#119019)
gh-118998: Handle errors correctly in `tmtotuple` in `timemodule` (GH-118999)
(cherry picked from commit fc757925944a9486d4244853dbe6e37ab3e560c2)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| | |
|
| |
|
|
|
|
| |
Co-authored-by: trag1c <trag1cdev@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118320) (GH-118691)
gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320)
Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.
(cherry picked from commit fe47d9bee319528ffeb5fd60a615d7f02c7b5585)
Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118291) (GH-118662)
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.
(cherry picked from commit 1ff626ebda465931ff3e4922e8e87d586eb6244c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-118230) (GH-118266)
The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.
(cherry picked from commit 546cbcfa0eeeb533950bd49e30423f3d3bbd5ebe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
gh-116741: Upgrade libexpat to 2.6.2 (GH-117296)
Upgrade libexpat to 2.6.2
(cherry picked from commit c9829eec0883a8991ea4d319d965e123a3cf6c20)
Co-authored-by: Seth Michael Larson <seth@python.org>
|
| |
|
|
|
|
|
|
| |
(GH-117982) (GH-118011)
(cherry picked from commit 6078f2033ea15a16cf52fe8d644a95a3be72d2e3)
Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
params (GH-118001) (#118142)
Filter out '?NNN' placeholders when looking for named params.
(cherry picked from commit 550483b7e6c54b2a25d4db0c4ca41bd9c1132f93)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
| |
|
|
|
|
| |
GH-115874: Fix segfault in FutureIter_dealloc (GH-117741)
(cherry picked from commit d8f350309ded3130c43f0d2809dcb8ec13112320)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-118097)
Follow GH-88035, update doc-string of epoch in timemodule.c
The epoch is `January 1st, 1970 on all platforms`, according to
current documentation.
(cherry picked from commit 7c6cc00211772cc2afe0bc5e996b6d28f925d133)
Co-authored-by: lit <litlighilit@foxmail.com>
|
| |
|
|
| |
to reduce warnings (GH-117817)
|
| |
|
|
|
| |
(cherry picked from commit 57bdb75975ff90f95248c59fda34345f3bfff3c4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-117771) (GH-117806)
(cherry picked from commit 245e426b55fe6c49140863c352f2a2be11c70fbe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117234) (#117767)
gh-117233: Detect support for several hashes at hashlib build time (GH-117234)
Detect libcrypto BLAKE2, Shake, SHA3, and Truncated-SHA512 support at hashlib build time
GH-GH- BLAKE2
While OpenSSL supports both "b" and "s" variants of the BLAKE2 hash
function, other cryptographic libraries may lack support for one or both
of the variants. This commit modifies `hashlib`'s C code to detect
whether or not the linked libcrypto supports each BLAKE2 variant, and
elides references to each variant's NID accordingly. In cases where the
underlying libcrypto doesn't fully support BLAKE2, CPython's
`./configure` script can be given the following flag to use CPython's
interned BLAKE2 implementation: `--with-builtin-hashlib-hashes=blake2`.
GH-GH- SHA3, Shake, & truncated SHA512.
Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the
OpenSSL-ish libcrypto library at build time. This helps allow hashlib's
`_hashopenssl` to be used with libraries that do not to support every
algorithm that upstream OpenSSL does. Such as AWS-LC & BoringSSL.
(cherry picked from commit b8eaad30090b46f115dfed23266305b6546fb364)
Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#117689)
gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543)
Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats.
---------
(cherry picked from commit d5f1139c79525b4e7e4e8ad8c3e5fb831bbc3f28)
Co-authored-by: Vlad4896 <166005126+Vlad4896@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
during deprecation period (GH-117354)
(cherry picked from commit 985917dc8d34e2d2f717f7a981580a8dcf18d53a)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#117497)
gh-91565: Update issue tracker URL in error message. (GH-117450)
* Update issue tracker URL in commit message.
* Also update issue tracker URL in comment.
(cherry picked from commit 8987a5c809343ae0dd2b8e607bf2c32a87773127)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|