| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
itertools.pairwise.__next__() (GH-109788) (GH-112700)
(cherry picked from commit 6ca9d3e0173c38e2eac50367b187d4c1d43f9892)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-112691)
(cherry picked from commit 23e001fa9f1897ba3384c02bbbe634313358a549)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
| |
|
|
|
|
|
|
|
| |
(GH-10415)
On platforms with 64-bit long, socket.setblocking(x) treated all x
which lower 32 bits are zero as False due to integer truncation.
Reported by ubsan.
|
| |
|
|
|
|
| |
gh-112105: Make completer delims work on libedit (gh-112106)
(cherry picked from commit 2df26d83486b8f9ac6b7df2a9a4669508aa61983)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
| |
|
|
|
|
|
| |
(GH-21664) (GH-112465)
(cherry picked from commit 967f2a3052c2d22e31564b428a9aa8cc63dc2a9f)
Co-authored-by: kale-smoothie <34165060+kale-smoothie@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-112059)
* Fix crash when encoding is not string or None.
* Fix crash when both line_buffering and write_through raise exception
when converted ti int.
* Add a number of tests for constructor and reconfigure() method
with invalid arguments.
(cherry picked from commit ee06fffd38cb51ce1c045da9d8336d9ce13c318a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(#111991)
Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982)
Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
(cherry picked from commit 21615f77b5a580e83589abae618dbe7c298700e2)
Co-authored-by: T. Wouters <thomas@python.org>
|
| |
|
|
|
|
|
| |
Windows (GH-111842) (GH-111967)
(cherry picked from commit 0b06d2482d77e02c5d40e221f6046c9c355458b2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(#111298)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
GH-111804: Drop posix.fallocate() under WASI (GH-111869)
Drop posix.fallocate() under WASI.
The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
|
| |
|
|
|
|
|
|
| |
(gh-111771)
[3.11] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695)
(cherry picked from commit c8faa3568afd255708096f6aa8df0afa80cf7697)
Co-authored-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
|
| |
|
|
|
|
|
| |
BytesIO (GH-111210) (GH-111315)
(cherry picked from commit 9da98c0d9a7cc55c67fb0bd3fa162fd3b2c2629b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 11312eae6ec3acf51aacafce4cb6d1a5edfd5f2e)
Co-authored-by: Tamás Hegedűs <sorgloomer@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-23825) (GH-110882) (GH-110889)
zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.
(cherry picked from commit ab08ff7882b6181fb785eed7410dbf8030aded70)
(cherry picked from commit 72b0f0eaf52ac46d5f6e165f737d6f891cf8d172)
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-109859) (GH-110860)
Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.
The limit is increased to 2**32-1 (was 2**31-1).
(cherry picked from commit e2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-110591) (#110614)
TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
(cherry picked from commit 344d3a222a7864f8157773749bdd77d1c9dfc1e6)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(#110581)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
(cherry picked from commit 3b1580af07c0ce90d1c2073ab087772283d7e3b9)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
| |
|
| |
(cherry picked from commit f4cb0d27cc08f490c42a22e646eb73cc7072d54a)
|
| |
|
|
|
|
|
|
| |
(#110390)
(cherry picked from commit 2bbbab212fb10b3aeaded188fb5d6c001fb4bf74)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
| |
|
|
|
|
|
| |
(#110127)
Add _testcapi.USE_STACKCHECK.
USE_STACKCHECK on using on Windows 32-bit.
|
| |
|
|
|
|
|
|
|
|
| |
gh-110052: Fix faulthandler for freed tstate (#110069)
faulthandler now detected freed interp and freed tstate, and no
longer dereference them.
Backport to 3.11: add pycore_pymem.h include to traceback.c.
(cherry picked from commit 2e37a38bcbfbe1357436e030538290e7d00b668d)
|
| |
|
|
|
|
|
| |
* Fix c-analyzer globals test failure
* Put globals exception in ignored.tsv
(cherry picked from commit a829356f86d597e4dfe92e236a6d711c8a464f16)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-109629) (#109897)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)
---------
(cherry picked from commit 0eb98837b60bc58e57ad3e2b35c6b0e9ab634678)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-109867) (GH-109885)
Counting for signal checking now continues in new match from the point where
it ended in the previous match instead of starting from 0.
(cherry picked from commit 8ac2085b80eca4d9b2a1093d0a7da020fd12e11a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
usin… (#109852)
gh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory allocator (#109808)
(cherry picked from commit 1b8f2366b38c87b0450d9c15bdfdd4c4a2fc3a01)
Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109668)
gh-109613: _pystat_fromstructstat() checks for exceptions (#109618)
Fix os.stat() and os.DirEntry.stat(): check for exceptions.
Previously, on Python built in debug mode, these functions could
trigger a fatal Python error (and abort the process) when a function
succeeded with an exception set.
_pystat_fromstructstat() now exits immediately if an exception is
raised, rather only checking for exceptions at the end. It fix
following fatal error in fill_time():
Fatal Python error: _Py_CheckSlotResult:
Slot * of type int succeeded with an exception set
(cherry picked from commit d4cea794a7b9b745817d2bd982d35412aef04710)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109272)
gh-108987: Fix _thread.start_new_thread() race condition (#109135)
Fix _thread.start_new_thread() race condition. If a thread is created
during Python finalization, the newly spawned thread now exits
immediately instead of trying to access freed memory and lead to a
crash.
thread_run() calls PyEval_AcquireThread() which checks if the thread
must exit. The problem was that tstate was dereferenced earlier in
_PyThreadState_Bind() which leads to a crash most of the time.
Move _PyThreadState_CheckConsistency() from thread_run() to
_PyThreadState_Bind().
(cherry picked from commit 517cd82ea7d01b344804413ef05610934a43a241)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109134)
gh-104690: thread_run() checks for tstate dangling pointer (#109056)
thread_run() of _threadmodule.c now calls
_PyThreadState_CheckConsistency() to check if tstate is a dangling
pointer when Python is built in debug mode.
Rename ceval_gil.c is_tstate_valid() to
_PyThreadState_CheckConsistency() to reuse it in _threadmodule.c.
(cherry picked from commit f63d37877ad166041489a968233b57540f8456e8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
gh-104372: Drop the GIL around the vfork() call. (#104782)
On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome. This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.
Fixes #104372.
(cherry picked from commit d08679212d9af52dd074cd4a6abb440edb944c9c)
|
| |
|
|
|
|
|
|
|
|
|
| |
(#108656)
(cherry picked from commit 8178a88bd81edae87d6974483e4de9b32e808797)
- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
| |
(cherry picked from commit 38afa4af9bfc8297a5ee270c37f3f120a04297ea)
|
| |
|
|
|
|
|
|
| |
(GH-108524)
Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
(cherry picked from commit 2b15536fa94d07e9e286826c23507402313ec7f4)
|
| |
|
|
|
|
|
| |
(GH-107131) (GH-107488)" (#108412)
This reverts commit 57f27e444175a8a5ffcd86971e06de61c1c38628.
The fix caused gh-107940. Until we have a bulletproof fix for that, the 3.11 backport needs to be reverted to make way for 3.11.5.
|
| | |
|
| |
|
|
|
|
|
| |
gh-102507 Remove invisible pagebreak characters (GH-102531)
(cherry picked from commit b097925858c6975c73e989226cf278cc382c0416)
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(#107933) (#108264)
(cherry picked from commit 7f87ebbc3f52680c939791f397b9a478edf0c8d4)
Clearly document the supported seek() operations:
- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
|
| |
|
|
|
|
|
|
|
|
| |
- name the last parameter *whence*, like it is for seek() methods on
file objects
- add param docstrings
- structure the valid *whence* params
(cherry picked from commit dd4442c8f597af1ec3eaf20f7ad89c4ac7e2dbc9)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
quantifiers (GH-102612) (GH-108004)
Restore the global Input Stream pointer after trying to match a sub-pattern.
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
(cherry picked from commit abd9cc52d94b8e2835322b62c29f09bb0e6fcfe9)
Co-authored-by: SKO <41810398+uyw4687@users.noreply.github.com>
|
| |
|
| |
Co-authored-by: Finn Womack <flan313@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError,
it doesn't matter how much memory is available.
* Strings with length exactly 2**32-1 caused OSError.
* Strings longer than 2**32-1 characters were truncated due to integer overflow bug.
Now strings longer than 2**31-1 characters caused OverflowError.
(cherry picked from commit 04cc01453db2f0af72a06440831637f8bf512daf)
|
| |
|
|
|
| |
PySys_SetObject() (GH-107736) (GH-107741)
(cherry picked from commit bea5f93196d213d6fbf4ba8984caf4c3cd1da882)
|
| |
|
|
|
|
|
| |
via SSL_ERROR_SYSCALL (GH-107586) (#107588)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
|
| |
|
|
|
|
|
| |
(#… (#107490)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
(cherry picked from commit 3979150a0d406707f6d253d7c15fb32c1e005a77)
|
| |
|
|
|
|
|
| |
(#107488)
(cherry picked from commit 08447b5deb47e2a0df87fa0a0576d300e5c909b4)
Co-authored-by: Konstantin <kpp.live+github@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#107415)
* [3.11] gh-106881: Check for linux/limits.h before including it (#107397)
* Check for linux/limits.h before including it
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 11c055f5ff1a353de6d2e77f2af24aaa782878ba)
* Fix sphinx-lint error in NEWS entry
|
| |
|
|
|
|
|
|
|
|
| |
gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433)
Fix potential unaligned memory access on C APIs involving returned sequences
of `char *` pointers within the :mod:`grp` and :mod:`socket` modules. These
were revealed using a ``-fsaniziter=alignment`` build on ARM macOS.
(cherry picked from commit f01e4cedba1a17d321664834bb255d9d04ad16ce)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
| |
|
|
|
|
|
| |
(GH-106351) (GH-107259)
(cherry picked from commit b5ae7c498438657a6ba0bf4cc216b9c2c93a06c7)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
| |
|
|
|
|
|
| |
(GH-99613) (GH-107224)
Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270)
|
| |
|
|
|
|
|
|
|
| |
(GH-106768) (GH-106855) (GH-106863)
[3.11] [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855)
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65baee72131b49f4ce8ca2da568a6f2001ce93).
(cherry picked from commit a423ddbdeada8a2fd8657453b9e9f58ba0dd921d)
|
| |
|
|
|
|
|
| |
_curses_panel, _decimal, posix, xxsubtype (GH-106767) (GH-106849) (GH-106851)
(cherry picked from commit 745492355b94d109e47827e5865846f25ae42d26)
(cherry picked from commit 970cb8eabaaf5a8311f1aba4ca4968ef7385fce8)
|