X Tutup
The Wayback Machine - https://web.archive.org/web/20220515203820/https://github.com/python/cpython/commits/main
Skip to content
Permalink
main
Switch branches/tags

Commits on May 15, 2022

  1. Restore default role check in make check. (#92290)

    * Restore default role check in `make check`.
    
    * Options first, then files.
    
    * Update `make.bat` too.
    
    * Add a comment explaining the extra options.
    
    * No reason to ignore the README.rst.
    
    * Enable default-role check in sphinx-lint.
    
    Co-authored-by: Julien Palard <julien@palard.fr>
    
    * Update sphinx-lint default-role check.
    
    * Fix use of the default role in the docs.
    
    * Update make.bat to check for the default role too.
    
    * Fix comment in make.bat.
    
    Co-authored-by: Julien Palard <julien@palard.fr>
    ezio-melotti and JulienPalard committed May 15, 2022
  2. gh-92781: Avoid mixing declarations and code in C API (#92783)

    Avoid mixing declarations and code in the C API to fix the compiler
    warning: "ISO C90 forbids mixed declarations and code"
    [-Werror=declaration-after-statement].
    vstinner committed May 15, 2022

Commits on May 13, 2022

  1. Fix small typo (#92721)

    g4b1nagy committed May 13, 2022
  2. Document Py_ssize_t. (GH-92512)

    It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But
    there's 8182 errors left.
    
    Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
    JulienPalard and ezio-melotti committed May 13, 2022
  3. gh-85858: Remove PyUnicode_InternImmortal() function (#92579)

    Remove the PyUnicode_InternImmortal() function and the
    SSTATE_INTERNED_IMMORTAL macro.
    
    The PyUnicode_InternImmortal() function is still exported in the
    stable ABI. The function is removed from the API.
    
    PyASCIIObject.state.interned size is now a single bit, rather than 2
    bits.
    
    Keep SSTATE_NOT_INTERNED and SSTATE_INTERNED_MORTAL macros for
    backward compatibility, but no longer use them internally since the
    interned member is now a single bit and so can only have two values
    (interned or not interned).
    
    Update stats of _PyUnicode_ClearInterned().
    vstinner committed May 13, 2022
  4. gh-89653: Use int type for Unicode kind (#92704)

    Use the same type that PyUnicode_FromKindAndData() kind parameter
    type (public C API): int.
    vstinner committed May 13, 2022
  5. gh-89653: PEP 670: Convert PyUnicode_KIND() macro to function (#92705)

    In the limited C API version 3.12, PyUnicode_KIND() is now
    implemented as a static inline function. Keep the macro for the
    regular C API and for the limited C API version 3.11 and older to
    prevent introducing new compiler warnings.
    
    Update _decimal.c and stringlib/eq.h for PyUnicode_KIND().
    vstinner committed May 13, 2022

Commits on May 12, 2022

  1. gh-92584: test_cppext uses setuptools (#92639)

    Rewrite test_cppext to run in a virtual environment and to build the
    C++ extension with setuptools rather than distutils.
    vstinner committed May 12, 2022
  2. Check result of utc_to_seconds and skip fold probe in pure Python (#9…

    …1582)
    
    The `utc_to_seconds` call can fail, here's a minimal reproducer on
    Linux:
    
    TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)"
    
    The old behavior still raised an error in a similar way, but only
    because subsequent calculations happened to fail as well. Better to fail
    fast.
    
    This also refactors the tests to split out the `fromtimestamp` and
    `utcfromtimestamp` tests, and to get us closer to the actual desired
    limits of the functions. As part of this, we also changed the way we
    detect platforms where the same limits don't necessarily apply (e.g.
    Windows).
    
    As part of refactoring the tests to hit this condition explicitly (even
    though the user-facing behvior doesn't change in any way we plan to
    guarantee), I noticed that there was a difference in the places that
    `datetime.utcfromtimestamp` fails in the C and pure Python versions, which
    was fixed by skipping the "probe for fold" logic for UTC specifically —
    since UTC doesn't have any folds or gaps, we were never going to find a
    fold value anyway. This should prevent some failures in the pure python
    `utcfromtimestamp` method on timestamps close to 0001-01-01.
    
    There are two separate news entries for this because one is a
    potentially user-facing change, the other is an internal code
    correctness change that, if anything, changes some error messages. The
    two happen to be coupled because of the test refactoring, but they are
    probably best thought of as independent changes.
    
    Fixes GH-91581
    pganssle committed May 12, 2022
  3. gh-91578: improved error message when trying to instantiate an abstra…

    …ct class with missing methods (gh-47246)
    ravi140222 committed May 12, 2022
  4. 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
Older
X Tutup