| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit 5d30544485dc56ab999ad7656ef6559306fd013f)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
| |
(cherry picked from commit 4c1145bb3796c550d477c8c154ff980d566fe4a2)
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
|
|
|
|
|
|
|
|
|
| |
(#98317)
[3.11] gh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule` (GH-98158).
(cherry picked from commit 7b48d02933639c91ebd957b2326d8c352d8eddec)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
| |
(cherry picked from commit f01b56c7bdec239abe0dae2706f8325f4336249c)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
| |
On macOS, fix a crash in syslog.syslog() in multi-threaded
applications. On macOS, the libc syslog() function is not
thread-safe, so syslog.syslog() no longer releases the GIL to call
it.
(cherry picked from commit d4b91663857e85eab1f309cacec4d27b5f6657ec)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
(cherry picked from commit cae7d1d7a713f8267daf5e4f2fff5cb1dad02c7c)
|
|
|
|
|
| |
(cherry picked from commit 1523c9e9d47e7d67e4889987ff0f38eb7b881fdd)
Co-authored-by: Hagai Helman Tov <hagai.helman@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 676d8ef3806758bcd1d3fd84a746c8a9b64480d0)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(gh-97965)
(cherry picked from commit b9d2e8171696514e9226164005f7bf24bf69e66d)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
| |
Reason: we were too hasty in deprecating this.
We shouldn't deprecate it before we have a replacement.
(cherry picked from commit 09de8d7aafece264720afbca3052a63eee413b73)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-97944) (#97969)
The macOS 13 SDK includes support for the `mkfifoat` and `mknodat` system calls.
Using the `dir_fd` option with either `os.mkfifo` or `os.mknod` could result in a
segfault if cpython is built with the macOS 13 SDK but run on an earlier
version of macOS. Prevent this by adding runtime support for detection of
these system calls ("weaklinking") as is done for other newer syscalls on
macOS.
(cherry picked from commit 6d0a0191a4e5477bd843e62c24d7f3bcad4fd5fc)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
| |
(cherry picked from commit f8cbd79d328d90443acabc41d246332c302c815a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
Py_UNICODE converter (GH-97729) (GH-97757)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
(cherry picked from commit 0ee9619a4cba58730c45e65d22288fadbf7680de)
|
|
|
|
|
|
| |
Evil code could cause fut_callbacks to be cleared when PyObject_RichCompareBool is called.
(cherry picked from commit 63780f4599acc2c5ee8af5f37ab76c162ad21065)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the Python path configuration used to initialized sys.path at
Python startup. Paths are no longer encoded to UTF-8/strict to avoid
encoding errors if it contains surrogate characters (bytes paths are
decoded with the surrogateescape error handler).
getpath_basename() and getpath_dirname() functions no longer encode
the path to UTF-8/strict, but work directly on Unicode strings. These
functions now use PyUnicode_FindChar() and PyUnicode_Substring() on
the Unicode path, rather than strrchr() on the encoded bytes string.
(cherry picked from commit 9f2f1dd131b912e224cd0269adde8879799686c4)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
| |
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
(cherry picked from commit 10e3d398c31cc1695752fc52bc6ca2ce9ef6237e)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
|
|
|
| |
* gh-96821: Assert for demonstrating undefined behaviour
* Fix UB
(cherry picked from commit cbdeda8ce7a3543cb3376d70e4cd46fcf24f42a7)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-96038)
- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
files `pybuilddir.txt` and `pyenv.cfg`.
|
|
|
|
|
|
|
|
|
| |
frame object. (GH-96776) (#96787)
(cherry picked from commit 12c5f328d2479ac3432df5e266adc4e59adeabfe)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH-96045, GH-96389, GH-96744) (GH-96749)
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.
``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.
|
|
|
|
|
|
|
|
| |
Fix the faulthandler implementation of faulthandler.register(signal,
chain=True) if the sigaction() function is not available: don't call
the previous signal handler if it's NULL.
(cherry picked from commit c580a81af91af4b9df85e466f8b48c3c9c86c3df)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 2fd7246e97c8cc09b4e3f22933693f9d68f08163)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
(#96617)
(cherry picked from commit 95e271b2266b8f2e7b60ede86ccf3ede4a7f83eb)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
| |
(cherry picked from commit 0ace820bec8892d621a4aadc1feb6c56e25560bf)
Co-authored-by: Ansab Gillani <56605828+ansabgillani@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit b2afe482f21b826d53886a69ea2c99d0d940c59a)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit 8b34e914bba2ccd6ae39609410db49d0beb19cb1)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-32197)" (GH-95442) (GH-95652)
This reverts commit d4bb38f82bf18b00db3129031ce4969b6f0caab9.
(cherry picked from commit 0342c93a6b866118c894c4e1120fb4db316adebb)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(cherry picked from commit 42b102bbf9a9ae6fae8f6710202fb7afeeac277c)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
| |
It updates links which redirect to HTTPS with different authority or
path.
(cherry picked from commit d0d0154443cafb2f0a2cdfb6a1267d80cce8388e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(GH-95246). (#95256)" (#95647)
This reverts commit 7f731943393d57cf26ed5f2353e6e53084cd55fd.
|
|
|
|
|
| |
* Add test for inheriting explicit __dict__ and weakref.
* Restore 3.10 behavior for multiple inheritance of C extension classes that store their dictionary at the end of the struct.
|
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
(GH-95272)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit 4dd099bafff14639ef5d2185965016d8f253353f)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
| |
PyObject_GC_UnTrack during deallocation in debug mode (GH-95325) (#95336)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit deacf391d7a1b3ab49bffa16088b3500fdb4c435)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-95264)
(cherry picked from commit b1f648efc56ff17e18ec2b7402d59a771b305004)
Co-authored-by: Noam Cohen <noam@noam.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* syslog_get_argv() swallows exceptions, but not in all cases.
* if ident is non UTF-8 encodable, syslog.openlog() fails after setting the
global reference to ident. Now the C string saved internally in the previous
call to openlog() points to the freed memory.
* PySys_Audit() can crash if ident is NULL.
* There may be a race condition with syslog.syslog(), because the global
reference to ident is decrefed before setting the new value.
* Possible use of freed memory if syslog.openlog() is called while
the GIL is released in syslog.syslog().
(cherry picked from commit 68c555a50a2b74731b0db0f4dcbf51b2c11d4853)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(#95256)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
| |
(cherry picked from commit d291a82df33cd8c917a374fef2a2373beda78b77)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
factory (GH-95146) (#95158)
This PR partially reverts gh-24421 (PR) and fixes the remaining concerns
given in gh-93044 (issue):
- keyword arguments are passed as positional arguments to factory()
- if an argument is not passed to sqlite3.connect(), its default value
is passed to factory()
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>.
(cherry picked from commit a3d4d15f53777662ce0957500e5a538ce7161f5e)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
|
| |
The wrapper macros are more readable and match the form recommended in
the OpenSSL documentation. They also slightly less error-prone, as the
mapping of arguments to SSL_CTX_ctrl is not always clear. (Though in
this case it's straightforward.)
https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_get_max_proto_version.html
(cherry picked from commit 936f71e5d4f50f2238b0320d44f7fb5f88e39809)
Co-authored-by: David Benjamin <davidben@davidben.net>
|
|
|
|
|
| |
(cherry picked from commit 1834133e66d95a143c9df5f068b3109927aefd65)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-94891)
(cherry picked from commit f36589510b8708fa224d799d5b328deab558aa4e)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
| |
(cherry picked from commit 067f0da33506f70c36a67d5f3d8d011c8dae10c9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 631160c262b40bf4ce3da6cd7bbb972ae2e9fc91)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When binding a unix socket to an empty address on Linux, the socket is
automatically bound to an available address in the abstract namespace.
>>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> s.bind("")
>>> s.getsockname()
b'\x0075499'
Since python 3.9, the socket is bound to the one address:
>>> s.getsockname()
b'\x00'
And trying to bind multiple sockets will fail with:
Traceback (most recent call last):
File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind
s2.bind("")
OSError: [Errno 98] Address already in use
Added 2 tests:
- Auto binding empty address on Linux
- Failing to bind an empty address on other platforms
Fixes f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
(cherry picked from commit c22f134211743cd5ad14cec1dd4f527bee542b4c)
Co-authored-by: Nir Soffer <nsoffer@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 01ef1f95dab9c9930ce1a23634a3e5a8331bf3c7)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
| |
raised multiple times (GH-30274) (#94747)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|