summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-65961: Raise `DeprecationWarning` when `__package__` differs from ↵Brett Cannon2022-10-051-1/+1
| | | | | | | `__spec__.parent` (#97879) Also remove `importlib.util.set_package()` which was already slated for removal. Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-87092: bring compiler code closer to a preprocessing-opt-assembler ↵Irit Katriel2022-10-051-39/+49
| | | | organisation (GH-97644)
* GH-91079: Decouple C stack overflow checks from Python recursion checks. ↵Mark Shannon2022-10-057-51/+73
| | | | (GH-96510)
* GH-97779: Ensure that *all* frame objects are backed by "complete" frames ↵Brandt Bucher2022-10-051-0/+7
| | | | (GH-97845)
* gh-97670: Remove sys.getdxp() and analyze_dxp.py script (#97671)Victor Stinner2022-10-042-63/+0
| | | | | | | Remove the sys.getdxp() function and the Tools/scripts/analyze_dxp.py script. DXP stands for "dynamic execution pairs". They were related to DYNAMIC_EXECUTION_PROFILE and DXPAIRS macros which have been removed in Python 3.11. Python can now be built with "./configure --enable-pystats" to gather statistics on Python opcodes.
* GH-97752: Clear the `previous` member of newly-created generator/coroutine ↵Brandt Bucher2022-10-031-0/+3
| | | | frames (GH-97795)
* gh-96526: Clarify format and __format__ docstrings (gh-96648)Michael2022-10-032-10/+16
|
* gh-96512: Move int_max_str_digits setting to PyConfig (#96944)Gregory P. Smith2022-10-032-12/+24
| | | | | | | | | | | It had to live as a global outside of PyConfig for stable ABI reasons in the pre-3.12 backports. This removes the `_Py_global_config_int_max_str_digits` and gets rid of the equivalent field in the internal `struct _is PyInterpreterState` as code can just use the existing nested config struct within that. Adds tests to verify unique settings and configs in subinterpreters.
* Fix typos in `bltinmodule.c`. (GH-97766)Nikita Sobolev2022-10-032-12/+12
|
* gh-96670: Raise SyntaxError when parsing NULL bytes (#97594)Pablo Galindo Salgado2022-09-271-1/+1
|
* gh-96848: Fix -X int_max_str_digits option parsing (#96988)Victor Stinner2022-09-261-1/+2
| | | | | Fix command line parsing: reject "-X int_max_str_digits" option with no value (invalid) when the PYTHONINTMAXSTRDIGITS environment variable is set to a valid limit.
* GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97003)Brandt Bucher2022-09-221-3/+6
|
* GH-95921: Fix positions for some chained comparisons (GH-96968)Brandt Bucher2022-09-201-0/+1
|
* gh-87092: in compiler, move the detection of exception handlers before the ↵Irit Katriel2022-09-201-16/+32
| | | | CFG optimization stage (GH-96935)
* gh-96711: Enhance SystemError message upon Invalid opcode (#96712)serge-sans-paille2022-09-201-3/+5
| | | | | | Raise verbose SystemError instead of printing debug information upon Invalid opcode. Fix #96711
* gh-96387: take_gil() resets drop request before exit (#96869)Victor Stinner2022-09-191-0/+11
| | | | | | | | | | | | | At Python exit, sometimes a thread holding the GIL can wait forever for a thread (usually a daemon thread) which requested to drop the GIL, whereas the thread already exited. To fix the race condition, the thread which requested the GIL drop now resets its request before exiting. take_gil() now calls RESET_GIL_DROP_REQUEST() before PyThread_exit_thread() if it called SET_GIL_DROP_REQUEST to fix a race condition with drop_gil(). Issue discovered and analyzed by Mingliang ZHAO.
* GH-96864: Check for error between line and opcode events (GH-96880)Brandt Bucher2022-09-191-1/+1
|
* GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)adphrost2022-09-152-2/+13
| | | | Co-authored-by: Andrew Frost <adfrost@fb.com> Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
* gh-96751: Remove dead code from `CALL_FUNCTION_EX` opcode (GH-96752)Nikita Sobolev2022-09-151-13/+2
|
* ceval: Use _PyTuple_FromArraySteal in BUILD_TUPLE (GH-96516)Kevin Modzelewski2022-09-141-5/+2
|
* gh-87092: reduce redundancy and repetition in compiler's optimization stage ↵Irit Katriel2022-09-131-90/+63
| | | | (GH-96713)
* GH-96754: Check whether the interpreter frame is complete before creating ↵Mark Shannon2022-09-132-3/+8
| | | | frame object. (GH-96776)
* GH-96678: Fix undefined behavior in ceval.c (#96708)Mark Shannon2022-09-101-1/+7
|
* Replace ad-hoc labels with JUMP_TO_INSTRUCTION (GH-96634)Brandt Bucher2022-09-091-4/+4
|
* GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)Brandt Bucher2022-09-091-0/+2
|
* Fix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)Kumar Aditya2022-09-091-1/+6
|
* GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643)Mark Shannon2022-09-081-62/+59
| | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-96653: Remove duplicate CALL_STAT_INC(inlined_py_calls) in ↵Itamar Ostricher2022-09-081-1/+0
| | | | BINARY_SUBSCR_GETITEM (GH-96654)
* GH-90699: use statically allocated interned strings in typeobject's slotdefs ↵Kumar Aditya2022-09-071-5/+0
| | | | (GH-94706)
* gh-89545: Updates platform module to use new internal _wmi module on Windows ↵Steve Dower2022-09-071-30/+63
| | | | to directly query OS properties (GH-96289)
* gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in ↵Irit Katriel2022-09-071-0/+1
| | | | one place (GH-96513)
* GH-91432: Remove the iterator_exhausted_no_error label (GH-96517)Brandt Bucher2022-09-071-16/+20
|
* GH-96572: fix use after free in trace refs build mode (#96618)Kumar Aditya2022-09-061-1/+1
|
* GH-96569: Add two NULL checks to avoid undefined behavior. (GH-96585)Mark Shannon2022-09-061-8/+5
|
* GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)Brandt Bucher2022-09-061-5/+5
|
* ceval.c's GETITEM should have asserts, not set exceptions (GH-96518)Dennis Sweeney2022-09-041-2/+8
|
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-023-3/+186
| | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* gh-93554: Conditional jump opcodes only jump forward (GH-96318)Irit Katriel2022-09-014-220/+112
|
* gh-93678: apply remove_redundant_jumps in optimize_cfg (GH-96274)Irit Katriel2022-09-011-11/+33
|
* Remove the binary_subscr_dict_error label (GH-96443)Brandt Bucher2022-08-301-11/+4
|
* gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)Pablo Galindo Salgado2022-08-304-1/+201
| | | | | | | :warning: :warning: Note for reviewers, hackers and fellow systems/low-level/compiler engineers :warning: :warning: If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**. If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.
* GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)Mark Shannon2022-08-252-7/+11
|
* GH-93503: Add thread-specific APIs to set profiling and tracing functions in ↵Pablo Galindo Salgado2022-08-243-1/+131
| | | | | | | | | | | | | | | | | the C-API (#93504) * gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API * Use a separate API * Fix NEWS entry * Add locks around the loop * Document ignoring exceptions * Use the new APIs in the sys module * Update docs
* gh-87092: use basicblock_last_instr consistently in the compiler (GH-96243)Irit Katriel2022-08-241-29/+32
|
* GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. ↵Mark Shannon2022-08-243-974/+987
| | | | (GH-96204)
* gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler ↵Irit Katriel2022-08-241-48/+210
| | | | optimization unit tests (GH-96007)
* GH-96071: fix deadlock in PyGILState_Ensure (GH-96124)Kumar Aditya2022-08-191-11/+16
| | | Alternative of #96107
* gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126)Christian Heimes2022-08-191-1/+1
| | | Automerge-Triggered-By: GH:tiran
* GH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010)Brandt Bucher2022-08-193-19/+49
|
* gh-96017: Fix some compiler warnings (GH-96018)Christian Heimes2022-08-191-0/+2
| | | | | - "comparison of integers of different signs" in typeobject.c - only define static_builtin_index_is_set in DEBUG builds - only define recreate_gil with ifdef HAVE_FORK