| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix GCC 9.3 (using -O3) warnings on x86:
initconfig.c: In function ‘init_dump_ascii_wstr’:
initconfig.c:2679:34: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
2679 | PySys_WriteStderr("%lc", ch);
initconfig.c:2682:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
2682 | PySys_WriteStderr("\\x%02x", ch);
initconfig.c:2686:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
2686 | PySys_WriteStderr("\\U%08x", ch);
initconfig.c:2690:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
2690 | PySys_WriteStderr("\\u%04x", ch);
(cherry picked from commit 640e8e1d5f61d5868453d992da04bf4741327748)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 58de1dd6a8677bd213802c19204b827cb7134695)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-21847) (GH-22015)
Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack
(cherry picked from commit 75c80b0bda89debf312f075716b8c467d411f90e)
Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
|
| |
|
|
|
|
|
| |
(cherry picked from commit ea62a4bd54421693ed6b24a1bbd18ebed3bdb8f8)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
|
| |
3.8.3 had a regression where compiling with
ast.PyCF_ALLOW_TOP_LEVEL_AWAIT woudl agressively mark things are
coroutine even if there were not.
(cherry picked from commit bd46174a5a09a54e5ae1077909f923f56a7cf710)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
|
|
|
|
|
|
|
|
| |
is embedded (GH-21297) (GH-21352)
Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523
(cherry picked from commit dcbaa1b49cd9062fb9ba2b9d49555ac6cd8c60b5)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
| |
Co-authored-by: Konge <zkonge@outlook.com>
|
|
|
|
|
| |
(cherry picked from commit d160e0f8e283d0a8737644588b38e8c6a07c134f)
Co-authored-by: tkmikan <36260601+tkmikan@users.noreply.github.com>
|
|
|
|
| |
(#21023)
|
|
|
|
|
| |
(GH-21184)
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
| |
(cherry picked from commit 6c6810d98979add7a89391c3c38990d0859f7a29)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-21013)
Reported by Coverity. (CID 1457554 RETURN_LOCAL)
path0 is assigned as a pointer to this right before it goes out of scope.
(cherry picked from commit 81328f30703bd7225e7e73aedb0994a7293ce190)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9672912e8f90374fd31b37ca0fb7cefbc6f4c555)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit 29c117202e386bad1d66ae336e2fefa1a1809ee0)
Co-authored-by: An Long <aisk@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 68874a8502da440a1dc4746cf73262648b870aee)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
|
|
|
|
|
|
| |
(GH-20466)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit c116c94ff119485761460f1033cdee425bed0310)
|
|
|
|
|
| |
(cherry picked from commit c73914a562580ae72048876cb42ed8e76e2c83f9)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
|
|
| |
ast_unparse.c (GH-20156). (GH-20191)
(cherry picked from commit 2135e10dc717c00d10d899d232bebfc59bb25032)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 98e42d1f882b9b59f587d538c562dbc7d11c64c3)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
|
|
|
|
|
|
| |
(GH-20137)
(cherry picked from commit f660567937277cc3a2cd53af77bbb18e905427e8)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clarify the zip built-in docstring.
This puts much simpler text up front along with an example.
As it was, the zip built-in docstring was technically correct. But too
technical for the reader who shouldn't _need_ to know about `__next__` and
`StopIteration` as most people do not need to understand the internal
implementation details of the iterator protocol in their daily life.
This is a documentation only change, intended to be backported to 3.8; it is
only tangentially related to PEP-618 which might offer new behavior options
in the future.
Wording based a bit more on enumerate per Brandt's suggestion.
This gets rid of the legacy wording paragraph which seems too tied to
implementation details of the iterator protocol which isn't relevant here.
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 6a5d3ff67644af42b1a781be2eacb2e82913441c)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
| |
(cherry picked from commit 2668a9a5aa506a048aef7b4881c8dcf6b81c6870)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
(GH-19934)
Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd466bf14029e2687e36e965875adf9d4be1a)
Co-authored-by: Robert Rouhani <robert.rouhani@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.
Automerge-Triggered-By: @brettcannon
(cherry picked from commit 64224a4727321a8dd33e6f769edda401193ebef0)
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-19835)
The constant values of future flags in the __future__ module
is updated in order to prevent collision with compiler flags.
Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing
with CO_FUTURE_DIVISION..
(cherry picked from commit 4454057269b995341b04d13f0bf97f96080f27d0)
Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
| |
If _PyCode_InitOpcache() fails in _PyEval_EvalFrameDefault(), use
"goto exit_eval_frame;" rather than "return NULL;" to exit the
function in a consistent state. For example, tstate->frame is now
reset properly.
(cherry picked from commit 25104949a5a60ff86c10691e184ce2ecb500159b)
|
|
|
|
|
|
|
| |
SIPHASH24. (GH-19373)
(cherry picked from commit 1b21573)
Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
| |
Document individual signals (only the most common signals):
description, default action, availability.
(cherry picked from commit 400e1dbcad93061f1f7ab4735202daaa5e731507)
|
|
|
|
|
|
|
|
|
|
| |
PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).
Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.
(cherry picked from commit 5804f878e779712e803be927ca8a6df389d82cdf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-9516) (GH-19110)
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS
This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.
Leaving the environment variable present may lead to misbehaviour when
launching other scripts.
* Actually commit the changes for issue 22490...
* Correct typo
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
(cherry picked from commit 044cf94f610e831464a69a8e713dad89878824ce)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
|
| |
(GH-18968)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 9052f7a41b90f2d34011c8da68f9a4facebc8a97)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|
|
|
|
|
|
| |
If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(),
log the error as an unraisable exception.
(cherry picked from commit f6a58507820c67e8d0fb07875cd1b1d9f5e510a8)
|
|
|
|
|
|
|
| |
functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
(cherry picked from commit 90235810ec28ca954bbf4b61a5ae5df7a00db409)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow
in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx
returns, causing the loop to think it needs to wait another 49 days. This is
most likely to happen when the machine is hibernated during
WaitForSingleObjectEx.
This makes acquiring a lock/event/etc from the _thread or threading module
appear to never timeout.
Replace with GetTickCount64 - this is OK now Python no longer supports XP which
lacks it, and is in use for time.monotonic().
Co-authored-by: And Clover <and.clover@bromium.com>
(cherry picked from commit 64838ce7172c7a92183b39b22504b433a33a884d)
Co-authored-by: bobince <and+github@doxdesk.com>
|
|
|
|
|
| |
(cherry picked from commit 185903de12de8837bf0dc0008a16e5e56c66a019)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit ae75a294352e9b9487f5dc8e88f068e7e6974dc2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
- Threads created by PyGILState_Ensure() could have a duplicate tstate->id.
(cherry picked from commit b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9)
|
|
|
|
|
| |
(cherry picked from commit 2d2f855)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
_PyEval_SetAsyncGenFinalizer() and _PyEval_SetAsyncGenFirstiter()
didn't include proper error handling for their PySys_Audit() calls.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
| |
with exception raised. (GH-18656). (GH-18732)
(cherry picked from commit 28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb)
|
|
|
|
|
|
|
|
|
|
| |
(GH-18131) (GH-18133)
https://bugs.python.org/issue39427
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 41f0ef6abbd304409c55612a08788cdd59fbc8a3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
*. (GH-18511)
(cherry picked from commit 7386a70746cf9aaf2d95db75d9201fb124f085df)
Co-authored-by: Andy Lester <andy@petdance.com>
|
|
|
|
|
| |
(cherry picked from commit 6e619c48b8e804ece9521453fc8da0640a04d5b1)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
Adding the const to the type cast, as in:
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
These changes will not change code, but they will make it much easier to check for errors in consts
(cherry picked from commit e6be9b59a911626d6597fe148c32f0342bd2bd24)
Co-authored-by: Andy Lester <andy@petdance.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-18405) (GH-18408)
(cherry picked from commit d2e1098641f98594702ef29049c3c4a3f394786f)
https://bugs.python.org/issue39579
Automerge-Triggered-By: @gvanrossum
|
|
|
|
|
|
|
|
|
|
|
| |
Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be811fa7d
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d39303feb1d3b4194c6a8275b1fc63b2153b2)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17588) (GH-17642)
Fix `NameError` in `zipimport` during hash validation and add a regression test.
(cherry picked from commit 79f02fee1a542c440fd906fd54154c73fc0f8235)
https://bugs.python.org/issue39033
|
|
|
|
|
|
|
|
| |
The fix changes copy_location() to require an extra node from which to extract the end location, and fixing all 5 call sites.
https://bugs.python.org/issue39235
(cherry picked from commit a796d8ef9dd1af65f7e4d7a857b56f35b7cb6e78)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
| |
(cherry picked from commit 7b79dc9200a19ecbac667111dffd58e314be02a8)
Co-authored-by: Anthony Wee <awee@box.com>
|