Skip to content
Permalink
main

Commits on Apr 8, 2022

  1. bpo-47260: Fix os.closerange() potentially being a no-op in a seccomp…

    … sandbox (GH-32418)
    
    _Py_closerange() currently assumes that close_range() closes
    all file descriptors even if it returns an error (other than ENOSYS).
    This assumption can be wrong on Linux if a seccomp sandbox denies
    the underlying syscall, pretending that it returns EPERM or EACCES.
    In this case _Py_closerange() won't close any descriptors at all,
    which in the worst case can be a security issue.
    
    Fix this by falling back to other methods in case of any close_range()
    error. Note that fallbacks will not be triggered on any problems with
    closing individual file descriptors because close_range() is documented
    to ignore such errors on both Linux[1] and FreeBSD[2].
    
    [1] https://man7.org/linux/man-pages/man2/close_range.2.html
    [2] https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2
    izbyshev committed Apr 8, 2022

Commits on Apr 7, 2022

  1. bpo-47250: Fix refleak from object.__getstate__() (GH-32403)

    Co-authored-by: Brandt Bucher <brandt@python.org>
    corona10 and brandtbucher committed Apr 7, 2022
  2. Doc: Fix spurious comma in the author metadata field (GH-32386)

    Signed-off-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
    CAM-Gerlach committed Apr 7, 2022
  3. ssl docs: Fix typo (GH-32336)

    fmoor committed Apr 7, 2022
  4. bpo-40280: Detect missing threading on WASM platforms (GH-32352)

    Co-authored-by: Brett Cannon <brett@python.org>
    tiran and brettcannon committed Apr 7, 2022
  5. pickle docs: Fix typos and improve wording (GH-24776)

    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    maggyero and JelleZijlstra committed Apr 7, 2022
  6. doc: Link to string.capwords from str.title (GH-20913)

    Since `title()` mentions its own short-comings, it should also mention the library function which does not possess them.
    
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    eric-wieser and JelleZijlstra committed Apr 7, 2022
  7. ssl docs: Fix typo (GH-32314)

    fmoor committed Apr 7, 2022
  8. pkgutil docs: Link sys constants, add backticks (GH-32356)

    Co-authored-by: Éric <merwok@netwok.org>
    verhovsky and merwok committed Apr 7, 2022
  9. bpo-35134: Remove the Include/code.h header file (GH-32385)

    Remove the Include/code.h header file. C extensions should only
    include the main <Python.h> header file.
    
    Python.h includes directly Include/cpython/code.h instead.
    vstinner committed Apr 7, 2022

Commits on Apr 6, 2022

  1. bpo-35134: Add Include/cpython/complexobject.h header (GH-32383)

    Move the private _PyComplex_FormatAdvancedWriter() function to the
    internal C API. This function is no longer exported.
    vstinner committed Apr 6, 2022
  2. bpo-46576: Speed up test_peg_generator by using a static library for …

    …shared sources (GH-32338)
    
    Speed up test_peg_generator by using a static library for shared sources to avoid recompiling as much code.
    jkloth committed Apr 6, 2022
  3. bpo-26579: Add object.__getstate__(). (GH-2821)

    Copying and pickling instances of subclasses of builtin types
    bytearray, set, frozenset, collections.OrderedDict, collections.deque,
    weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes
    implemented as slots.
    serhiy-storchaka committed Apr 6, 2022
  4. bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)

    They were undocumented and never working.
    serhiy-storchaka committed Apr 6, 2022
  5. bpo-47235: Note where a typo is intentional in code. (GH-32348)

    People keep popping up reporting these as typos in the docs despite
    being described as typos in the surrounding text.  Hopefully a comment
    on the line itself makes it more obvious?
    
    Arguably some of the typo examples are not using the "right" typo as the
    "assret" one in particular is now detected by default due to how common
    it was in actual code.  But I don't want to to typo chasing by changing
    these examples to be other not yet auto-detected typos as they still
    illustrate the point well enough.
    gpshead committed Apr 6, 2022
  6. bpo-47115: Document which parts of structs are in limited API/stable …

    …ABI (GH-32196)
    
    
    Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
    encukou and erlend-aasland committed Apr 6, 2022
Older