summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-03-181-41/+26
| | | | (#102769)
* gh-102778: Add sys.last_exc, deprecate sys.last_type, ↵Irit Katriel2023-03-183-3/+9
| | | | sys.last_value,sys.last_traceback (#102779)
* gh-101975: Fixed a potential SegFault on garbage collection (GH-102803)gaogaotiantian2023-03-181-0/+1
|
* gh-102755: Add PyErr_DisplayException(exc) (#102756)Irit Katriel2023-03-163-68/+50
|
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-03-161-9/+10
| | | | (#102760)
* gh-99726: Improves correctness of stat results for Windows, and uses faster ↵Steve Dower2023-03-161-12/+118
| | | | | API when available (GH-102149) This deprecates `st_ctime` fields on Windows, with the intent to change them to contain the correct value in 3.14. For now, they should keep returning the creation time as they always have.
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-03-161-44/+35
| | | | (#102743)
* gh-102594: PyErr_SetObject adds note to exception raised on normalization ↵Irit Katriel2023-03-161-5/+35
| | | | error (#102675)
* gh-102660: Fix Refleaks in import.c (#102744)Eric Snow2023-03-163-28/+28
| | | | | gh-102661 introduced some leaks. This fixes them. https://github.com/python/cpython/issues/102660
* gh-102738: remove from cases generator the code related to register ↵Irit Katriel2023-03-151-174/+170
| | | | instructions (#102739)
* gh-102654: Insert #line directives in generated_cases.c.h (#102669)Guido van Rossum2023-03-151-0/+456
| | | | | | | | | This behavior is optional, because in some extreme cases it may just make debugging harder. The tool defaults it to off, but it is on in Makefile.pre.in. Also note that this makes diffs to generated_cases.c.h noisier, since whenever you insert or delete a line in bytecodes.c, all subsequent #line directives will change.
* gh-102281: Fix potential nullptr dereference + use of uninitialized memory ↵Max Bachmann2023-03-151-1/+5
| | | | (gh-102282)
* gh-102660: Handle m_copy Specially for the sys and builtins Modules (gh-102661)Eric Snow2023-03-144-4/+43
| | | | | | | It doesn't make sense to use multi-phase init for these modules. Using a per-interpreter "m_copy" (instead of PyModuleDef.m_base.m_copy) makes this work okay. (This came up while working on gh-101660.) Note that we might instead end up disallowing re-load for sys/builtins since they are so special. https://github.com/python/cpython/issues/102660
* gh-98831: Use DECREF_INPUTS() more (#102409)Guido van Rossum2023-03-132-57/+38
|
* GH-100987: Don't cache references to the names and consts array in ↵Mark Shannon2023-03-133-53/+44
| | | | | | | `_PyEval_EvalFrameDefault`. (#102640) * Rename local variables, names and consts, from the interpeter loop. Will allow non-code objects in frames for better introspection of C builtins and extensions. * Remove unused dummy variables.
* gh-87092: refactor assemble() to a number of separate functions, which do ↵Irit Katriel2023-03-131-244/+290
| | | | not need the compiler struct (#102562)
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-03-131-23/+19
| | | | (#102631)
* GH-102300: Reuse objects with refcount == 1 in float specialized binary ops. ↵Mark Shannon2023-03-133-24/+26
| | | | (GH-102301)
* GH-90997: Shrink the LOAD_GLOBAL caches (#102569)Brandt Bucher2023-03-114-16/+24
|
* gh-102255: Improve build support for Windows API partitions (GH-102256)Max Bachmann2023-03-094-5/+98
| | | | | Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs). CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes. `MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
* gh-100227: Isolate the Import State to Each Interpreter (gh-101941)Eric Snow2023-03-091-44/+54
| | | | | | | | | | | | Specific changes: * move the import lock to PyInterpreterState * move the "find_and_load" diagnostic state to PyInterpreterState Note that the import lock exists to keep multiple imports of the same module in the same interpreter (but in different threads) from stomping on each other. Independently, we use a distinct global lock to protect globally shared import state, especially related to loaded extension modules. For now we can rely on the GIL as that lock but with a per-interpreter GIL we'll need a new global lock. The remaining state in _PyRuntimeState.imports will (probably) continue being global. https://github.com/python/cpython/issues/100227
* gh-100227: Move dict_state.global_version to PyInterpreterState (gh-102338)Eric Snow2023-03-092-4/+4
| | | https://github.com/python/cpython/issues/100227
* gh-100227: Move next_keys_version to PyInterpreterState (gh-102335)Eric Snow2023-03-091-5/+11
| | | https://github.com/python/cpython/issues/100227
* gh-102493: fix normalization in PyErr_SetObject (#102502)Irit Katriel2023-03-071-4/+12
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-87092: compiler's CFG construction moved to after codegen stage (#102320)Irit Katriel2023-03-071-184/+336
|
* gh-90110: Fix the c-analyzer Tool (#102483)Eric Snow2023-03-071-2/+2
| | | | | | | Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon. Note that this does include moving last_resort_memory_error to PyInterpreterState. https://github.com/python/cpython/issues/90110
* gh-102356: Add thrashcan macros to filter object dealloc (#102426)Marta Gómez Macías2023-03-051-0/+2
| | | Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
* gh-102021 : Allow multiple input files for interpreter loop generator (#102022)Jacob Bower2023-03-042-3/+5
| | | The input files no longer use `-i`.
* gh-102371: move _Py_Mangle from compile.c to symtable.c (#102372)Irit Katriel2023-03-022-69/+68
|
* gh-102336: Remove code specifically for handling Windows 7 (GH-102337)Max Bachmann2023-03-011-7/+1
|
* gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333)Eric Snow2023-02-282-8/+15
| | | https://github.com/python/cpython/issues/100227
* gh-100227: Move the dtoa State to PyInterpreterState (gh-102331)Eric Snow2023-02-282-7/+28
| | | https://github.com/python/cpython/issues/100227
* GH-102305: Expand some macros in generated_cases.c.h (#102309)Guido van Rossum2023-02-281-425/+420
| | | | * Emit straight stack_pointer[-i] instead of PEEK(i), POKE(i, ...) * Expand JUMPBY() and NEXTOPARG(), and fix a perf bug
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-02-288-72/+42
| | | | (in Python/) (#102193)
* gh-87092: Make jump target label equal to the offset of the target in the ↵Irit Katriel2023-02-281-51/+64
| | | | instructions sequence (#102093)
* gh-101101: Unstable C API tier (PEP 689) (GH-101102)Petr Viktorin2023-02-281-1/+1
|
* gh-102251: Updates to test_imp Toward Fixing Some Refleaks (gh-102254)Eric Snow2023-02-271-4/+111
| | | | | | | This is related to fixing the refleaks introduced by commit 096d009. I haven't been able to find the leak yet, but these changes are a consequence of that effort. This includes some cleanup, some tweaks to the existing tests, and a bunch of new test cases. The only change here that might have impact outside the tests in question is in imp.py, where I update imp.load_dynamic() to use spec_from_file_location() instead of creating a ModuleSpec directly. Also note that I've updated the tests to only skip if we're checking for refleaks (regrtest's --huntrleaks), whereas in gh-101969 I had skipped the tests entirely. The tests will be useful for some upcoming work and I'd rather the refleaks not hold that up. (It isn't clear how quickly we'll be able to fix the leaking code, though it will certainly be done in the short term.) https://github.com/python/cpython/issues/102251
* gh-102250: Fix double-decref in COMPARE_AND_BRANCH error case (GH-102287)Dennis Sweeney2023-02-272-6/+2
|
* GH-102126: fix deadlock at shutdown when clearing thread states (#102222)Kumar Aditya2023-02-251-3/+10
|
* GH-100719: Remove redundant `gi_code` field from generator object. (GH-100749)Mark Shannon2023-02-232-39/+38
|
* GH-100982: Restrict `FOR_ITER_RANGE` to a single instruction to allow ↵Mark Shannon2023-02-223-30/+20
| | | | instrumentation. (GH-101985)
* gh-101903: Remove obsolete undefs for previously removed macros ↵Owain Davies2023-02-211-4/+0
| | | | Py_EnterRecursiveCall and Py_LeaveRecursiveCall (#101923)
* gh-102056: Fix a few bugs in error handling of exception printing code (#102078)Irit Katriel2023-02-201-7/+16
|
* gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)Steve Dower2023-02-206-145/+145
| | | | | | * gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h * Make cases_generator correct on Windows
* gh-97786: Fix compiler warnings in pytime.c (#101826)Mark Dickinson2023-02-201-6/+29
| | | Fixes compiler warnings in pytime.c.
* gh-101967: add a missing error check (#101968)Eclips42023-02-181-1/+3
|
* gh-101758: Add _PyState_AddModule() Back for the Stable ABI (gh-101956)Eric Snow2023-02-161-0/+20
| | | | | | | We're adding the function back, only for the stable ABI symbol and not as any form of API. I had removed it yesterday. This undocumented "private" function was added with the implementation for PEP 3121 (3.0, 2007) for internal use and later moved out of the limited API (3.6, 2016) and then into the internal API (3.9, 2019). I removed it completely yesterday, including from the stable ABI manifest (where it was added because the symbol happened to be exported). It's unlikely that anyone is using _PyState_AddModule(), especially any stable ABI extensions built against 3.2-3.5, but we're playing it safe. https://github.com/python/cpython/issues/101758
* gh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)Eclips42023-02-162-0/+4
|
* gh-101881: Support (non-)blocking read/write functions on Windows pipes ↵Rayyan Ansari2023-02-161-2/+91
| | | | | | | | | | | | (GH-101882) * fileutils: handle non-blocking pipe IO on Windows Handle erroring operations on non-blocking pipes by reading the _doserrno code. Limit writes on non-blocking pipes that are too large. * Support blocking functions on Windows Use the GetNamedPipeHandleState and SetNamedPipeHandleState Win32 API functions to add support for os.get_blocking and os.set_blocking.
* gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)penguin_wwy2023-02-161-2/+2
|