Skip to content

Commits on Dec 23, 2022

  1. gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (G…

    …H-5576)
    
    The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero.
    eric-wieser committed Dec 23, 2022

Commits on Dec 22, 2022

  1. gh-100344: Add C implementation for asyncio.current_task (#100345)

    Co-authored-by: pranavtbhat
    itamaro committed Dec 22, 2022

Commits on Dec 21, 2022

  1. GH-69564: Clarify use of octal format of mode argument in help(os.chm…

    …od) (#20621)
    
    Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
    amaajemyfren and kumaraditya303 committed Dec 21, 2022

Commits on Dec 20, 2022

  1. gh-89051: Add ssl.OP_LEGACY_SERVER_CONNECT (#93927)

    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
    Co-authored-by: Christian Heimes <christian@python.org>
    Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
    Fixes #89051
    graingert committed Dec 20, 2022

Commits on Dec 17, 2022

  1. gh-100272: Fix JSON serialization of OrderedDict (GH-100273)

    It now preserves the order of keys.
    serhiy-storchaka committed Dec 17, 2022
  2. gh-99240: Reset pointer to NULL when the pointed memory is freed in a…

    …rgument parsing (#99890)
    
    Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
    Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
    3 people committed Dec 17, 2022

Commits on Dec 14, 2022

  1. GH-100000: Cleanup and polish various watchers code (GH-99998)

    * Initialize `type_watchers` array to `NULL`s
    * Optimize code watchers notification
    * Optimize func watchers notification
    itamaro committed Dec 14, 2022

Commits on Dec 9, 2022

  1. gh-81057: Fix an ifdef in the time module (#100125)

    An earlier commit only defined check_ticks_per_second() when HAVE_TIMES is defined. However, we also need it when HAVE_CLOCK is defined. This primarily affects Windows.
    
    #81057
    ericsnowcurrently committed Dec 9, 2022

Commits on Dec 8, 2022

  1. gh-98030: socket: add missing TCP socket options (#98031)

    A few TCP socket options have been added to the Linux kernel these last
    few years.
    
    This commit adds all the ones available in Linux 6.0:
    
      https://elixir.bootlin.com/linux/v6.0/source/include/uapi/linux/tcp.h#L91
    
    While at it, the TCP_FASTOPEN option has been moved lower in the list
    just to keep the same order as in tcp.h to ease future synchronisations.
    
    Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
    matttbe committed Dec 8, 2022

Commits on Dec 7, 2022

  1. gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070)

    The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
    their arguments once. If an argument has side effects, these side
    effects are no longer duplicated.
    
    Use temporary variables to avoid duplicating side effects of macro
    arguments. If available, use _Py_TYPEOF() to avoid type punning.
    Otherwise, use memcpy() for the assignment to prevent a
    miscompilation with strict aliasing caused by type punning.
    
    Add _Py_TYPEOF() macro: __typeof__() on GCC and clang.
    
    Add test_py_clear() and test_py_setref() unit tests to _testcapi.
    vstinner committed Dec 7, 2022

Commits on Dec 6, 2022

  1. gh-93453: No longer create an event loop in get_event_loop() (#98440)

    asyncio.get_event_loop() now always return either running event loop or
    the result of get_event_loop_policy().get_event_loop() call. The latter
    should now raise an RuntimeError if no current event loop was set
    instead of creating and setting a new event loop.
    
    It affects also a number of asyncio functions and constructors which
    call get_event_loop() implicitly: ensure_future(), shield(), gather(),
    etc.
    
    DeprecationWarning is no longer emitted if there is no running event loop but
    the current event loop was set.
    
    Co-authored-by: Łukasz Langa <lukasz@langa.pl>
    serhiy-storchaka and ambv committed Dec 6, 2022

Commits on Dec 5, 2022

  1. gh-99741: Implement Multi-Phase Init for the _xxsubinterpreters Module (

    gh-99742)
    
    _xxsubinterpreters is an internal module used for testing.
    
    #99741
    ericsnowcurrently committed Dec 5, 2022
  2. gh-60203: Revert changes in cycle.__setstate__ (#99982)

    In case if only True/False be supported as boolean arguments in future,
    we should continue to support 1/0 here.
    serhiy-storchaka committed Dec 5, 2022

Commits on Dec 4, 2022

  1. gh-98248: Normalizing the error messages in function struct.pack (GH-…

    …98252)
    
    Provide consistent and informative error messages in function struct.pack when its integral arguments are not in range.
    yanjs committed Dec 4, 2022

Commits on Dec 3, 2022

  1. bpo-15999: Accept arbitrary values for boolean parameters. (#15609)

    builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
    serhiy-storchaka committed Dec 3, 2022

Commits on Dec 2, 2022

  1. gh-99741: Clean Up the _xxsubinterpreters Module (gh-99940)

    This cleanup up resolves a few subtle bugs and makes the implementation for multi-phase init much cleaner.
    
    #99741
    ericsnowcurrently committed Dec 2, 2022
  2. GH-91054: Add code object watchers API (GH-99859)

    * Add API to allow extensions to set callback function on creation and destruction of PyCodeObject
    
    Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
    itamaro and Ye11ow-Flash committed Dec 2, 2022

Commits on Dec 1, 2022

  1. gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-…

    …99613)
    
    Previously *consumed was not set in this case.
    serhiy-storchaka committed Dec 1, 2022

Commits on Nov 30, 2022

  1. gh-99845: Use size_t type in __sizeof__() methods (#99846)

    The implementation of __sizeof__() methods using _PyObject_SIZE() now
    use an unsigned type (size_t) to compute the size, rather than a signed
    type (Py_ssize_t).
    
    Cast explicitly signed (Py_ssize_t) values to unsigned type
    (Py_ssize_t).
    vstinner committed Nov 30, 2022
Older