| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
(GH-27857)
(cherry picked from commit 2396fa6537d79554ac694dbd2b0b30eeb3476c80)
Co-authored-by: Florin Spătar <florin.spatar@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
"unicode-escape" codec (GH-28939) (GH-28945)
They support now splitting escape sequences between input chunks.
Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit f79f3b41c8c1360d4e0ae884a52d0a486974ca53)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
| |
PySys_Audit() (GH-28862)
(cherry picked from commit 9883ca498d654a4792d530bd8d6d64fef4dc971c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit db693df3e112c5a61f2cbef63eedce3a36520ded)
Automerge-Triggered-By: GH:JulienPalard
|
|
|
|
|
|
|
| |
sub-interpreters. (GH-27794) (GH-28741)
(cherry picked from commit b9bb74871b27d9226df2dd3fce9d42bda8b43c2b)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-28683)
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.
configure now checks if the sem_clockwait() function is available.
(cherry picked from commit 6df8c327532627d6a99991993c52e8e4a9b34968)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
| |
Release the GIL while performing isatty() system calls on arbitrary
file descriptors. In particular, this affects os.isatty(),
os.device_encoding() and io.TextIOWrapper. By extension,
io.open() in text mode is also affected.
(cherry picked from commit 06148b1870fceb1a21738761b8e1ac3bf654319b)
Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
exception (GH-28119) (GH-28135)
* bpo-45083: Include the exception class qualname when formatting an exception (GH-28119)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit b4b6342848ec0459182a992151099252434cc619)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
| |
Fix a crash in the signal handler of the faulthandler module: no
longer modify the reference count of frame objects.
(cherry picked from commit fe997e1a67835a929705c8c305d41c4d7dd326e3)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
in its context chain (GH-27626) (GH-27707)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c4957a8084ac3f92ae012ece5edc7cb)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
|
| |
__build_class__ (GH-27647) (GH-27651)
(cherry picked from commit a40675c659cd8c0699f85ee9ac31660f93f8c2f5)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix the os.set_inheritable() function on FreeBSD 14 for file
descriptor opened with the O_PATH flag: ignore the EBADF error on
ioctl(), fallback on the fcntl() implementation.
(cherry picked from commit c24896c0e3b32c8a9f614ef51366007b67d5c665)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
gen.throw. (GH-17658) (GH-27573)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit 83ca46b7784b7357d82ec47b33295e09ed7380cb)
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
(#26831)
(cherry picked from commit 06cda808f149fae9b4c688f752b6eccd0d455ba4)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
| |
marshal.dumps (GH-26971)
|
|
|
|
|
|
|
| |
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.
(cherry picked from commit 489699ca05bed5cfd10e847d8580840812b476cd)
|
|
|
|
|
|
|
| |
precision time source (GH-26568)
(cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f)
Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26522)
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit f3491242e41933aa9529add7102edb68b80a25e9)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
|
|
|
| |
(GH-25096) (GH-25847)
(cherry picked from commit 9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 4aeee0b47b3a2b604bbac37040320ffc88c291f2)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
| |
extension modules (GH-26025)
|
|
|
|
|
|
|
|
| |
Accessing the following attributes will now fire PEP 578 style audit hooks as (object.__getattr__, obj, name):
* PyTracebackObject: tb_frame
* PyFrameObject: f_code
* PyGenObject: gi_code, gi_frame
* PyCoroObject: cr_code, cr_frame
* PyAsyncGenObject: ag_code, ag_frame
|
|
|
|
| |
objects from file locations (GH-25121)
|
|
|
|
|
|
|
| |
(#25179)
This reverts commit 8b795ab5541d8a4e69be4137dfdc207714270b77.
It changed the PyThreadState structure size, breaking the ABI in 3.9.3.
|
|
|
|
|
|
|
|
|
| |
sys.stderr (GH-25075) (GH-25083)
(cherry picked from commit 09b90a037d18f5d4acdf1b14082e57bda78e85d3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-24895) (GH-24948)
(cherry picked from commit 2fd16ef406bba239b1334057fb499496a84b3aa2)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Automerge-Triggered-By: GH:pitrou
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python no longer fails at startup with a fatal error if a command
line argument contains an invalid Unicode character.
The Py_DecodeLocale() function now escapes byte sequences which would
be decoded as Unicode characters outside the [U+0000; U+10ffff]
range.
Use MAX_UNICODE constant in unicodeobject.c.
(cherry picked from commit 9976834f807ea63ca51bc4f89be457d734148682)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
(GH-24873)
|
|
|
|
|
| |
* Use counter, rather boolean state when handling soft overflows.
(cherry picked from commit 4e7a69bdb63a104587759d7784124492dcdd496e)
|
|
|
|
|
| |
(GH-24172) (GH-24278)
(cherry picked from commit 7dc71c425cf6aa6a4070a418dce5d95ca435c79f)
|
|
|
|
|
| |
(cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
| |
(cherry picked from commit 40125ab3252453bf205ed906e46bf9741c27bf9d)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix encoding name when running a ".pyc" file on Windows:
PyRun_SimpleFileExFlags() now uses the correct encoding to decode the
filename.
* Add pyrun_file() subfunction.
* Add pyrun_simple_file() subfunction.
* PyRun_SimpleFileExFlags() now calls _Py_fopen_obj() rather than
_Py_fopen().
(cherry picked from commit b6d98c10fff6f320f8fdf595c3f9a05d8be4e31d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:
- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip
Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1cd61f42ecd3056c554922f359a1a35d)
|
|
|
|
|
| |
(cherry picked from commit 99b594404d364b363c184f48338d6ee81bee26dd)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)
Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com>
* Add support for macOS 11 and Apple Silicon (aka arm64)
As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy
* Support building on recent versions of macOS while deploying to older versions
This allows building installers on macOS 11 while still supporting macOS 10.9..
(cherry picked from commit 41761933c1c30bb6003b65eef1ba23a83db4eae4)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* Back port of changes to _decimal to support arm64
* temp_dir is in test.support in 3.9
|
|
|
| |
(cherry picked from commit d1e38d4023aa29e7ed64d4f8eb9c1e4a3c86a2e5)
|
|
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
(cherry picked from commit 07f2adedf0940b06d136208ec386d69b7d2d5b43)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(GH-22395) (GH-23303)
* bpo-39934: backport PR 22395 to 3.9
|
|
|
|
|
|
| |
bpo-41686, bpo-41713: On Windows, the SIGINT event,
_PyOS_SigintEvent(), is now created even if Python is configured to
not install signal handlers (PyConfig.install_signal_handlers=0 or
Py_InitializeEx(0)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, fix a regression in signal handling which prevented to
interrupt a program using CTRL+C. The signal handler can be run in a
thread different than the Python thread, in which case the test
deciding if the thread can handle signals is wrong.
On Windows, _PyEval_SignalReceived() now always sets eval_breaker to
1 since it cannot test _Py_ThreadCanHandleSignals(), and
eval_frame_handle_pending() always calls
_Py_ThreadCanHandleSignals() to recompute eval_breaker.
(cherry picked from commit d96a7a83133250377219227b5cfab4dbdddc5d3a)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
| |
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows
(cherry picked from commit f2312037e3a974d26ed3e23884f94c6af111a27a)
Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running in a non-UTF-8 locale, if an error occurs while importing a
native Python module (say because a dependent share library is missing),
the error message string returned may contain non-ASCII code points
causing a UnicodeDecodeError.
PyUnicode_DecodeFSDefault is used for buffers which may contain
filesystem paths. For consistency with os.strerror(),
PyUnicode_DecodeLocale is used for buffers which contain system error
messages. While the shortname parameter is always encoded in ASCII
according to PEP 489, it is left decoded using PyUnicode_FromString to
minimize the changes and since it should not affect the decoding (albeit
_potentially_ slower).
In dynload_hpux, since the error buffer contains a message generated
from a static ASCII string and the module filesystem path,
PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as
is used elsewhere.
* bpo-41894: Fix bugs in dynload error msg handling
For both dynload_aix and dynload_hpux, properly handle the possibility
that decoding strings may return NULL and when such an error happens,
properly decrement any previously decoded strings and return early.
In addition, in dynload_aix, ensure that we pass the decoded string
*object* pathname_ob to PyErr_SetImportError instead of the original
pathname buffer.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 2d2af320d94afc6561e8f8adf174c9d3fd9065bc)
Co-authored-by: Kevin Adler <kadler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result.
* Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and
the original exception raised before calling remove_module() is lost.
* There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().
(cherry picked from commit 8287aadb75f6bd0154996424819334cd3839707c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix the compiler warning:
format specifies type `wint_t` (aka `int`) but the argument has type `unsigned int`
(cherry picked from commit c322948892438a387d752ec18d1eb512699a4d67)
Co-authored-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
|