summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) (GH-29361)Miss Islington (bot)2021-11-021-0/+1
| | | Co-authored-by: Christian Heimes <christian@python.org>
* Fix format string in _PyImport_LoadDynamicModuleWithSpec() (GH-28863)Miss Islington (bot)2021-10-121-1/+1
| | | | | (cherry picked from commit f79f3b41c8c1360d4e0ae884a52d0a486974ca53) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Handle error when PyUnicode_GetLength returns a negative value. (GH-28859)Miss Islington (bot)2021-10-111-0/+3
| | | | | (cherry picked from commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing ↵Miss Islington (bot)2021-10-111-1/+1
| | | | | | | PySys_Audit() (GH-28862) (cherry picked from commit 9883ca498d654a4792d530bd8d6d64fef4dc971c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] Fix typos in the Python directory (GH-28767) (GH-28799)Christian Clauss2021-10-076-8/+8
| | | (cherry picked from commit db693df3e112c5a61f2cbef63eedce3a36520ded)
* bpo-44050: Extension modules can share state when they don't support ↵Miss Islington (bot)2021-10-051-1/+3
| | | | | | | | sub-interpreters. (GH-27794) (GH-28738) Automerge-Triggered-By: GH:encukou (cherry picked from commit b9bb74871b27d9226df2dd3fce9d42bda8b43c2b) Co-authored-by: Hai Shi <shihai1992@gmail.com>
* [3.10] bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720). (GH-28721)Serhiy Storchaka2021-10-041-1/+1
| | | | (cherry picked from commit 252b7bcb236dc261f3af1275bc90f9a303d9648f)
* [3.10] bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size ↵Serhiy Storchaka2021-10-042-5/+5
| | | | | | of the code unit (GH-28711). (GH-28718) (cherry picked from commit 60b9e040c9cf40e69f42c0008e564458aa0379e8)
* [3.10] Remove trailing spaces (GH-28709)Serhiy Storchaka2021-10-031-2/+2
|
* bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671)Victor Stinner2021-10-011-12/+41
| | | | | | | | | 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.
* Move predispatch logic from DISPATCH macro to juts before switch. Reduces ↵Mark Shannon2021-09-291-7/+15
| | | | size of each opocde in interpreter. (GH-28475)
* [3.10] bpo-45307: Restore private C API function ↵Serhiy Storchaka2021-09-281-0/+17
| | | | | | | | _PyImport_FindExtensionObject() (GH-28594) py2exe and PyOxidizer rely on this API. It will be removed in Python 3.11. Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-45183: don't raise an exception when calling ↵Brett Cannon2021-09-181-1/+1
| | | | | | | | zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435) (#28438) This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path). (cherry picked from commit 209b7035f714dcc41df054b0b023e0b955d7e1a2) Co-authored-by: Brett Cannon <brett@python.org>
* [3.10] bpo-34602: Quadruple stack size on macOS when compiling with UBSAN ↵Łukasz Langa2021-09-151-7/+6
| | | | | | | (GH-27309) (GH-28280) (cherry picked from commit be9de8721d63b9d8e032d508069daf88c06542c6) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44219: Release the GIL during isatty syscalls (GH-28250) (GH-28255)Miss Islington (bot)2021-09-091-2/+14
| | | | | | | | | 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>
* [3.10] bpo-45083: Include the exception class qualname when formatting an ↵Miss Islington (bot)2021-09-082-36/+38
| | | | | | | | | | | | exception (GH-28119) (GH-28134) 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> * Use a private version of _PyType_GetQualName Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.10] bpo-45056: Remove trailing unused constants from co_consts (GH-28109) ↵Łukasz Langa2021-09-084-4611/+4641
| | | | | | | (GH-28125) (cherry picked from commit 55c4a92fc1abfe388335071f1d64b3addfa5793f) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) ↵Miss Islington (bot)2021-09-071-1/+1
| | | | | | | (GH-28199) Fix PyAiter_Check to only check for the `__anext__` presense (not for `__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`, `PyObject_GetAiter()` -> `PyObject_GetAIter()`.
* bpo-45039: Consistently use ADDOP_LOAD_CONST in compiler rather than ↵Miss Islington (bot)2021-08-311-2/+4
| | | | | | | ADDOP_O(c, LOAD_CONST,...) (GH-28015) (cherry picked from commit 70ccee418d1f9d34ed15cfe7104221f9cfd27d03) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* bpo-45061: Enhance faulthandler traceback wit no Python frame (GH-28090)Miss Islington (bot)2021-08-311-1/+1
| | | | | | | | | | | Fix indentation of <no Python frame> message in a faulthandler traceback or a Fatal Python error traceback. Example: Current thread 0x00007f03896fb740 (most recent call first): Garbage-collecting <no Python frame> (cherry picked from commit 888d4cc06b887e77f281ba4d640e281cb4c61b7b) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-44449: faulthandler don't modify frame refcnt (GH-27850)Victor Stinner2021-08-301-5/+5
| | | | Fix a crash in the signal handler of the faulthandler module: no longer modify the reference count of frame objects.
* bpo-45000: Raise SyntaxError when try to delete __debug__ (GH-27947) (GH-27957)Dong-hee Na2021-08-261-0/+4
| | | (cherry picked from commit 551da597a0996b0fb3af425f48aa5bc63ea6b963)
* bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle ↵Miss Islington (bot)2021-08-101-1/+15
| | | | | | | | in its context chain (GH-27626) 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>
* Remove unused variable. (GH-27677) (#27680)Mark Shannon2021-08-091-3/+0
|
* bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to ↵Mark Shannon2021-08-094-3803/+3814
| | | | | after CFG optimization. (GH-27656) (#27673) (cherry picked from commit b854557b49083d8625a433eb36aacb0c87d67c52)
* bpo-44856: Possible reference leak in error paths of update_bases() and ↵Miss Islington (bot)2021-08-071-22/+13
| | | | | | | __build_class__ (GH-27647) (cherry picked from commit a40675c659cd8c0699f85ee9ac31660f93f8c2f5) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623)Miss Islington (bot)2021-08-061-3/+4
| | | | | | | | 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>
* bpo-44584: Deprecate PYTHONTHREADDEBUG env var (GH-27065)Miss Islington (bot)2021-08-062-0/+24
| | | | | | | | The threading debug (PYTHONTHREADDEBUG environment variable) is deprecated in Python 3.10 and will be removed in Python 3.12. This feature requires a debug build of Python. (cherry picked from commit 4d77691172aae81bdcbb0ea75839d0e896c43781) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-39091: Fix segfault when Exception constructor returns non-exception for ↵Miss Islington (bot)2021-08-031-4/+16
| | | | | | | | gen.throw. (GH-17658) (GH-27572) Co-authored-by: Benjamin Peterson <benjamin@python.org> (cherry picked from commit 83ca46b7784b7357d82ec47b33295e09ed7380cb) Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
* bpo-32280: Store _PyRuntime in a named section (GH-4802) (#27448)Miss Islington (bot)2021-07-291-2/+28
| | | | | | | | | | This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table. Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit 35002aa8f62dda1f79035e9904abdf476683e9be) Co-authored-by: Max Bélanger <aeromax@gmail.com> Co-authored-by: Max Bélanger <aeromax@gmail.com>
* [3.10] bpo-43897: Reject "_" captures and top-level MatchStar in the AST ↵Miss Islington (bot)2021-07-291-20/+28
| | | | | | | | | | validator (GH-27432) (GH-27435) (cherry picked from commit 8d0647485db5af2a0f0929d6509479ca45f1281b) Co-authored-by: Brandt Bucher <brandt@python.org> Automerge-Triggered-By: GH:brandtbucher
* bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) ↵Miss Islington (bot)2021-07-261-1/+1
| | | | | | | | (GH-27380) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 11749e2dc20ad6a76e9a39e948853e89b2b4bbed) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* [3.10] bpo-44600: Fix line numbers for pattern matching cleanup code ↵Miss Islington (bot)2021-07-261-4/+12
| | | | | | | | | | (GH-27346) (GH-27356) (cherry picked from commit 4214f470f0cb9b6fef9a90758756fbc00ba95b5a) Co-authored-by: Charles Burkland <charles.aburkland@gmail.com> Automerge-Triggered-By: GH:brandtbucher
* bpo-44645: Check for interrupts on any potentially backwards edge (GH-27216) ↵Miss Islington (bot)2021-07-191-1/+6
| | | | | | | (GH-27235) (cherry picked from commit d09c13417890427f829e3df297beb0e27133f8f4) Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-44655: Include the name of the type in unset __slots__ attribute errors ↵Miss Islington (bot)2021-07-171-4/+9
| | | | | | | | | (GH-27199) (GH-27201) (cherry picked from commit f783428a2313a729ca8b539c5a86ff114b9ff375) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-44655: Don't include suggestions for attributes that are the same as the ↵Miss Islington (bot)2021-07-161-0/+3
| | | | | | | missing one (GH-27197) (GH-27198) (cherry picked from commit 6714dec5e104bdee4a0ed4d9966de27d1bfa1e3d) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Revert "bpo-44645: Check for interrupts on any potentially backwards edge. ↵Miss Islington (bot)2021-07-161-6/+1
| | | | | | | | (GH-27167)" (GH-27194) (#27195) This reverts commit 000e70ad5246732fcbd27cf59268185cbd5ad734. (cherry picked from commit c90c591e5158ab7b531dcd6e2a5f00bc70ba7637) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-44626: Merge basic blocks earlier to enable better handling of exit ↵Mark Shannon2021-07-163-3819/+3856
| | | | | blocks without line numbers (GH-27138) (GH-27182) (cherry picked from commit a86f7dae0acf918d54086cb85e5a0b0bedeedce7)
* [3.10] bpo-44645: Check for interrupts on any potentially backwards edge. ↵Mark Shannon2021-07-161-1/+6
| | | | | | | (GH-27167) (GH-27183) (cherry picked from commit 000e70ad5246732fcbd27cf59268185cbd5ad734) Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. ↵Mark Shannon2021-07-151-1/+3
| | | | | (GH-27160) (GH-27163) (cherry picked from commit f333ab0f2edec26a769ed558263ac662e5475451)
* [3.10] bpo-44589: raise a SyntaxError when mapping patterns have duplicate ↵Miss Islington (bot)2021-07-151-4/+41
| | | | | | | | | | literal keys (GH-27131) (GH-27157) (cherry picked from commit 2693132292b2acf381ac6fa729bf3acf41d9d72b) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com> Automerge-Triggered-By: GH:brandtbucher
* bpo-44616: Mark all clean up instructions at end of named exception block as ↵Mark Shannon2021-07-141-3/+2
| | | | | artificial (GH-27109) (GH-27135) (cherry picked from commit e5862f79c16e28f1ec51d179698739a9b2d8c1d2)
* bpo-44472: Fix ltrace functionality when exceptions are raised (GH-26822) ↵Miss Islington (bot)2021-07-131-0/+3
| | | | | | | | | (GH-26830) (cherry picked from commit 06cda808f149fae9b4c688f752b6eccd0d455ba4) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.10] bpo-43897: ast validation for pattern matching nodes (GH-27074)Batuhan Taskaya2021-07-101-31/+123
| | | | | (cherry picked from commit 8dcb7d98086888230db94a1eb07bae1b5db82bc9) Co-authored-by: Batuhan Taskaya <batuhan@python.org>
* bpo-44570: Fix line tracing for forward jumps to duplicated tails (GH-27067)Mark Shannon2021-07-081-19/+13
|
* bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and ↵Steve Dower2021-06-301-10/+20
| | | | marshal.dumps (GH-26970)
* bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)Victor Stinner2021-06-231-0/+3
| | | | | | | 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)
* bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)Victor Stinner2021-06-211-0/+4
| | | | | | The faulthandler module now detects if a fatal error occurs during a garbage collector collection (only if all_threads is true). (cherry picked from commit d19163912bfc790283724f05328bd31e4e65003d)
* bpo-44297: Fix missing line number in generator expressions (GH-26821)Mark Shannon2021-06-212-958/+959
| | | | | * Make sure that line number is set when entering comprehension scope in compiler. (cherry picked from commit 82e5c28af7049c4f5343c808f172cbe2e145f49b)
* bpo-41299: Reduce lag in Windows threading timeouts by using a higher ↵Miss Islington (bot)2021-06-201-4/+10
| | | | | | | | | precision time source (GH-26568) (GH-26580) (cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f) Co-authored-by: Ryan Hileman <lunixbochs@gmail.com> Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>