Skip to content
Permalink
Branch: master
Commits on Jan 31, 2020
  1. Doc: Fix s/pseudo random/pseudo-random/ (GH-18289)

    JulienPalard committed Jan 31, 2020
  2. bpo-38792: Remove IDLE shell calltip before new prompt. (#17150)

    3 people committed Jan 31, 2020
    Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart.
    
    Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
    Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Commits on Jan 30, 2020
  1. bpo-39487: Merge duplicated _Py_IDENTIFIER identifiers in C code (GH-…

    shihai1991 committed Jan 30, 2020
    …18254)
    
    Moving repetitive `_Py_IDENTIFIER` instances to a global location helps identify them more easily in regards to sub-interpreter support.
  2. bpo-39502: Skip test_zipfile.test_add_file_after_2107() on AIX (GH-18282

    vstinner committed Jan 30, 2020
    )
    
    Skip test_zipfile.test_add_file_after_2107() if time.localtime()
    fails with OverflowError. It is the case on AIX 6.1 for example.
  3. bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() (GH…

    vstinner committed Jan 30, 2020
    …-18278)
    
    Add _Py_NO_RETURN to functions calling Py_FatalError():
    
    * _PyObject_AssertFailed()
    * dummy_dealloc()
    * faulthandler_fatal_error_thread()
    * none_dealloc()
    * notimplemented_dealloc()
  4. bpo-38631: Replace Py_FatalError() with assert() in ceval.c (GH-18279)

    vstinner committed Jan 30, 2020
    Replace a few Py_FatalError() calls if tstate is NULL with
    assert(tstate != NULL) in ceval.c.
    
    PyEval_AcquireThread(), PyEval_ReleaseThread() and
    PyEval_RestoreThread() must never be called with a NULL tstate.
  5. bpo-38631: Avoid Py_FatalError() in unicodeobject.c (GH-18281)

    vstinner committed Jan 30, 2020
    Replace Py_FatalError() calls with _PyErr_WriteUnraisableMsg(),
    _PyObject_ASSERT_FAILED_MSG() or Py_UNREACHABLE()
    in unicode_dealloc() and unicode_release_interned().
  6. bpo-39353: binascii.crc_hqx() is no longer deprecated (GH-18276)

    vstinner committed Jan 30, 2020
    The binascii.crc_hqx() function is no longer deprecated.
  7. bpo-38631: Replace tp_new_wrapper() fatal error with SystemError (GH-…

    vstinner committed Jan 30, 2020
    …18262)
    
    tp_new_wrapper() now raises a SystemError if called with non-type
    self, rather than calling Py_FatalError() which cannot be catched.
  8. bpo-38631: Avoid Py_FatalError() in init_slotdefs() (GH-18263)

    vstinner committed Jan 30, 2020
    Rename init_slotdefs() to _PyTypes_InitSlotDefs() and add a return
    value of type PyStatus. The function is now called exactly once from
    _PyTypes_Init(). Replace calls to init_slotdefs() with an assertion
    checking that slotdefs is initialized.
  9. bpo-38631: Replace Py_FatalError() with _PyObject_ASSERT_FAILED_MSG() (

    vstinner committed Jan 30, 2020
    …GH-18258)
    
    Replace Py_FatalError() with _PyObject_ASSERT_FAILED_MSG() in
    object.c and typeobject.c to also dump the involved Python object on
    a fatal error. It should ease debug when such fatal error occurs.
    
    If the double linked list is inconsistent, _Py_ForgetReference() no
    longer dumps previous and next objects in the fatal error, it now
    only dumps the current object. It ensures that the error message
    is displayed even if dumping the object does crash Python.
    
    Enhance _Py_ForgetReference() error messages;
    _PyObject_ASSERT_FAILED_MSG() logs the "_Py_ForgetReference" function
    name.
  10. bpo-39493: Fix definition of IO.closed in typing.py (#18265)

    hauntsaninja committed Jan 30, 2020
  11. Improve grammar in the import system reference documentation (GH-18209)

    Bonifacio2 committed Jan 30, 2020
    Replaced the period with a comma.
    
    Automerge-Triggered-By: @Mariatta
Commits on Jan 29, 2020
  1. Remove deadcode in _Py_inc_count() (GH-18257)

    vstinner committed Jan 29, 2020
    (tp->tp_next != NULL) check became redundant with
    commit 45294a9 (merged in 2006).
  2. Get mock coverage back to 100% (GH-18228)

    cjw296 committed Jan 29, 2020
    * use the `: pass` and `: yield` patterns for code that isn't expected to ever be executed.
    
    * The _Call items passed to _AnyComparer are only ever of length two, so assert instead of if/else
    
    * fix typo
    
    * Fix bug, where stop-without-start patching dict blows up with `TypeError: 'NoneType' object is not iterable`, highlighted by lack of coverage of an except branch.
    
    * The fix for bpo-37972 means _Call.count and _Call.index are no longer needed.
    
    * add coverage for calling next() on a mock_open with readline.return_value set.
    
    * __aiter__ is defined on the Mock so the one on _AsyncIterator is never called.
  3. bpo-39485: fix corner-case in method-detection of mock (GH-18252)

    cfbolz committed Jan 29, 2020
    Replace check for whether something is a method in the mock module. The
    previous version fails on PyPy, because there no method wrappers exist
    (everything looks like a regular Python-defined function). Thus the
    isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check
    returns True for any descriptor, not just methods.
    
    This condition could also return erroneously True in CPython for
    C-defined descriptors.
    
    Instead to decide whether something is a method, just check directly
    whether it's a function defined on the class. This passes all tests on
    CPython and fixes the bug on PyPy.
  4. bpo-39460: Fix test_zipfile.test_add_file_after_2107() (GH-18247)

    vstinner committed Jan 29, 2020
    XFS filesystem is limited to 32-bit timestamp, but the utimensat()
    syscall doesn't fail. Moreover, there is a VFS bug which returns
    a cached timestamp which is different than the value on disk.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1795576
    https://bugs.python.org/issue39460#msg360952
  5. bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)

    nanjekyejoannah and blurb-it committed Jan 29, 2020
    Some of the *SetItem methods in the C API steal a reference to the
    given value. This annotates the better behaved ones to assure the
    reader that these are not the ones with the inconsistent behaviour.
    
    * 📜🤖 Added by blurb_it.
    
    * make docs consistent with signature
    
    Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  6. bpo-36051: Drop GIL during large bytes.join() (GH-17757)

    bmerry committed Jan 29, 2020
    Improve multi-threaded performance by dropping the GIL in the fast path
    of bytes.join. To avoid increasing overhead for small joins, it is only
    done if the output size exceeds a threshold.
  7. bpo-39401: Avoid unsafe DLL load on Windows 7 and earlier (GH-18231)

    zooba committed Jan 29, 2020
    As Windows 7 is not supported by Python 3.9, we just replace the dynamic load with a static import. Backports will have a different fix to ensure they continue to behave the same.
Commits on Jan 28, 2020
  1. bpo-39459: include missing test files in windows installer

    DinoV committed Jan 28, 2020
    Adds missing test files to Windows installer to wrap up bpo-39459
  2. bpo-38960: DTrace build fix for FreeBSD. (GH-17451)

    dcarlier-afilias authored and encukou committed Jan 28, 2020
    DTrace build fix for FreeBSD.
    
    - allowing passing an extra flag as it need to define the arch size.
    - casting some probe's arguments.
  3. bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)

    remilapeyre authored and methane committed Jan 28, 2020
  4. bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158

    ameily authored and zooba committed Jan 28, 2020
    )
  5. bpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935)

    methane and aeros committed Jan 28, 2020
    Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
  6. bpo-39393: Misleading error message on dependent DLL resolution failu…

    ZackerySpytz authored and zooba committed Jan 28, 2020
    …re (GH-18093)
  7. bpo-38883: Don't use POSIX `$HOME` in `pathlib.Path.home/expanduser` …

    lazka authored and zooba committed Jan 28, 2020
    …on Windows (GH-17961)
    
    In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows.
    
    Path.expanduser/home still honored HOME despite being documented as behaving the same
    as os.path.expanduser. This makes them also ignore HOME so that both implementations
    behave the same way again.
  8. bpo-38644: Pass tstate in ceval.c (GH-18222)

    vstinner committed Jan 28, 2020
    Pass explicitly the Python thread state (tstate) in ceval.c.
  9. bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-…

    rhettinger committed Jan 28, 2020
    …18226)
    
    * Change the source for the SAT data to a primary source.
    * Fix typo in the standard deviation
    * Clarify that the binomial probabalities are just for the Python room.
Older
You can’t perform that action at this time.