Skip to content
Permalink
main

Commits on Jul 2, 2021

  1. bpo-44388: Update venv EnvBuilder.ensure_directories() docs. (GH-26663)

    Ref: 
    
    This changes the documentation for `EnvBuilder.ensure_directories(env_dir)` to match the actual behavior of that API call.
    
    In particular, `ensure_directories()` is not affected by the state of the `upgrade` attribute, and will not cause an error to have existing directories whether or not the `clear` attribute is set.
    
    This documentation change I believe should be valid to all python versions back to 3.6.
    
    Automerge-Triggered-By: GH:vsajip
    itsayellow committed Jul 2, 2021
  2. bpo-43950: optimize column table assembling with pre-sizing object (G…

    …H-26997)
    
    The new resizing system works like this;
    ```
    $ cat t.py
    a + a + a + b + c + a + a + a + b + c + a + a + a + b + c + a + a + a + b + c
    [repeated 99 more times]
    $ ./python t.py
    RESIZE: prev len = 32, new len = 66
    FINAL SIZE: 56
    -----------------------------------------------------
    RESIZE: prev len = 32, new len = 66
    RESIZE: prev len = 66, new len = 134
    RESIZE: prev len = 134, new len = 270
    RESIZE: prev len = 270, new len = 542
    RESIZE: prev len = 542, new len = 1086
    RESIZE: prev len = 1086, new len = 2174
    RESIZE: prev len = 2174, new len = 4350
    RESIZE: prev len = 4350, new len = 8702
    FINAL SIZE: 8004
    ```
    
    So now we do considerably lower number of `_PyBytes_Resize` calls.
    
    Automerge-Triggered-By: GH:isidentical
    isidentical committed Jul 2, 2021
  3. bpo-43950: Add code.co_positions (PEP 657) (GH-26955)

    This PR is part of PEP 657 and augments the compiler to emit ending
    line numbers as well as starting and ending columns from the AST
    into compiled code objects. This allows bytecodes to be correlated
    to the exact source code ranges that generated them.
    
    This information is made available through the following public APIs:
    
    * The `co_positions` method on code objects.
    * The C API function `PyCode_Addr2Location`.
    
    Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
    Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
    3 people committed Jul 2, 2021
  4. bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341)

    Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
    finefoot and uSpike committed Jul 2, 2021

Commits on Jul 1, 2021

  1. bpo-43216: Remove @asyncio.coroutine (GH-26369)

    Remove the @asyncio.coroutine decorator
    enabling legacy generator-based coroutines to be compatible with async/await
    code; remove asyncio.coroutines.CoroWrapper used for wrapping
    legacy coroutine objects in the debug mode.
    
    The decorator has been deprecated
    since Python 3.8 and the removal was initially scheduled for Python 3.10.
    illia-v committed Jul 1, 2021
  2. bpo-43770: Cleanup _PyObject_GetMethod() (GH-26946)

    _PyObject_GetMethod() now uses _PyType_IsReady() to decide if
    PyType_Ready() must be called or not, rather than testing if
    tp->tp_dict is NULL.
    
    Move also variable declarations closer to where they are used, and
    use Py_NewRef().
    vstinner committed Jul 1, 2021
  3. bpo-44531: Add _PyType_AllocNoTrack() function (GH-26947)

    Add an internal _PyType_AllocNoTrack() function to allocate an object
    without tracking it in the GC.
    
    Modify dict_new() to use _PyType_AllocNoTrack(): dict subclasses are
    now only tracked once all PyDictObject members are initialized.
    Calling _PyObject_GC_UNTRACK() is no longer needed for the dict type.
    
    Similar change in tuple_subtype_new() for tuple subclasses.
    
    Replace tuple_gc_track() with _PyObject_GC_TRACK().
    vstinner committed Jul 1, 2021

Commits on Jun 29, 2021

  1. bpo-44531: Fix type_repr() if tp_name is NULL (GH-26948)

    Allow to call type_repr() on a type which is not fully initialized
    yet. This fix helps debugging crashes occurring early at Python
    initialization.
    vstinner committed Jun 29, 2021
  2. bpo-44471: Change error type for bad objects in ExitStack.enter_conte…

    …xt() (GH-26820)
    
    A TypeError is now raised instead of an AttributeError in
    ExitStack.enter_context() and AsyncExitStack.enter_async_context()
    for objects which do not support the context manager or
    asynchronous context manager protocols correspondingly.
    serhiy-storchaka committed Jun 29, 2021
  3. bpo-12022: Change error type for bad objects in "with" and "async wit…

    …h" (GH-26809)
    
    A TypeError is now raised instead of an AttributeError in
    "with" and "async with" statements for objects which do not
    support the context manager or asynchronous context manager
    protocols correspondingly.
    serhiy-storchaka committed Jun 29, 2021
  4. bpo-44434: Remove useless calls to PyThread_exit_thread() (GH-26943)

    Remove useless calls to PyThread_exit_thread() in two unit tests of
    _testcapi and _testembed modules.
    
    Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
    vstinner and izbyshev committed Jun 29, 2021
Older