| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(GH-126792) (GH-126798)
Update libexpat to 2.6.4, make future updates easier.
(cherry picked from commit 3c9996909402fadc98e6ca2a64e75a71a7427352)
|
| |
|
|
| |
(#126542)
|
| |
|
| |
(cherry picked from commit e6fe0ac014e8f5b17064c20d1ae937dbd4c761a2)
|
| |
|
|
|
| |
HEAD_LOCK is called from _PyEval_ReInitThreads->_PyThreadState_DeleteExcept before _PyRuntimeState_ReInitThreads reinit runtime->interpreters.mutex which might be locked before fork.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
| |
audit event (#119734)
gh-119690: Fixes buffer type confusion in _winapi.CreateNamedPipe audit event
|
| |
|
|
|
|
|
| |
(#120314)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
fix _io.TextIOWrapper.write() write during flush (#119507)
|
| |
|
|
| |
(GH-122118)
|
| | |
|
| |
|
|
| |
Upgrade libexpat to 2.6.2
(cherry picked from commit c9829eec0883a8991ea4d319d965e123a3cf6c20)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`_ssl._SSLContext` constructor (GH-117309) (GH-117318)
gh-117310: Remove extra DECREF on "no ciphers" error path in `_ssl._SSLContext` constructor (GH-117309)
Remove extra self DECREF on ssl "no ciphers" error path.
This doesn't come up in practice because nobody links against a broken
OpenSSL library that provides nothing.
(cherry picked from commit 8cb7d7ff86a1a2d41195f01ba4f218941dd7308c)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
(GH-32011) (GH-117210)
(cherry picked from commit f11d0d8be8af28e1368c3c7c116218cf65ddf93e)
Co-authored-by: Erik Soma <stillusingirc@gmail.com>
|
| |
|
|
|
|
|
|
| |
64-bit platforms (GH-117064) (GH-117070) (GH-117075)
(cherry picked from commit da2f9d1417a7d28df6e1ced87d64ecf28acb0a5f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 519b2ae22b54760475bbf62b9558d453c703f9c6)
|
| |
|
| |
Manual backport of gh-116774.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gh-106687: _ssl: use uint64_t for SSL options (#106700)
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html
Fix this compiler warning on Windows with MSC:
conversion from 'uint64_t' to 'long', possible loss of data
(cherry picked from commit ad95c7253a70e559e7d3f25d53f4772f28bb8b44)
|
| |
|
|
|
|
|
|
| |
(GH-116542) (#116644)
gh-116541: Handle errors correctly in `_pystatvfs_fromstructstatvfs` (GH-116542)
(cherry picked from commit f8147d01da44da2434496d868c86c2785f7244cd)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(#116594)
gh-116545: Fix error handling in `mkpwent` in `pwdmodule` (GH-116548)
(cherry picked from commit ffd79bea0f032df5a2e7f75e8c823a09cdc7c7a2)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
`posixmodule` (GH-116521) (#116540)
gh-116520: Fix error handling in `os_get_terminal_size_impl` in `posixmodule` (GH-116521)
(cherry picked from commit b4b4e764a798bab60324871074ce4cdebb9d01bb)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(#116497)
gh-116447: Fix possible UB in `arraymodule` and `getargs` (GH-116459)
(cherry picked from commit fdb2d90a274158aee23b526d972172bf41bd4b7e)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
`posixmodule` (GH-116449) (#116453)
gh-116448: Handle errors correctly in `os_waitid_impl` in `posixmodule` (GH-116449)
(cherry picked from commit 882fcede83af783a834b759e4643130dc1307ee3)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-115623) (#116268)
Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:
- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`
Based on the "flush" idea from #115138 (comment) .
- Please treat as a security fix related to CVE-2023-52425.
(cherry picked from commit 6a95676)
(cherry picked from commit 73807eb)
(cherry picked from commit eda2963)
---------
Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
|
| |
(GH-116405) (#116407)
gh-116404: Handle errors correctly in `wait_helper` in `posixmodule` (GH-116405)
(cherry picked from commit 22ccf13b332902142fe0c52c593f9efc152c7761)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
(GH-115887) (GH-115907)
shm_open() and shm_unlink() now check for embedded null characters in
the name and raise an error instead of silently truncating it.
(cherry picked from commit 79811ededd160b6e8bcfbe4b0f9d5b4589280f19)
|
| |
|
|
|
|
|
| |
(GH-115741) (GH-115867)
(cherry picked from commit c688c0f130906ff7725a126fff143d1389884f89)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
skipinitialspace=True (GH-115721) (GH-115729) (GH-115738)
(cherry picked from commit 5ea86f496a4cfb34abbe2b7bb6fa7f25eeeb6294)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
csv.writer() now quotes empty fields if delimiter is a space and
skipinitialspace is true and raises exception if quoting is not possible.
(cherry picked from commit 937d2821501de7adaa5ed8491eef4b7f3dc0940a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-114573) (#115549)
gh-114572: Fix locking in cert_store_stats and get_ca_certs (GH-114573)
* gh-114572: Fix locking in cert_store_stats and get_ca_certs
cert_store_stats and get_ca_certs query the SSLContext's X509_STORE with
X509_STORE_get0_objects, but reading the result requires a lock. See
https://github.com/openssl/openssl/pull/23224 for details.
Instead, use X509_STORE_get1_objects, newly added in that PR.
X509_STORE_get1_objects does not exist in current OpenSSLs, but we can
polyfill it with X509_STORE_lock and X509_STORE_unlock.
* Work around const-correctness problem
* Add missing X509_STORE_get1_objects failure check
* Add blurb
(cherry picked from commit bce693111bff906ccf9281c22371331aaff766ab)
Co-authored-by: David Benjamin <davidben@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
offsets < 0 (GH-99709) (GH-115600)
lseek() always returns 0 for character pseudo-devices like
`/dev/urandom` (for other non-regular files, e.g. `/dev/stdin`, it
always returns -1, to which CPython reacts by raising appropriate
exceptions). They are thus technically seekable despite not having seek
semantics.
When calling read() on e.g. an instance of `io.BufferedReader` that
wraps such a file, `BufferedReader` reads ahead, filling its buffer,
creating a discrepancy between the number of bytes read and the internal
`tell()` always returning 0, which previously resulted in e.g.
`BufferedReader.tell()` or `BufferedReader.seek()` being able to return
positions < 0 even though these are supposed to be always >= 0.
Invariably keep the return value non-negative by returning
max(former_return_value, 0) instead, and add some corresponding tests.
(cherry picked from commit 26800cf25a0970d46934fa9a881c0ef6881d642b)
Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
|
| |
|
| |
Manual backport due to code differences.
|
| |
|
|
|
|
|
| |
modified (GH-115247) (GH-115466)
(cherry picked from commit 671360161f0b7a5ff4c1d062e570962e851b4bde)
Co-authored-by: kcatss <kcats9731@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strings (GH-114879) (GH-115384)
Immediate merits:
* eliminate complex workarounds for 'z' format support
(NOTE: mpdecimal recently added 'z' support, so this becomes
efficient in the long term.)
* fix 'z' format memory leak
* fix 'z' format applied to 'F'
* fix missing 'GH-' format support
Suggested and prototyped by Stefan Krah.
Fixes gh-114563, gh-91060
(cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2)
(cherry picked from commit 09c98e4633848ce05df8621f41eb09954b55217a)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
| |
(cherry picked from commit 3a5b38e3b465e00f133ff8074a2d4afb1392dfb5)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
io.BufferedRandom.read1() (GH-115163) (GH-115206)
(cherry picked from commit 846fd721d518dda88a7d427ec3d2c03c45d9fa90)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(ПР-115158)
(cherry picked from commit 9e90313320a2af2d9ff7049ed3842344ed236630)
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Co-authored-by: Artem Chernyshev <62871052+dTenebrae@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
license (GH-115094) (GH-115095)
(cherry picked from commit b39119916c0daaf5e5fdfec63e18ad97f29e2e72)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
| |
* gh-89811: Check for valid tp_version_tag in specializer (GH-113558)
* gh-113937 Fix failures in type cache tests due to re-running (GH-113953)
* Update backported code for 3.11 specifically
|
| |
|
|
|
| |
methods without params (#115016) (#115069)
(cherry picked from commit 09096a1647913526a3d4fa69a9d2056ec82a8f37)
|
| |
|
|
|
| |
(cherry picked from commit a06b606462740058b5d52fefdcdcd679d4f40260)
Co-authored-by: Diego Russo <diego.russo@arm.com>
|
| |
|
| |
Currently it switches based on build settings, but argument clinic does not handle it correctly.
|
| |
|
|
|
|
|
|
| |
(GH-114495) (GH-114503)
On Alpine Linux it could leave some field non-initialized.
(cherry picked from commit d22c066b802592932f9eb18434782299e80ca42e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-114243)
Only set filename to cwd if it was caused by failed chdir(cwd).
_fork_exec() now returns "noexec:chdir" for failed chdir(cwd).
(cherry picked from commit e2c097ebdee447ded1109f99a235e65aa3533bf8)
Co-authored-by: Robert O'Shea <PurityLake@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
object destruction (GH-111778) (GH-111990)
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
(cherry picked from commit ce6a533c4bf1afa3775dfcaee5fc7d5c15a4af8c)
Co-authored-by: T. Wouters <thomas@python.org>
|
| |
|
|
|
|
|
|
| |
newline (GH-113786) (GH-113906)
Based on patch by SilentGhost.
(cherry picked from commit 568d220993fa9b4b812ff1b425edd80dbe17dda9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
`lzma._decode_filter_properties` (GH-104283) (GH-114182)
(cherry picked from commit 0154405350c272833bd51f68138223655e142a37)
Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
|
| |
|
|
|
| |
junction (GH-114089)
This avoids impact on later parts of the application which may be able to do things they otherwise shouldn't.
|
| |
|
|
| |
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit c31be58da8577ef140e83d4e46502c7bb1eb9abf)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
|
|
|
| |
write() (GH-22535) (GH-113809)
io.TextIOWrapper was dropping the internal decoding buffer
during read() and write() calls.
(cherry picked from commit 73c93265634257b1488262097e024c1727260cfd)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.
(cherry picked from commit 6644ca45cde9ca1b80513a90dacccfeea2d98620)
Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13374) (GH-113624)
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).
The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.
(cherry picked from commit 5f3cc90a12d6df404fd6f48a0df1334902e271f2)
Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
HP-UX (GH-19856) (GH-113541)
Always include <sys/types.h> before <sys/sysmacros.h>.
(cherry picked from commit f108468970bf4e70910862476900f924fb701399)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|