cpython/Python
Miss Islington (bot) 5e6e99646e
[3.12] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522) (#109777)
gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)

PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks
or sys.path_importer_cache or they are not list and dict correspondingly.

Previously it could return NULL without setting error in obscure cases,
crash or raise SystemError if these attributes have wrong type.
(cherry picked from commit 62c7015e89)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-02 17:22:40 +02:00
..
clinic [3.12] gh-105069: Add a readline-like callable to the tokenizer to consume input iteratively (GH-105070) (#105119) 2023-05-31 11:11:53 +01:00
deepfreeze gh-97669: Create Tools/build/ directory (#97963) 2022-10-17 12:01:00 +02:00
frozen_modules gh-97669: Create Tools/build/ directory (#97963) 2022-10-17 12:01:00 +02:00
_warnings.c [3.12] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) (#105659) 2023-06-11 19:51:30 +00:00
adaptive.md GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182) 2022-11-09 10:50:09 -08:00
asdl.c bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933) 2021-03-23 20:47:40 +01:00
asm_trampoline.S gh-96143: Move the perf trampoline files to the Python directory (#98675) 2022-10-25 23:34:22 +01:00
assemble.c gh-87092: avoid gcc warning on uninitialized struct field in assemble.c (#104460) 2023-05-14 12:03:30 +01:00
ast.c [3.12] gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352) (#109379) 2023-10-02 16:58:06 +02:00
ast_opt.c [3.12] GH-107263: Increase C stack limit for most functions, except _PyEval_EvalFrameDefault() (GH-107535) (#107618) 2023-08-04 12:25:51 +02:00
ast_unparse.c gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333) 2023-02-28 14:16:39 -07:00
bltinmodule.c [3.12] gh-105340: include hidden fast-locals in locals() (GH-105715) (#106470) 2023-07-05 23:31:37 +00:00
bootstrap_hash.c gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516) 2022-11-16 09:37:14 -07:00
bytecodes.c [3.12] gh-109118: Fix runtime crash when NameError happens in PEP 695 function (GH-109123) (#109173) 2023-09-12 15:59:09 +02:00
ceval.c [3.12] GH-108390: Prevent non-local events being set with sys.monitoring.set_local_events() (GH-108420) (#108899) 2023-09-05 11:29:38 +00:00
ceval_gil.c [3.12] gh-104690: thread_run() checks for tstate dangling pointer (#109056) (#109133) 2023-10-02 16:55:06 +02:00
ceval_macros.h GH-104580: Don't cache eval breaker in interpreter (GH-104581) 2023-05-18 10:08:33 +01:00
codecs.c gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ (#103402) 2023-04-11 11:53:06 +01:00
compile.c [3.12] gh-105658: fix excess trace events for except block ending with a conditional block (#109384) (#109411) 2023-09-15 00:41:03 +02:00
condvar.h gh-74953: _PyThread_cond_after() uses _PyTime_t (#94056) 2022-06-21 15:45:49 +02:00
context.c gh-94673: Hide Objects in PyTypeObject Behind Accessors (gh-104074) 2023-05-01 20:34:43 -06:00
dtoa.c gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202) 2023-05-10 17:44:52 +01:00
dup2.c gh-95174: Handle missing dup() and constants in WASI (GH-95229) 2022-07-26 11:16:51 +02:00
dynamic_annotations.c bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748) 2017-12-12 13:55:04 +02:00
dynload_hpux.c bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX (GH-27857) 2021-09-08 14:43:00 +02:00
dynload_shlib.c gh-101758: Clean Up Uses of Import State (gh-101919) 2023-02-15 15:32:31 -07:00
dynload_stub.c
dynload_win.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
emscripten_signal.c bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209) 2022-04-03 22:58:52 +02:00
errors.c [3.12] gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929) (#108205) 2023-08-21 14:33:46 +02:00
fileutils.c [3.12] gh-107913: Fix possible losses of OSError error codes (GH-107930) (#108523) 2023-08-27 01:24:40 +02:00
flowgraph.c [3.12] gh-109889: comment out assertion indicating a failed optimization of a redundant NOP (#109899) 2023-09-26 17:17:32 +02:00
formatter_unicode.c gh-89653: Use int type for Unicode kind (#92704) 2022-05-13 12:41:05 +02:00
frame.c GH-96803: Document and test new unstable internal frame API functions (GH-104211) 2023-05-18 10:10:15 +01:00
frozen.c gh-100227: Only Use deepfreeze for the Main Interpreter (gh-103794) 2023-04-24 21:48:05 +00:00
frozenmain.c gh-93103: Parser uses PyConfig.parser_debug instead of Py_DebugFlag (#93106) 2022-05-24 22:35:08 +02:00
future.c gh-87092: do not allocate PyFutureFeatures dynamically (GH-98913) 2022-11-02 15:13:07 +00:00
generated_cases.c.h [3.12] gh-109118: Fix runtime crash when NameError happens in PEP 695 function (GH-109123) (#109173) 2023-09-12 15:59:09 +02:00
getargs.c gh-99240: Reset pointer to NULL when the pointed memory is freed in argument parsing (#99890) 2022-12-17 12:07:44 +05:30
getcompiler.c closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang (GH-24606) 2021-02-25 20:24:21 -08:00
getcopyright.c Update copyright years to 2023. (gh-100848) 2023-01-08 09:13:25 -06:00
getopt.c gh-90300: split --help output into separate options (#30331) 2022-06-01 05:50:01 -04:00
getplatform.c bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
getversion.c gh-81057: Move Globals in Core Code to _PyRuntimeState (gh-99496) 2022-11-15 09:45:11 -07:00
hamt.c gh-99537: Use Py_SETREF() function in C code (#99657) 2022-11-22 13:39:11 +01:00
hashtable.c bpo-41061: Fix incorrect expressions in hashtable (GH-21028) 2020-06-22 00:41:48 -07:00
import.c [3.12] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522) (#109777) 2023-10-02 17:22:40 +02:00
importdl.c gh-98627: Add an Optional Check for Extension Module Subinterpreter Compatibility (gh-99040) 2023-02-15 18:16:00 -07:00
importdl.h bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) 2022-03-30 12:28:33 -07:00
initconfig.c [3.12] Document PYTHONSAFEPATH along side -P (GH-106122) (#106352) 2023-07-05 13:21:38 +02:00
instrumentation.c [3.12] gh-109371: Fix monitoring with instruction events set (gh-109385) (#109542) 2023-09-18 17:40:51 +02:00
intrinsics.c gh-103763: Implement PEP 695 (#103764) 2023-05-15 20:36:23 -07:00
legacy_tracing.c [3.12] GH-107724: Fix the signature of PY_THROW callback functions. (GH-107725) (#107802) 2023-08-11 11:58:27 +02:00
makeopcodetargets.py gh-98040: Remove just the imp module (#98573) 2023-04-28 16:17:58 -07:00
marshal.c [3.12] gh-101006: Improve error handling when read marshal data (GH-101007) (GH-106226) 2023-06-29 13:46:51 +03:00
modsupport.c [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855) 2023-07-18 15:14:10 +03:00
mysnprintf.c Add a warning message about PyOS_snprintf (#95993) 2022-10-07 11:49:53 -07:00
mystrtoul.c bpo-35134: Add Include/cpython/longobject.h (GH-29044) 2021-10-19 02:04:52 +02:00
opcode_metadata.h [3.12] gh-109118: Fix runtime crash when NameError happens in PEP 695 function (GH-109123) (#109173) 2023-09-12 15:59:09 +02:00
opcode_targets.h gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866) 2023-05-16 10:29:00 -06:00
pathconfig.c gh-98978: Fix Py_SetPythonHome(NULL) (#99066) 2022-11-03 18:34:32 +01:00
perf_trampoline.c gh-103295: expose API for writing perf map files (#103546) 2023-05-21 11:12:24 +01:00
preconfig.c gh-77782: Deprecate global configuration variable (#93943) 2022-06-17 16:12:00 +02:00
pyarena.c bpo-43244: Remove the pyarena.h header (GH-25007) 2021-03-24 02:23:01 +01:00
pyctype.c
pyfpe.c bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507) 2022-01-13 09:46:04 +01:00
pyhash.c bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752) 2021-10-10 17:29:46 +09:00
pylifecycle.c [3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (#107751) 2023-08-16 12:03:05 +02:00
pymath.c bpo-45440: Remove pymath.c fallbacks (GH-28977) 2021-10-15 19:45:34 +02:00
pystate.c [3.12] gh-104690: thread_run() checks for tstate dangling pointer (#109056) (#109133) 2023-10-02 16:55:06 +02:00
pystrcmp.c bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) 2020-08-27 14:45:25 +09:00
pystrhex.c gh-91768: C API no longer use "const PyObject*" type (#91769) 2022-04-21 22:07:19 +02:00
pystrtod.c gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202) 2023-05-10 17:44:52 +01:00
Python-ast.c [3.12] GH-107263: Increase C stack limit for most functions, except _PyEval_EvalFrameDefault() (GH-107535) (#107618) 2023-08-04 12:25:51 +02:00
Python-tokenize.c [3.12] gh-105564: Don't include artificial newlines in the line attribute of tokens (GH-105565) (#105579) 2023-06-09 16:58:14 +00:00
pythonrun.c [3.12] gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (#109280) 2023-10-02 16:56:34 +02:00
pytime.c gh-97786: Fix compiler warnings in pytime.c (#101826) 2023-02-19 17:16:11 -08:00
README
specialize.c [3.12] GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105863) 2023-06-16 18:29:55 +00:00
stdlib_module_names.h GH-84976: Move Lib/datetime.py to Lib/_pydatetime 2023-05-03 03:09:45 -06:00
structmember.c gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511) 2023-05-04 09:56:53 +02:00
suggestions.c [3.12] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106031) (#106036) 2023-06-26 20:43:20 -07:00
symtable.c [3.12] gh-109207: Fix SystemError when printing symtable entry object. (GH-109225) (#109227) 2023-10-02 16:55:41 +02:00
sysmodule.c [3.12] Fix error handling in _PySys_UpdateConfig() (GH-109524) (#109550) 2023-10-02 16:58:58 +02:00
thread.c gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (gh-104072) 2023-05-01 19:36:00 -06:00
thread_nt.h gh-81057: Move Threading-Related Globals to _PyRuntimeState (#100084) 2022-12-08 17:50:58 -07:00
thread_pthread.h [3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834) 2023-07-18 00:31:17 +02:00
thread_pthread_stubs.h gh-81057: Move Threading-Related Globals to _PyRuntimeState (#100084) 2022-12-08 17:50:58 -07:00
traceback.c [3.12] gh-106922: Fix error location for constructs with spaces and parentheses (GH-108959) (#109147) 2023-09-08 17:04:28 +00:00
tracemalloc.c GH-101520: Move tracemalloc functionality into core, leaving interface in Modules. (#104508) 2023-05-17 14:17:16 +01:00

Miscellaneous source files for the main Python shared library