Skip to content
Permalink
Branch: master
Commits on Feb 19, 2020
  1. bpo-39479:Add math.lcm() function: Least Common Multiple (#18547)

    ananthan-123 and blurb-it committed Feb 19, 2020
    * Update math.rst
    
    * Update math.rst
    
    * updated whats new
    
    * Update test_math.py
    
    * Update mathmodule.c
    
    * Update mathmodule.c.h
    
    * Update ACKS
    
    * 📜🤖 Added by blurb_it.
    
    * Update 3.9.rst
    
    * Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst
    
    * Update math.rst
    
    * Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst
    
    * Update test_math.py
    
    * Update ACKS
    
    * Update mathmodule.c.h
    
    * Update mathmodule.c
    
    * Update mathmodule.c.h
    
    * Update mathmodule.c.h
    
    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  2. Revert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I…

    vstinner committed Feb 19, 2020
    … flags passed (#18314)" (GH-18553)
    
    This reverts commit d83b660.
  3. bpo-39572: Document ’total’ flag of TypedDict (GH-18554)

    ananthan-123 committed Feb 19, 2020
Commits on Feb 18, 2020
  1. Include subsections in TOC for PDF version of docs. (GH-9629)

    csabella committed Feb 18, 2020
  2. bpo-39674: Revert "bpo-25988: Do not expose abstract collection class…

    vstinner committed Feb 18, 2020
    …es in the collections module. (GH-10596)" (GH-18545)
    
    This reverts commit ef092fe.
    
    Update collections __getattr__() and documentation to defer aliases
    removal to Python 3.10.
  3. bpo-37207: Use vectorcall for range() (GH-18464)

    encukou committed Feb 18, 2020
    This continues the `range()` part of #13930. The complete pull request is stalled on discussions around dicts, but `range()` should not be controversial. (And I plan to open PRs for other parts if this is merged.)
    On top of Mark's change, I unified `range_new` and `range_vectorcall`, which had a lot of duplicate code.
    
    
    https://bugs.python.org/issue37207
  4. bpo-36347: stop using RESTRICTED constants (GH-12684)

    jdemeyer committed Feb 18, 2020
    The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them.
    
    CC @matrixise 
    
    
    https://bugs.python.org/issue36347
  5. bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_ch…

    kyleam committed Feb 18, 2020
    …ars (GH-18337)
    
    When `allow_abbrev` was first added, disabling the abbreviation of
    long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967)).  As a fix,
    b1e4d1b (contained in v3.8) ignores `allow_abbrev=False` for a
    given argument string if the string does _not_ start with "--"
    (i.e. it doesn't look like a long option).
    
    This fix, however, doesn't take into account that long options can
    start with alternative characters specified via `prefix_chars`,
    introducing a regression: `allow_abbrev=False` has no effect on long
    options that start with an alternative prefix character.
    
    The most minimal fix would be to replace the "starts with --" check
    with a "starts with two prefix_chars characters".  But
    `_get_option_tuples` already distinguishes between long and short
    options, so let's instead piggyback off of that check by moving the
    `allow_abbrev` condition into `_get_option_tuples`.
    
    
    
    
    
    https://bugs.python.org/issue39546
  6. bpo-39663: IDLE: Add additional tests for pyparse (GH-18536)

    csabella and terryjreedy committed Feb 18, 2020
    Test when find_good_parse_start should return 0.
    
    Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Feb 17, 2020
  1. bpo-1635741: Port _abc extension to multiphase initialization (PEP 48…

    shihai1991 committed Feb 17, 2020
    …9) (GH-18030)
  2. bpo-1635741: Port _contextvars module to multiphase initialization (P…

    shihai1991 committed Feb 17, 2020
    …EP 489) (GH-18374)
  3. bpo-39500: Fix compile warnings in unicodeobject.c (GH-18519)

    shihai1991 committed Feb 17, 2020
  4. bpo-36465: Update doc of init_config.rst (GH-18520)

    shihai1991 committed Feb 17, 2020
  5. bpo-1635741: Port _crypt extension module to multiphase initializatio…

    shihai1991 committed Feb 17, 2020
    …n (PEP 489) (GH-18404)
  6. bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags p…

    3 people committed Feb 17, 2020
    …assed (#18314)
    
    * Hard reset + cherry piciking the changes.
    
    * 📜🤖 Added by blurb_it.
    
    * Added @vstinner News
    
    * Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst
    
    Co-Authored-By: Victor Stinner <vstinner@python.org>
    
    * Hard reset to master
    
    * Hard reset to master + latest changes
    
    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
    Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Feb 16, 2020
  1. bpo-39104: Fix hanging ProcessPoolExecutor on shutdown nowait with pi…

    tomMoral committed Feb 16, 2020
    …ckling failure (GH-17670)
    
    As reported initially by @rad-pat in #6084, the following script causes a deadlock.
    
    ```
    from concurrent.futures import ProcessPoolExecutor
    
    
    class ObjectWithPickleError():
        """Triggers a RuntimeError when sending job to the workers"""
    
        def __reduce__(self):
            raise RuntimeError()
    
    
    if __name__ == "__main__":
        e = ProcessPoolExecutor()
        f = e.submit(id, ObjectWithPickleError())
        e.shutdown(wait=False)
        f.result()  # Deadlock on get
    ```
    
    This is caused by the fact that the main process is closing communication channels that might be necessary to the `queue_management_thread` later. To avoid this, this PR let the `queue_management_thread` manage all the closing.
    
    
    
    https://bugs.python.org/issue39104
    
    
    
    Automerge-Triggered-By: @pitrou
Commits on Feb 14, 2020
  1. bpo-12915: Add pkgutil.resolve_name (GH-18310)

    vsajip committed Feb 14, 2020
  2. bpo-39573: Update clinic to use Py_IS_TYPE() function (GH-18507)

    corona10 committed Feb 14, 2020
  3. bpo-39573: PyXXX_Check() macros use Py_IS_TYPE() (GH-18508)

    corona10 committed Feb 14, 2020
    Update PyXXX_Check() macros in Include/ to use
    the new Py_IS_TYPE function.
  4. closes bpo-39630: Update pointers to string literals to be const char…

    petdance committed Feb 14, 2020
    … *. (GH-18510)
  5. closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)

    inorton and benjaminp committed Feb 14, 2020
    Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined.  This change stops `_XOPEN_SOURCE` begin set on HP-UX
    
    Co-authored-by: Benjamin Peterson <benjamin@python.org>
Commits on Feb 13, 2020
  1. bpo-39627: Fix TypedDict totality check for inherited keys (#18503)

    vemel committed Feb 13, 2020
    (Adapted from python/typing#700)
  2. bpo-39524: Fixed doc-string in ast._pad_whitespace (GH-18340)

    mpheath committed Feb 13, 2020
  3. bpo-39573: Add Py_IS_TYPE() function (GH-18488)

    corona10 committed Feb 13, 2020
    Co-Author: Neil Schemenauer <nas-github@arctrix.com>
  4. bpo-39573: Fix bad copy-paste in Py_SET_SIZE (GH-18496)

    brandtbucher committed Feb 13, 2020
  5. bpo-39606: allow closing async generators that are already closed (GH…

    njsmith committed Feb 13, 2020
    …-18475)
    
    The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a
    agen.aclose() coroutine object. It accidentally also prevented you
    from calling aclose() at all on an async generator that was already
    closed or exhausted. This commit fixes it so we're only blocking the
    actually illegal cases, while allowing the legal cases.
    
    The new tests failed before this patch. Also confirmed that this fixes
    the test failures we were seeing in Trio with Python dev builds:
      python-trio/trio#1396
    
    
    https://bugs.python.org/issue39606
  6. bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, …

    gousaiyang committed Feb 13, 2020
    …`resource`, `shutil`, `signal`, `syslog` (GH-18407)
  7. closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)

    petdance committed Feb 13, 2020
Commits on Feb 12, 2020
  1. bpo-35134: Add Include/cpython/fileutils.h header file (GH-18493)

    vstinner committed Feb 12, 2020
    Move CPython C API from Include/fileutils.h into a new
    Include/cpython/fileutils.h header file which is included by
    Include/fileutils.h.
    
    Exclude the following private symbols from the limited C API:
    
    * _Py_error_handler
    * _Py_GetErrorHandler()
    * _Py_DecodeLocaleEx()
    * _Py_EncodeLocaleEx()
  2. bpo-35134: Add Include/cpython/bytesobject.h file (GH-18494)

    vstinner committed Feb 12, 2020
    Add Include/cpython/bytearrayobject.h and
    Include/cpython/bytesobject.h header files.
    
    Move CPython C API from Include/bytesobject.h into a new
    Include/cpython/bytesobject.h header file which is included by
    Include/bytesobject.h. Do a similar change for
    Include/bytearrayobject.h.
Older
You can’t perform that action at this time.