Skip to content
Permalink
main

Commits on Apr 24, 2022

  1. Simplify testing the warning filename (GH-91868)

    The context manager result has the "filename" attribute.
    serhiy-storchaka committed Apr 24, 2022

Commits on Apr 22, 2022

  1. gh-91217: deprecate-sndhdr (#91806)

    Also inline necessary functionality from `sndhdr` into `email.mime.audio` for `MIMEAudio`.
    
    Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
    brettcannon and hugovk committed Apr 22, 2022
  2. bpo-46720: Add support for path-like objects to multiprocessing.set_e…

    …xecutable for Windows (GH-31279)
    
    This bring the API to be on a par with Unix-like systems.
    maggyero committed Apr 22, 2022
  3. gh-91575: Add a script for generating data for case-insensitive match…

    …ing in re (GH-91660)
    
    Also test that all extra cases are in BMP.
    serhiy-storchaka committed Apr 22, 2022
  4. gh-91700: Validate the group number in conditional expression in RE (G…

    …H-91702)
    
    In expression (?(group)...) an appropriate re.error is now
    raised if the group number refers to not defined group.
    
    Previously it raised RuntimeError: invalid SRE code.
    serhiy-storchaka committed Apr 22, 2022
  5. gh-90568: Fix exception type for \N with a named sequence in RE (GH-9…

    …1665)
    
    re.error is now raised instead of TypeError.
    serhiy-storchaka committed Apr 22, 2022
  6. gh-89279: In ceval.c, redefine some macros for speed (#32387)

    Macros Py_DECREF, Py_XDECREF, Py_IS_TYPE, _Py_atomic_load_32bit_impl
    and _Py_DECREF_SPECIALIZED are redefined as macros
    that completely replace the inline functions of the same name.
    These three came out in the top four of functions that (in MSVC)
    somehow weren't inlined.
    
    Co-authored-by: Victor Stinner <vstinner@python.org>
    Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
    3 people committed Apr 22, 2022
  7. gh-80527: Deprecate PEP 623 Unicode functions (#91801)

    Deprecate functions:
    
    * PyUnicode_AS_DATA()
    * PyUnicode_AS_UNICODE()
    * PyUnicode_GET_DATA_SIZE()
    * PyUnicode_GET_SIZE()
    
    Previously, these functions were macros and so it wasn't possible to
    decorate them with Py_DEPRECATED().
    vstinner committed Apr 22, 2022
  8. gh-91291: Accept attributes as keyword arguments in decimal.localcont…

    …ext (#32242)
    
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    dignissimus and JelleZijlstra committed Apr 22, 2022
  9. bpo-43224: Implement pickling of TypeVarTuples (#32119)

    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    mrahtz and JelleZijlstra committed Apr 22, 2022
  10. gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)

    Authored-by: Aviv Palivoda <palaviv@gmail.com>
    Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
    erlend-aasland committed Apr 22, 2022
  11. gh-91156: Use locale.getencoding() instead of getpreferredencoding (G…

    …H-91732)
    
    Co-authored-by: Victor Stinner <vstinner@python.org>
    methane and vstinner committed Apr 22, 2022

Commits on Apr 21, 2022

  1. gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91799)

    Convert unicodeobject.h macros to static inline functions:
    
    * PyUnicode_AS_DATA()
    * PyUnicode_AS_UNICODE()
    * PyUnicode_GET_DATA_SIZE()
    * PyUnicode_GET_SIZE()
    
    Static inline functions are wrapped by macros which casts arguments
    with _PyObject_CAST() to prevent introducing new compiler warnings
    when passing "const PyObject*".
    vstinner committed Apr 21, 2022
  2. gh-89373: _Py_Dealloc() checks tp_dealloc exception (#32357)

    If Python is built in debug mode, _Py_Dealloc() now ensures that the
    tp_dealloc function leaves the current exception unchanged.
    vstinner committed Apr 21, 2022
  3. gh-91768: C API no longer use "const PyObject*" type (#91769)

    Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument
    type is now "PyObject*", rather than "const PyObject*".
    
    * Replace also "const PyObject*" with "PyObject*" in functions:
    
      * _Py_strhex_impl()
      * _Py_strhex_with_sep()
      * _Py_strhex_bytes_with_sep()
    
    * Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros.
    * Py_IS_TYPE() can now use Py_TYPE() in its implementation.
    vstinner committed Apr 21, 2022
  4. gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91773)

    Convert unicodeobject.h macros to static inline functions:
    
    * PyUnicode_MAX_CHAR_VALUE()
    * PyUnicode_READ()
    * PyUnicode_READY()
    * PyUnicode_READ_CHAR()
    * PyUnicode_WRITE()
    
    Move PyUnicode_READY() after _PyUnicode_Ready(), since it uses
    _PyUnicode_Ready().
    
    Static inline functions are wrapped by macros which casts arguments
    with _PyObject_CAST() and casts 'kind' arguments to "unsigned int" to
    prevent introducing new compiler warnings when passing "const
    PyObject*".
    vstinner committed Apr 21, 2022
  5. GH-91719: Make MSVC generate somewhat faster switch code (#91718)

    Apparently a switch on an 8-bit quantity where all cases are
    present generates a more efficient jump (doing only one indexed
    memory load instead of two).
    
    So we make opcode and use_tracing uint8_t, and generate a macro
    full of extra `case NNN:` lines for all unused opcodes.
    
    See faster-cpython/ideas#321 (comment)
    gvanrossum committed Apr 21, 2022
Older