Skip to content
Permalink
master

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 <skip.montanaro@gmail.com>
    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 <koubaa.m@gmail.com>
    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

Commits on Oct 25, 2020

  1. bpo-42150: Avoid buffer overflow in the new parser (GH-22978)

    pablogsal committed Oct 25, 2020
  2. bpo-42043: Add support for zipfile.Path subclasses (#22716)

    * bpo-42043: Add support for zipfile.Path inheritance as introduced in zipp 3.2.0.
    
    * Add blurb.
    jaraco committed Oct 25, 2020
  3. bpo-41919: Avoid resource leak in test_io (GH-22973)

    Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
    shihai1991 and pablogsal committed Oct 25, 2020
  4. bpo-41490: ``path`` and ``contents`` to aggressively close handles (#…

    …22915)
    
    * bpo-41490: ``path`` method to aggressively close handles
    
    * Add blurb
    
    * In ZipReader.contents, eagerly evaluate the contents to release references to the zipfile.
    
    * Instead use _ensure_sequence to ensure any iterable from a reader is eagerly converted to a list if it's not already a sequence.
    jaraco committed Oct 25, 2020
  5. Second round of updates to the descriptor howto guide (GH-22946)

    rhettinger committed Oct 25, 2020
  6. bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)

    roseman committed Oct 25, 2020
  7. bpo-42127: Document effect of cached_property on key-sharing dictiona…

    …ries (GH-22930)
    rhettinger committed Oct 25, 2020

Commits on Oct 24, 2020

  1. bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)

    roseman committed Oct 24, 2020
  2. bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)

    roseman committed Oct 24, 2020
Older
You can’t perform that action at this time.