Skip to content
Permalink
main
Switch branches/tags

Commits on May 12, 2022

  1. Fix typo in argparse docs. (GH-92691)

    # Fix typo in argparse docs.
    
    > Sometimes, when dealing with **a** particularly long argument list**s**, [...]
    
    Mixture between plural and singular forms is incorrect. Use singular consistently since typically only a single argument list is employed. Change to:
    
    > Sometimes, when dealing with a particularly long argument list, [...]
    
    No issue was opened, since this is a trivial change.
    
    Automerge-Triggered-By: GH:rhettinger
    thueringa committed May 12, 2022

Commits on May 11, 2022

  1. gh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (#92696)

    Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline
    functions of unicodeobject.h.
    
    Change also the kind type from unsigned int to int: same parameter
    type than PyUnicode_FromKindAndData().
    
    The limited API version 3.11 no longer casts arguments to expected
    types.
    vstinner committed May 11, 2022
  2. gh-89653: PEP 670: Convert PyDict_GET_SIZE() macro to function (#92695)

    The limited C API version 3.12 no longer casts the argument.
    vstinner committed May 11, 2022
  3. gh-89653: PEP 670: Use PyObject* type for parameters (#92694)

    Use the PyObject* type for parameters of static inline functions:
    
    * Py_SIZE(): same parameter type than PyObject_Size()
    * PyList_GET_SIZE(), PyList_SET_ITEM(): same parameter type than
      PyList_Size() and PyList_SetItem()
    * PyTuple_GET_SIZE(), PyTuple_SET_ITEM(): same parameter type than
      PyTuple_Size() and PyTuple_SetItem().
    vstinner committed May 11, 2022
  4. gh-89653: PEP 670: Limited API doesn't cast arguments (#92654)

    The limited API version 3.11 no longer casts arguments to expected
    types of functions of functions:
    
    * PyList_GET_SIZE(), PyList_SET_ITEM()
    * PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
    * PyWeakref_GET_OBJECT()
    vstinner committed May 11, 2022
  5. gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)

    Convert the following Unicode macros to static inline functions.
    
    Surrogate functions:
    
    * Py_UNICODE_IS_SURROGATE()
    * Py_UNICODE_IS_HIGH_SURROGATE()
    * Py_UNICODE_IS_LOW_SURROGATE()
    * Py_UNICODE_HIGH_SURROGATE()
    * Py_UNICODE_LOW_SURROGATE()
    * Py_UNICODE_JOIN_SURROGATES()
    
    "Is" functions:
    
    * Py_UNICODE_ISALNUM()
    * Py_UNICODE_ISSPACE()
    
    In the implementation of these functions, the character type is now
    well defined to Py_UCS4.
    vstinner committed May 11, 2022
  6. gh-90978: asyncio TestSSL uses SHORT_TIMEOUT (#92642)

    TestSSL of asyncio now uses support.SHORT_TIMEOUT rather than
    hardcoded timeouts like 5, 10 or 40 seconds.
    vstinner committed May 11, 2022
  7. gh-89653: PEP 670: Convert PyCell macros to functions (#92653)

    Convert the following macros to static inline functions:
    
    * PyCell_GET()
    * PyCell_SET()
    
    Limited C API version 3.12 no longer casts arguments.
    
    Fix also usage of PyCell_SET(): only delete the old value after
    setting the new value.
    vstinner committed May 11, 2022
  8. gh-92651: Remove the Include/token.h header file (#92652)

    Remove the token.h header file. There was never any public tokenizer
    C API. The token.h header file was only designed to be used by Python
    internals.
    
    Move Include/token.h to Include/internal/pycore_token.h. Including
    this header file now requires that the Py_BUILD_CORE macro is
    defined. It no longer checks for the Py_LIMITED_API macro.
    
    Rename functions:
    
    * PyToken_OneChar() => _PyToken_OneChar()
    * PyToken_TwoChars() => _PyToken_TwoChars()
    * PyToken_ThreeChars() => _PyToken_ThreeChars()
    vstinner committed May 11, 2022
  9. gh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)

    Convert the following macros to static inline functions:
    
    * _Py_AS_GC()
    * _PyGCHead_FINALIZED(), _PyGCHead_SET_FINALIZED()
    * _PyGCHead_NEXT(), _PyGCHead_SET_NEXT()
    * _PyGCHead_PREV(), _PyGCHead_SET_PREV()
    * _PyGC_FINALIZED(), _PyGC_SET_FINALIZED()
    * _PyObject_GC_IS_TRACKED()
    * _PyObject_GC_MAY_BE_TRACKED()
    
    Add a macro wrapping the _PyObject_GC_IS_TRACKED() function to cast
    the argument to PyObject*.
    vstinner committed May 11, 2022
  10. gh-91810: ElementTree: Use text file's encoding by default in XML dec…

    …laration (GH-91903)
    
    ElementTree method write() and function tostring() now use the text file's
    encoding ("UTF-8" if not available) instead of locale encoding in XML
    declaration when encoding="unicode" is specified.
    serhiy-storchaka committed May 11, 2022

Commits on May 10, 2022

  1. gh-92584: test_decimal uses shutil.which() (#92640)

    test_decimal now uses shutil.which() rather than deprecated
    distutils.spawn.find_executable().
    vstinner committed May 10, 2022
  2. What's New 3.12: PyFrame_BlockSetup() was removed in 3.11 (#92645)

    What's New in Python 3.11: "PyFrame_BlockSetup() and
    PyFrame_BlockPop() have been removed.  (Contributed by Mark Shannon
    in bpo-40222.)"
    https://docs.python.org/dev/whatsnew/3.11.html#id8
    vstinner committed May 10, 2022
  3. bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)

    Here's the patch according to the discussion at the [Python-Dev mailing list](https://mail.python.org/archives/list/python-dev@python.org/thread/SDXOEMAEM6KQ3CQCJVBVRT5QNSPAVU6X/).
    UserDict.get() will match dict's behavior and not call `__missing__`.
    
    Automerge-Triggered-By: GH:rhettinger
    bharel committed May 10, 2022
  4. bpo-43689: improve documentation for Differ (GH-25132)

    Lines beginning with ``?`` try to help understanding the given diff.
    
    The output can be hard to understand when it contains whitespace characters, such as spaces, tabs or line breaks.
    
    While previously only tabs were mentioned, now all are listed.
    
    Automerge-Triggered-By: GH:rhettinger
    jugmac00 committed May 10, 2022
  5. gh-84131: Remove the deprecated pathlib.Path.link_to method. (#92505)

    Co-authored-by: Barney Gale <barney.gale@gmail.com>
    gpshead and barneygale committed May 10, 2022
  6. Update numbers.rst (#31995)

    maggyero committed May 10, 2022
  7. gh-91731: Fix typo in pymacro.h (#92618)

    * Fix typo in pymacro.h
    
    * Update Include/pymacro.h
    
    Co-authored-by: Victor Stinner <vstinner@python.org>
    
    Co-authored-by: Victor Stinner <vstinner@python.org>
    pablogsal and vstinner committed May 10, 2022
Older