Skip to content
Permalink
main
Switch branches/tags

Commits on Jul 26, 2022

  1. gh-95235: Add explicit parameter list to some sqlite3 methods (#95240)

    Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
    erlend-aasland and CAM-Gerlach committed Jul 26, 2022
  2. gh-95041: Fix several minor issues in syslog.openlog() (GH-95058)

    * syslog_get_argv() swallows exceptions, but not in all cases.
    * if ident is non UTF-8 encodable, syslog.openlog() fails after setting the
      global reference to ident. Now the C string saved internally in the previous
      call to openlog() points to the freed memory.
    * PySys_Audit() can crash if ident is NULL.
    * There may be a race condition with syslog.syslog(), because the global
      reference to ident is decrefed before setting the new value.
    * Possible use of freed memory if syslog.openlog() is called while
      the GIL is released in syslog.syslog().
    serhiy-storchaka committed Jul 26, 2022
  3. gh-91247: Use memcpy for list and tuple repeat (#91482)

    * Add _Py_memory_repeat function to pycore_list
    
    * Add _Py_RefcntAdd function to pycore_object
    
    * Use the new functions in tuplerepeat, list_repeat, and list_inplace_repeat
    eendebakpt committed Jul 26, 2022

Commits on Jul 25, 2022

  1. gh-94673: Always Finalize Static Builtin Types (#95153)

    Static builtin types are finalized by calling _PyStaticType_Dealloc().  Before this change, we were skipping finalizing such a type if it still had subtypes (i.e. its tp_subclasses hadn't been cleared yet).  The problem is that types hold several heap objects, which leak if we skip the type's finalization.  This change addresses that.
    
    For context, there's an old comment (from e9e3eab) that says the following:
    
       // If a type still has subtypes, it cannot be deallocated.
       // A subtype can inherit attributes and methods of its parent type,
       // and a type must no longer be used once it's deallocated.
    
    However, it isn't clear that is actually still true.  Clearing tp_dict should mean it isn't a problem.
    
    Furthermore, the only subtypes that might still be around come from extension modules that didn't clean them up when unloaded (i.e. extensions that do not implement multi-phase initialization, AKA PEP 489).  Those objects are already leaking, so this change doesn't change anything in that regard.  Instead, this change means more objects gets cleaned up that before.
    ericsnowcurrently committed Jul 25, 2022
  2. gh-94673: Add _PyStaticType_InitBuiltin() (#95152)

    This is the first of several precursors to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.
    
    We do the following:
    
    * add `_PyStaticType_InitBuiltin()`
    * add `_Py_TPFLAGS_STATIC_BUILTIN`
    * set it on all static builtin types in `_PyStaticType_InitBuiltin()`
    * shuffle some code around to be able to use _PyStaticType_InitBuiltin()
        * rename `_PyStructSequence_InitType()` to `_PyStructSequence_InitBuiltinWithFlags()`
        * add `_PyStructSequence_InitBuiltin()`.
    ericsnowcurrently committed Jul 25, 2022
  3. gh-92546: Move pprint benchmark into pyperformance (GH-94613)

    This PR couples with python/pyperformance#222 and supersedes #92560. Inspired by #93096 (comment).
    
    Automerge-Triggered-By: GH:ericsnowcurrently
    arhadthedev committed Jul 25, 2022
  4. gh-95077: [Enum] add code-based deprecation warnings for member.membe…

    …r access (GH-95083)
    
    * issue deprecation warning for member.member access
    * always store member property in current class
    * remove __getattr__
    ethanfurman committed Jul 25, 2022
  5. gh-95235: Document undocumented parameters in sqlite3 functions and m…

    …ethods (#95236)
    
    Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
    erlend-aasland and CAM-Gerlach committed Jul 25, 2022
  6. gh-93610: Improve docs for importlib.resources (#93611)

    Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    Co-authored-by: Łukasz Langa <lukasz@langa.pl>
    4 people committed Jul 25, 2022
  7. gh-85454: Remove distutils documentation (#95239)

    Most places now refer to setuptools or link to setuptools documentation.
    Some examples like zipapp need to be updated later.
    tiran committed Jul 25, 2022
  8. gh-95205: Improve wasm README (#95206)

    Co-authored-by: Christian Heimes <christian@python.org>
    erlend-aasland and tiran committed Jul 25, 2022
  9. gh-95087: Fix IndexError in parsing invalid date in the email module (G…

    …H-95201)
    
    Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
    serhiy-storchaka and wbolster committed Jul 25, 2022
  10. gh-95218: Move tests for importlib.resources into test_importlib.reso…

    …urces. (#95219)
    
    * gh-95218: Move tests for importlib.resources into test_importlib.resources.
    
    * Also update makefile
    
    * Include test_importlib/resources in code ownership rule.
    jaraco committed Jul 25, 2022

Commits on Jul 24, 2022

  1. gh-95051: ensure that timeouts scheduled with asyncio.Timeout that …

    …have already expired are deliverered promptly (#95109)
    
    Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
    graingert and kumaraditya303 committed Jul 24, 2022
  2. gh-95185: Check recursion depth in the AST constructor (#95186)

    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    pablogsal and serhiy-storchaka committed Jul 24, 2022
  3. gh-95194: upgrade bundled pip to 22.2 (gh-95195)

    upgrade bundled pip to 22.2
    sbidoul committed Jul 24, 2022
Older