| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`_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>
|
| |
|
|
|
|
|
|
|
| |
(GH-13503) (GH-112598)
* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
(cherry picked from commit 0daf555c6fb3feba77989382135a58215e1d70a5)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms.
This because on Arm platforms structs with at most 4 elements of any
floating point type values can be passed through registers. If the type
is double the maximum size of the struct is 32 bytes.
On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
(cherry picked from commit bc68f4a4abcfbea60bb1db1ccadb07613561931c)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
calls to 1gig (GH-112615) (#112725)
gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (GH-112615)
Work around a macOS bug, limit zlib crc32 calls to 1GiB.
Without this, `zlib.crc32` and `binascii.crc32` could produce incorrect
results on multi-gigabyte inputs depending on the macOS version's Apple
supplied zlib implementation.
(cherry picked from commit 4eddb4c9d9452482c9af7fa9eec223d12b5a9f33)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
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>
|