Skip to content
Permalink
master

Commits on Oct 30, 2020

  1. bpo-42208: Fix test_gdb for gc_collect_main() name (GH-23041)

    The gcmodule.c collect() function was renamed to gc_collect_main():
    update gdb/libpython.py (python-gdb.py).
    vstinner committed Oct 30, 2020
  2. bpo-42208: Move _PyImport_Cleanup() to pylifecycle.c (GH-23040)

    Move _PyImport_Cleanup() to pylifecycle.c, rename it to
    finalize_modules(), split it (200 lines) into many smaller
    sub-functions and cleanup the code.
    vstinner committed Oct 30, 2020
  3. bpo-42208: Pass tstate to _PyGC_CollectNoFail() (GH-23038)

    Move private _PyGC_CollectNoFail() to the internal C API.
    
    Remove the private _PyGC_CollectIfEnabled() which was just an alias
    to the public PyGC_Collect() function since Python 3.8.
    
    Rename functions:
    
    * collect() => gc_collect_main()
    * collect_with_callback() => gc_collect_with_callback()
    * collect_generations() => gc_collect_generations()
    vstinner committed Oct 30, 2020
  4. DOC: attribute PyPy for the idea behind LOAD_ATTR cache (GH-23036)

    Co-authored-by: Pablo Galindo <[email protected]>
    mattip and pablogsal committed Oct 30, 2020
  5. bpo-42206: Propagate and raise errors from PyAST_Validate in the pars…

    …er (GH-23035)
    isidentical committed Oct 30, 2020
  6. bpo-42172: Correct typo for test_socket.py (GH-23013)

    adkhunt committed Oct 30, 2020
  7. bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)

    The _RandomSequence class in tempfile used to check the current pid every time its rng property was used.
    This commit replaces this code with `os.register_at_fork` to reduce the overhead.
    Deric-W committed Oct 30, 2020
  8. bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)

    Follow up to 7cdf30f and 4173320. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR.
    Fidget-Spinner committed Oct 30, 2020

Commits on Oct 29, 2020

  1. bpo-42061: Document __format__ for IP addresses (GH-23018)

    Automerge-Triggered-By: GH:ericvsmith
    John-Ted committed Oct 29, 2020
  2. bpo-42029: Remove IRIX code (GH-23023)

    IRIX code was slowy removed in Python 2.4 (--with-sgi-dl), Python 3.3
    (Irix threads), and Python 3.7.
    vstinner committed Oct 29, 2020
  3. bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creat…

    …ing the func object (GH-22953)
    
    func_dealloc() does not handle partially-created objects. Best not to give it any.
    Jongy committed Oct 29, 2020
  4. bpo-34204: Use pickle.DEFAULT_PROTOCOL in shelve (GH-19639)

    Use pickle.DEFAULT_PROTOCOL (currently 5) in shelve instead of a
    hardcoded 3.
    ZackerySpytz committed Oct 29, 2020

Commits on Oct 27, 2020

  1. bpo-41805: Documentation for PEP 585 (GH-22615)

    Fidget-Spinner committed Oct 27, 2020
  2. bpo-42161: Micro-optimize _collections._count_elements() (GH-23008)

    Move the _PyLong_GetOne() call outside the fast-path loop.
    vstinner committed Oct 27, 2020
  3. bpo-42161: Remove private _PyLong_Zero and _PyLong_One (GH-23003)

    Use PyLong_FromLong(0) and PyLong_FromLong(1) of the public C API
    instead. For Python internals, _PyLong_GetZero() and _PyLong_GetOne()
    of pycore_long.h can be used.
    vstinner committed Oct 27, 2020
  4. bpo-42099: Fix reference to ob_type in unionobject.c and ceval (GH-22829

    )
    
    * Use Py_TYPE() rather than o->ob_type.
    nascheme committed Oct 27, 2020
  5. bpo-6761: Enhance __call__ documentation (GH-7987)

    andresdelfino committed Oct 27, 2020
  6. bpo-42161: Modules/ uses _PyLong_GetZero() and _PyLong_GetOne() (GH-2…

    …2998)
    
    Use _PyLong_GetZero() and _PyLong_GetOne() in Modules/ directory.
    
    _cursesmodule.c and zoneinfo.c are now built with
    Py_BUILD_CORE_MODULE macro defined.
    vstinner committed Oct 27, 2020
  7. bpo-41474, Makefile: Add dependency on cpython/frameobject.h (GH-22999)

    Co-Authored-By: Skip Montanaro <[email protected]>
    vstinner and smontanaro committed Oct 27, 2020
  8. bpo-42157: Rename unicodedata.ucnhash_CAPI (GH-22994)

    Removed the unicodedata.ucnhash_CAPI attribute which was an internal
    PyCapsule object. The related private _PyUnicode_Name_CAPI structure
    was moved to the internal C API.
    
    Rename unicodedata.ucnhash_CAPI as unicodedata._ucnhash_CAPI.
    vstinner committed Oct 27, 2020
  9. bpo-42161: Use _PyLong_GetZero() and _PyLong_GetOne() (GH-22995)

    Use _PyLong_GetZero() and _PyLong_GetOne()
    in Objects/ and Python/ directories.
    vstinner committed Oct 27, 2020
  10. bpo-30681: Support invalid date format or value in email Date header (G…

    …H-22090)
    
    I am re-submitting an older PR which was abandoned but is still relevant, #10783 by @timb07.
    
    The issue being solved () is still relevant. The original PR #10783 was closed as
    the final request changes were not applied and since abandoned.
    
    In this new PR I have re-used the original patch plus applied both comments from the review, by @maxking and @pganssle.
    
    
    For reference, here is the original PR description:
    In email.utils.parsedate_to_datetime(), a failure to parse the date, or invalid date components (such as hour outside 0..23) raises an exception. Document this behaviour, and add tests to test_email/test_utils.py to confirm this behaviour.
    
    In email.headerregistry.DateHeader.parse(), check when parsedate_to_datetime() raises an exception and add a new defect InvalidDateDefect; preserve the invalid value as the string value of the header, but set the datetime attribute to None.
    
    Add tests to test_email/test_headerregistry.py to confirm this behaviour; also added test to test_email/test_inversion.py to confirm emails with such defective date headers round trip successfully.
    
    This pull request incorporates feedback gratefully received from @bitdancer, @brettcannon, @Mariatta and @warsaw, and replaces the earlier PR #2254.
    
    Automerge-Triggered-By: GH:warsaw
    sim0nx committed Oct 27, 2020

Commits on Oct 26, 2020

  1. bpo-42161: Add _PyLong_GetZero() and _PyLong_GetOne() (GH-22993)

    Add _PyLong_GetZero() and _PyLong_GetOne() functions and a new
    internal pycore_long.h header file.
    
    Python cannot be built without small integer singletons anymore.
    vstinner committed Oct 26, 2020
  2. bpo-42123: Run the parser two times and only enable invalid rules on …

    …the second run (GH-22111)
    
    * Implement running the parser a second time for the errors messages
    
    The first parser run is only responsible for detecting whether
    there is a `SyntaxError` or not. If there isn't the AST gets returned.
    Otherwise, the parser is run a second time with all the `invalid_*`
    rules enabled so that all the customized error messages get produced.
    lysnikolaou committed Oct 26, 2020
  3. bpo-42157: Convert unicodedata.UCD to heap type (GH-22991)

    Convert the unicodedata extension module to the multiphase
    initialization API (PEP 489) and convert the unicodedata.UCD static
    type to a heap type.
    
    Co-Authored-By: Mohamed Koubaa <[email protected]>
    vstinner and koubaa committed Oct 26, 2020
  4. bpo-42157: unicodedata avoids references to UCD_Type (GH-22990)

    * UCD_Check() uses PyModule_Check()
    * Simplify the internal _PyUnicode_Name_CAPI structure:
    
      * Remove size and state members
      * Remove state and self parameters of getcode() and getname()
        functions
    
    * Remove global_module_state
    vstinner committed Oct 26, 2020
  5. bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (GH-22713)

    The private _PyUnicode_Name_CAPI structure of the PyCapsule API
    unicodedata.ucnhash_CAPI moves to the internal C API. Moreover, the
    structure gets a new state member which must be passed to the
    getcode() and getname() functions.
    
    * Move Include/ucnhash.h to Include/internal/pycore_ucnhash.h
    * unicodedata module is now built with Py_BUILD_CORE_MODULE.
    * unicodedata: move hashAPI variable into unicodedata_module_state.
    vstinner committed Oct 26, 2020
  6. bpo-42152: Use PyDict_Contains and PyDict_SetDefault if appropriate. (G…

    …H-22986)
    
    If PyDict_GetItemWithError is only used to check whether the key is in dict,
    it is better to use PyDict_Contains instead.
    
    And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can
    replace the combination.
    serhiy-storchaka committed Oct 26, 2020
  7. bpo-42006: Stop using PyDict_GetItem, PyDict_GetItemString and _PyDic…

    …t_GetItemId. (GH-22648)
    
    These functions are considered not safe because they suppress all internal errors
    and can return wrong result.  PyDict_GetItemString and _PyDict_GetItemId can
    also silence current exception in rare cases.
    
    Remove no longer used _PyDict_GetItemId.
    Add _PyDict_ContainsId and rename _PyDict_Contains into
    _PyDict_Contains_KnownHash.
    serhiy-storchaka committed Oct 26, 2020
  8. Added some makefile generated files to .gitignore (GH-22435)

    Marco-Sulla committed Oct 26, 2020
  9. Add a link to buffer protocol in bytearray() doc (GH-22675)

    awecx committed Oct 26, 2020
  10. bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid o…

    …verflow (GH-22966)
    
    Fix memory leak in subprocess.Popen() in case of uid/gid overflow
    
    Also add a test that would catch this leak with `--huntrleaks`.
    
    Alas, the test for `extra_groups` also exposes an inconsistency
    in our error reporting: we use a custom ValueError for `extra_groups`,
    but propagate OverflowError for `user` and `group`.
    izbyshev committed Oct 26, 2020
Older
You can’t perform that action at this time.