Skip to content
Permalink
Branch: master
Commits on Mar 21, 2020
  1. bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES …

    serhiy-storchaka committed Mar 21, 2020
    …is set. (GH-18942)
  2. bpo-24916: Remove an outdated comment. (GH-19101)

    serhiy-storchaka committed Mar 21, 2020
Commits on Mar 20, 2020
  1. bpo-39946: Remove _PyThreadState_GetFrame (GH-19094)

    vstinner committed Mar 20, 2020
    Remove _PyRuntime.getframe hook and remove _PyThreadState_GetFrame
    macro which was an alias to _PyRuntime.getframe. They were only
    exposed by the internal C API. Remove also PyThreadFrameGetter type.
  2. bpo-39947: Add PyThreadState_GetFrame() function (GH-19092)

    vstinner committed Mar 20, 2020
    Add PyThreadState_GetFrame() function: get the current frame
    of a Python thread state.
  3. bpo-40010: Optimize pending calls in multithreaded applications (GH-1…

    vstinner committed Mar 20, 2020
    …9091)
    
    If a thread different than the main thread schedules a pending call
    (Py_AddPendingCall()), the bytecode evaluation loop is no longer
    interrupted at each bytecode instruction to check for pending calls
    which cannot be executed. Only the main thread can execute pending
    calls.
    
    Previously, the bytecode evaluation loop was interrupted at each
    instruction until the main thread executes pending calls.
    
    * Add _Py_ThreadCanHandlePendingCalls() function.
    * SIGNAL_PENDING_CALLS() now only sets eval_breaker to 1 if the
      current thread can execute pending calls. Only the main thread can
      execute pending calls.
  4. bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)

    vstinner committed Mar 20, 2020
    COMPUTE_EVAL_BREAKER() now also checks if the Python thread state
    belongs to the main interpreter. Don't break the evaluation loop if
    there are pending signals but the Python thread state it belongs to a
    subinterpeter.
    
    * Add _Py_IsMainThread() function.
    * Add _Py_ThreadCanHandleSignals() function.
  5. bpo-40010: Pass tstate to ceval GIL functions (GH-19077)

    vstinner committed Mar 20, 2020
    * Add eval_frame_handle_pending() helper function: cold code path.
    * Fix PyEval_ReleaseLock(): don't dereference tstate if it's NULL.
  6. bpo-1635741: Port _weakref extension module to multiphase initializat…

    shihai1991 committed Mar 20, 2020
    …ion (PEP 489) (GH-19084)
  7. bpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH…

    amaajemyfren committed Mar 20, 2020
    …-18929)
    
    Automerge-Triggered-By: @ned-deily
  8. bpo-40019: Skip test_gdb if Python was optimized (GH-19081)

    vstinner committed Mar 20, 2020
    test_gdb now skips tests if it detects that gdb failed to read debug
    information because the Python binary is optimized.
Commits on Mar 19, 2020
  1. bpo-39877: 4th take_gil() fix for daemon threads (GH-19080)

    vstinner committed Mar 19, 2020
    bpo-39877, bpo-40010: Add a third tstate_must_exit() check in
    take_gil() to prevent using tstate which has been freed.
  2. Fix "versionchanged" for pow named arguments (GH-19042)

    mdickinson committed Mar 19, 2020
    The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
  3. bpo-39824: Convert PyModule_GetState() to get_module_state() (GH-19076)

    shihai1991 committed Mar 19, 2020
    Automerge-Triggered-By: @vstinner
  4. bpo-40010: Optimize signal handling in multithreaded applications (GH…

    vstinner committed Mar 19, 2020
    …-19067)
    
    If a thread different than the main thread gets a signal, the
    bytecode evaluation loop is no longer interrupted at each bytecode
    instruction to check for pending signals which cannot be handled.
    Only the main thread of the main interpreter can handle signals.
    
    Previously, the bytecode evaluation loop was interrupted at each
    instruction until the main thread handles signals.
    
    Changes:
    
    * COMPUTE_EVAL_BREAKER() and SIGNAL_PENDING_SIGNALS() no longer set
      eval_breaker to 1 if the current thread cannot handle signals.
    * take_gil() now always recomputes eval_breaker.
  5. bpo-39562: Allow executing asynchronous comprehensions in the asyncio…

    isidentical and pablogsal committed Mar 19, 2020
    … REPL (GH-18968)
    
    Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
  6. bpo-40000: Improve error messages when validating invalid ast.Constan…

    isidentical and pablogsal committed Mar 19, 2020
    …t nodes (GH-19055)
    
    Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
  7. bpo-39984: Move pending calls to PyInterpreterState (GH-19066)

    vstinner committed Mar 19, 2020
    If Py_AddPendingCall() is called in a subinterpreter, the function is
    now scheduled to be called from the subinterpreter, rather than being
    called from the main interpreter.
    
    Each subinterpreter now has its own list of scheduled calls.
    
    * Move pending and eval_breaker fields from _PyRuntimeState.ceval
      to PyInterpreterState.ceval.
    * new_interpreter() now calls _PyEval_InitThreads() to create
      pending calls lock.
    * Fix Py_AddPendingCall() for subinterpreters. It now calls
      _PyThreadState_GET() which works in a subinterpreter if the
      caller holds the GIL, and only falls back on
      PyGILState_GetThisThreadState() if _PyThreadState_GET()
      returns NULL.
Commits on Mar 18, 2020
  1. bpo-39220: Do not optimise annotation if 'from __future__ import anno…

    pablogsal committed Mar 18, 2020
    …tations' is used (GH-17866)
    
    Do not apply AST-based optimizations if 'from __future__ import annotations' is used in order to
    prevent information lost in the final version of the annotations.
  2. bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)

    vstinner committed Mar 18, 2020
    bpo-37127, bpo-39984:
    
    * trip_signal() and Py_AddPendingCall() now get the current Python
      thread state using PyGILState_GetThisThreadState() rather than
      _PyRuntimeState_GetThreadState() to be able to get it even if the
      GIL is released.
    * _PyEval_SignalReceived() now expects tstate rather than ceval.
    * Remove ceval parameter of _PyEval_AddPendingCall(): ceval is now
      get from tstate parameter.
  3. bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)

    vstinner committed Mar 18, 2020
    test_site.test_startup_imports() is now skipped if a path of sys.path
    contains a .pth file.
    
    Sort test_site imports.
  4. bpo-39984: Pass tstate to _PyEval_SignalAsyncExc() (GH-19049)

    vstinner committed Mar 18, 2020
    _PyEval_SignalAsyncExc() and _PyEval_FiniThreads() now expect tstate,
    instead of ceval.
  5. bpo-39957: Change Signature.parameters to OrderedDict (GH-18988)

    Gelbpunkt committed Mar 18, 2020
  6. bpo-39877: Fix take_gil() for daemon threads (GH-19054)

    vstinner committed Mar 18, 2020
    bpo-39877, bpo-39984: If the thread must exit, don't access tstate to
    prevent a potential crash: tstate memory has been freed.
  7. bpo-39984: _PyThreadState_DeleteCurrent() takes tstate (GH-19051)

    vstinner committed Mar 18, 2020
    * _PyThreadState_DeleteCurrent() now takes tstate rather than
      runtime.
    * Add ensure_tstate_not_null() helper to pystate.c.
    * Add _PyEval_ReleaseLock() function.
    * _PyThreadState_DeleteCurrent() now calls
      _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after
      this call, not before.
    * PyGILState_Release(): rename "tcur" variable to "tstate".
  8. bpo-39984: Pass tstate to handle_signals() (GH-19050)

    vstinner committed Mar 18, 2020
    handle_signals() and make_pending_calls() now expect tstate rather
    than runtime.
Commits on Mar 17, 2020
  1. bpo-38373: Change list overallocating strategy. (GH-18952)

    serhiy-storchaka committed Mar 17, 2020
    * Add padding to make the allocated size multiple of 4.
    * Do not overallocate if the new size is closer to overalocated size
      than to the old size.
  2. bpo-39984: Add PyInterpreterState.ceval (GH-19047)

    vstinner committed Mar 17, 2020
    subinterpreters: Move _PyRuntimeState.ceval.tracing_possible to
    PyInterpreterState.ceval.tracing_possible: each interpreter now has
    its own variable.
    
    Changes:
    
    * Add _ceval_state structure.
    * Add PyInterpreterState.ceval field.
    * _PyEval_EvalFrameDefault(): add ceval2 variable (struct _ceval_state*).
    * Rename _PyEval_Initialize() to _PyEval_InitRuntimeState().
    * Add _PyEval_InitState().
    * Don't export internal _Py_FinishPendingCalls() and
      _PyEval_FiniThreads() functions anymore.
  3. bpo-39991: Enhance uuid parser for MAC address (GH-19045)

    vstinner committed Mar 17, 2020
    Reject valid IPv6 addresses which doesn't contain "::" but have
    a length of 17 characters.
Older
You can’t perform that action at this time.