Skip to content
Permalink
Branch: master
Commits on Feb 13, 2020
  1. 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
  2. bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, …

    gousaiyang committed Feb 13, 2020
    …`resource`, `shutil`, `signal`, `syslog` (GH-18407)
  3. 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.
  3. bpo-35081: Move dtoa.h header to the internal C API (GH-18489)

    vstinner committed Feb 12, 2020
    Move the dtoa.h header file to the internal C API as pycore_dtoa.h:
    it only contains private functions (prefixed by "_Py").
    
    The math and cmath modules must now be compiled with the
    Py_BUILD_CORE macro defined.
  4. bpo-35081: Move bytes_methods.h to the internal C API (GH-18492)

    vstinner committed Feb 12, 2020
    Move the bytes_methods.h header file to the internal C API as
    pycore_bytes_methods.h: it only contains private symbols (prefixed by
    "_Py"), except of the PyDoc_STRVAR_shared() macro.
  5. bpo-18819: tarfile: only set device fields for device files (GH-18080)

    wchargin committed Feb 12, 2020
    The GNU docs describe the `devmajor` and `devminor` fields of the tar
    header struct only in the context of character and block special files,
    suggesting that in other cases they are not populated. Typical utilities
    behave accordingly; this patch teaches `tarfile` to do the same.
  6. bpo-21016: pydoc and trace use sysconfig (GH-18476)

    vstinner and Jan Matějek committed Feb 12, 2020
    bpo-21016, bpo-1294959: The pydoc and trace modules now use the
    sysconfig module to get the path to the Python standard library, to
    support uncommon installation path like /usr/lib64/python3.9/ on
    Fedora.
    
    Co-Authored-By: Jan Matějek <jmatejek@suse.com>
  7. bpo-32856: Optimize the assignment idiom in comprehensions. (GH-16814)

    serhiy-storchaka committed Feb 12, 2020
    Now `for y in [expr]` in comprehensions is as fast as a simple
    assignment `y = expr`.
  8. bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)

    serhiy-storchaka committed Feb 12, 2020
    * Always set the text attribute.
    * Correct the offset attribute for non-ascii sources.
  9. bpo-39567: Add audit for os.walk(), os.fwalk(), Path.glob() and Path.…

    serhiy-storchaka committed Feb 12, 2020
    …rglob(). (GH-18372)
  10. bpo-39605: Remove a cast that causes a warning. (GH-18473)

    benjaminp committed Feb 12, 2020
  11. bpo-39595: Improve zipfile.Path performance (#18406)

    jaraco and blurb-it committed Feb 12, 2020
    * Improve zipfile.Path performance on zipfiles with a large number of entries.
    
    * 📜🤖 Added by blurb_it.
    
    * Add bpo to blurb
    
    * Sync with importlib_metadata 1.5 (6fe70ca)
    
    * Update blurb.
    
    * Remove compatibility code
    
    * Add stubs module, omitted from earlier commit
    
    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  12. closes bpo-39605: Fix some casts to not cast away const. (GH-18453)

    petdance committed Feb 12, 2020
    gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
    
    Adding the const to the type cast, as in:
    
    -    return _PyUnicode_FromUCS1((unsigned char*)s, size);
    +    return _PyUnicode_FromUCS1((const unsigned char*)s, size);
    
    or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
    
    -    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
    +    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
    
    These changes will not change code, but they will make it much easier to check for errors in consts
  13. docs: macos - change "versiona" to "versions" (GH-18467)

    RandyMcMillan committed Feb 12, 2020
Commits on Feb 11, 2020
  1. Fix ordering issue in Windows release upload script (GH-18465)

    zooba committed Feb 11, 2020
    Automerge-Triggered-By: @zooba
  2. bpo-38644: Rephrase What's New entry (GH-18461)

    vstinner committed Feb 11, 2020
  3. bpo-39245: Switch to public API for Vectorcall (GH-18460)

    encukou committed Feb 11, 2020
    The bulk of this patch was generated automatically with:
    
        for name in \
            PyObject_Vectorcall \
            Py_TPFLAGS_HAVE_VECTORCALL \
            PyObject_VectorcallMethod \
            PyVectorcall_Function \
            PyObject_CallOneArg \
            PyObject_CallMethodNoArgs \
            PyObject_CallMethodOneArg \
        ;
        do
            echo $name
            git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
        done
    
        old=_PyObject_FastCallDict
        new=PyObject_VectorcallDict
        git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"
    
    and then cleaned up:
    
    - Revert changes to in docs & news
    - Revert changes to backcompat defines in headers
    - Nudge misaligned comments
  4. bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397)

    vstinner committed Feb 11, 2020
    PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
    string is not ready.
  5. bpo-38374: Remove weakref.ReferenceError from docs (GH-18452)

    rogerhurwitz committed Feb 11, 2020
    Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.
    
    Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007.  Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.
    
    Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`. 
    
    
    https://bugs.python.org/issue38374
  6. bpo-39600: Adjust code, add idlelib/NEWS item (GH-18449)

    terryjreedy committed Feb 11, 2020
    Complete previous patch.
Commits on Feb 10, 2020
  1. bpo-38325: Skip non-BMP tests of test_winconsoleio (GH-18448)

    vstinner committed Feb 10, 2020
    Skip tests on non-BMP characters of test_winconsoleio.
  2. bpo-39417: Fix broken link to guide to building venvs (GH-18432)

    j9ac9k committed Feb 10, 2020
  3. Correct the documented default encoding (GH-18429)

    eric-wieser committed Feb 10, 2020
    From the source for `PyUnicode_Decode`, the implementation is:
    ```
    if (encoding == NULL) {
        return PyUnicode_DecodeUTF8Stateful(s, size, errors, NULL);
    }
    ```
    which is pretty clearly not defaulting to ASCII.
    
    ---
    
    I assume this needs neither a news entry nor bpo link.
  4. bpo-13826: Clarify Popen constructor example (GH-18438)

    tdsmith committed Feb 10, 2020
    Clarifies that the use of `shlex.split` is more instructive than
    normative, and provides a simpler example.
    
    
    
    
    
    https://bugs.python.org/issue13826
  5. bpo-39594: Fix typo in os.times documentation (GH-18443)

    rogerhurwitz committed Feb 10, 2020
    There was an extra space in the url markup, causing the documentation not rendered properly.
    
    https://bugs.python.org/issue39594
  6. Issue3950: Fix docs for default locale used by gettext to match imple…

    Carl-Ty committed Feb 10, 2020
    …mentation (#18435)
    
    documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63.
  7. Remove redundant references in struct doc (GH-18053)

    christopheNan committed Feb 10, 2020
  8. bpo-39369 Doc: Update mmap readline method documentation (GH-17957)

    Pardim93 and blurb-it committed Feb 10, 2020
    * Update mmap readline method documentation
    
    Update mmap `readline` method description. The fact that the `readline` method does update the file position should not be ignored since this might give the impression for the programmer that it doesn't update it.
    
    * 📜🤖 Added by blurb_it.
    
    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  9. bpo-39600, IDLE: Remove duplicated font names (GH-18430)

    vstinner committed Feb 10, 2020
    In the font configuration window, remove duplicated font names.
  10. Remove note saying patch is straightforward (#18431)

    briancurtin committed Feb 10, 2020
    While `unittest.mock.patch` is a great thing, it is not straightforward.
    If it were straightforward there wouldn't be such a huge amount of
    documentation for it, and frankly, when myself and others who I've
    read about often struggle to figure out what on earth `patch()` wants,
    coming to the docs to read that it's straightforward is not helpful.
  11. bpo-39586: Deprecate distutils bdist_msi command (GH-18415)

    hugovk committed Feb 10, 2020
Older
You can’t perform that action at this time.