| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
(#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)
|
|
|
|
|
|
|
|
| |
(GH-106832) (#106836)
gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c (GH-106832)
(cherry picked from commit ebf2c56b33553a448da8f60fcd89a622f071b5f4)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#106710)
[3.11] gh-105235: Prevent reading outside buffer during mmap.find() (GH-105252)
* Add a special case for s[-m:] == p in _PyBytes_Find
* Add tests for _PyBytes_Find
* Make sure that start <= end in mmap.find.
(cherry picked from commit ab86426a3472ab68747815299d390b213793c3d1)
|
|
|
|
|
|
|
|
|
|
| |
(#106040)
[3.11] gh-106033: Get rid of new occurrences of PyDict_GetItem and PyObject_HasAttr (GH-106034)
These functions are broken by design because they discard any exceptions raised
inside, including MemoryError and KeyboardInterrupt. They should not be
used in new code..
(cherry picked from commit 1d33d5378058671bfabb6f4d4b5bfd4726973ff9)
|
|
|
|
|
|
|
|
| |
(#105667) (#105721)
Prevent exceptions from possibly being overwritten in case of multiple
failures.
(cherry picked from commit 217589d4f3246d67c6ef0eb0be2b1c33987cf260)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#105686) (#105711)
* [3.11] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686)
All fields must be explicitly initialised to prevent manipulation of
uninitialised fields in dealloc.
Align initialisation order with the layout of the object structs.
(cherry picked from commit ca3cc4b95d66f7527ebe0ba4cdb1907082d9bfc8)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
| |
values (GH-105495) (#105701)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d47d61137e82145f601dccfe6f6cd3c)
Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
|
|
|
|
|
|
| |
(cherry picked from commit 20a56d8becba1a5a958b167fdb43b1a1b9228095)
Add proper error handling to add_errors_module() to prevent exceptions
from possibly being overwritten.
|
|
|
|
|
|
|
| |
Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the
current exception.
(cherry picked from commit e8998e46a7ce8ad336e0941a6da6e50cb88d1e47)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 01f4230460454d4a849a5ba93320142c1a0c93a8)
Add proper error handling to prevent reference leaks and overwritten
exceptions.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where an exception could end up being overwritten.
(cherry picked from commit c932f7284977ebf813313157c52d716ba225a7ac)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Improve error handling so init bails on the first exception.
(cherry picked from commit 16d49680b56e00c53c00683b949138e584669fd3)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where 'tp_richcompare' could end up overwriting an exception.
(cherry picked from commit 35cff545db7c7912046c0ce5627db2e4d2b60f57)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(#105613)
Fix bugs where exceptions could end up being overwritten
because of deferred error handling.
(cherry picked from commit 33c92c4f15539806c8aff8574ff30a8b307e3e4d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit 00b599ab5a76023fa0083d7cc5d3c569342a5191)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where an IndexError could end up being overwritten.
(cherry picked from commit f668f73bc88cce0112b304d87aa998fb28013c71)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit eede1d2f48b4fe7f7918952d9ebeb744b58668c1)
Bail immediately if an exception is set, to prevent exceptions from
being overwritten.
|
|
|
|
|
|
| |
(cherry picked from commit 89aac6f6b7b3af046ec137121c90732289e79efc)
Error handling was deferred in some cases, which could potentially lead
to exceptions being overwritten.
|
|
|
|
|
|
|
|
| |
(GH-105412) (#105441)
Check for error after each call to PyUnicode_FromStringAndSize().
(cherry picked from commit a24a780d937109a0982d807473ae410cc75b0e3b)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
gh-104399: Use newer libtommath APIs when necessary (GH-104407)
(cherry picked from commit 00d73caf804c0474980e471347d6385757af975f)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#105200)
Upgrade builds to OpenSSL 1.1.1u.
This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t.
The Mac/BuildScript/build-installer.py was already updated.
Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9.
Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting).
(cherry picked from commit ede89af)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safety gh-104518 (#104785)
Move all of the Python C API calls into the parent process up front
instead of doing PyLong_AsLong and PyErr_Occurred and PyTuple_GET from
the post-fork/vfork child process.
Much of this was long overdue. We shouldn't have been using PyTuple and
PyLong APIs within all of these low level functions anyways.
This is a backport of c649df6 for #104518 and the tiny adjustment in d1732fe #104697.
Backporting this allows backporting of the real bug fix that requires it.
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
|
|
|
|
|
|
|
|
|
| |
(#103137)
Add IPv6 into to the docstring for socket.getsockname (GH-102961)
(cherry picked from commit ecc5441505cd7cb54f3d38409c732e2e9f102137)
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
Co-authored-by: Brian Haley <brianphaley@gmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit 99b641886a09252bbcf99a1d322fa8734f1ca30d)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-101857: Allow xattr detection on musl libc (GH-101858)
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.
This fixes using e.g. `os.listxattr()` on systems using musl libc.
Bug: https://bugs.gentoo.org/894130
(cherry picked from commit 8be8101bca34b60481ec3d7ecaea4a3379fb7dbb)
Co-authored-by: Sam James <sam@gentoo.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
| |
gh-103987: fix several crashes in mmap module (GH-103990)
(cherry picked from commit ceaa4c3476ac49b5b31954fec53796c7a3b40349)
Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
| |
(GH-104650)
Backport of GH-104579
|
|
|
|
|
|
| |
gh-104645: fix error handling in marshal tests (GH-104646)
(cherry picked from commit ac56a854b418d35ad3838f3072604227dc718fca)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#104313)
GH-104308: socket.getnameinfo should release the GIL (GH-104307)
* socket.getnameinfo should release the GIL
* 📜🤖 Added by blurb_it.
---------
(cherry picked from commit faf196213e60d8a90773e9e5680d3252bd294643)
Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-104266) (#104278)
gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (GH-104266)
(cherry picked from commit 06c2a4858b8806abc700a0471434067910db54ec)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
|