Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-125038: Iterator checks are added for some FOR_ITER bytecodes, crash fixed #125051

Closed

Commits on Oct 7, 2024

  1. pythongh-125038: PyIter_Checks are added for some FOR_ITER bytecodes

    SIGSEGV on generators in case of gi_frame.f_locals is fixed.
    This applies to _FOR_ITER bytecode.
    Similar checks are added to _FOR_ITER_TIER_TWO and INSTRUMENTED_FOR_ITER bytecode implementations.
    efimov-mikhail committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    523f765 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e316cb4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    09df328 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d3d5b39 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c353cf1 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. Update Misc/NEWS.d/next/Core_and_Builtins/2024-10-07-19-26-50.gh-issu…

    …e-125038.ffSLCz.rst
    
    
    News improvement
    
    Co-authored-by: Jelle Zijlstra <[email protected]>
    efimov-mikhail and JelleZijlstra authored Oct 8, 2024
    Configuration menu
    Copy the full SHA
    1941ced View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    3e0b12f View commit details
    Browse the repository at this point in the history
  2. Merge branch 'sigsegv_fix_in_iterators' of github.com:efimov-mikhail/…

    …cpython into sigsegv_fix_in_iterators
    efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    25e3a80 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d0fa5ff View commit details
    Browse the repository at this point in the history
  4. pythongh-125072: Add label for assignment expressions; update tracked…

    … section for assignment expression topic (python#125074)
    emilyemorehouse authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    2e541a7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e25977 View commit details
    Browse the repository at this point in the history
  6. pythongh-90102: Remove isatty call during regular open (python#124922)

    Co-authored-by: Victor Stinner <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    c214282 View commit details
    Browse the repository at this point in the history
  7. pythongh-70870: Clarify dual usage of 'free variable' (python#122545)

    The term "free variable" has unfortunately become genuinely
    ambiguous over the years (presumably due to the names of
    some relevant code object instance attributes).
    
    While we can't eliminate that ambiguity at this late date, we can
    at least alert people to the potential ambiguity by describing
    both the formal meaning of the term and the common
    alternative use as a direct synonym for "closure variable".
    
    ---------
    
    Co-authored-by: Carol Willing <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    7788578 View commit details
    Browse the repository at this point in the history
  8. pythongh-69998: Fix decoding error in locale.nl_langinfo() (pythonGH-…

    …124963)
    
    The function now sets temporarily the LC_CTYPE locale to the locale
    of the category that determines the requested value if the locales are
    different and the resulting string is non-ASCII.
    This temporary change affects other threads.
    serhiy-storchaka authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    c0a9b19 View commit details
    Browse the repository at this point in the history
  9. bpo-34206: Improve docs and test coverage for pre-init functions (pyt…

    …hon#8023)
    
    - move the Py_Main documentation from the very high level API section
      to the initialization and finalization section
    - make it clear that it encapsulates a full Py_Initialize/Finalize
      cycle of its own
    - point out that exactly which settings will be read and applied
      correctly when Py_Main is called after a separate runtime
      initialization call is version dependent
    - be explicit that Py_IsInitialized can be called prior to
      initialization
    - actually test that Py_IsInitialized can be called prior to
      initialization
    - flush stdout in the embedding tests that run code so it appears
      in the expected order when running with "-vv"
    - make "-vv" on the subinterpreter embedding tests less spammy
    
    ---------
    
    Co-authored-by: Carol Willing <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    fdf1648 View commit details
    Browse the repository at this point in the history
  10. pythongh-53203: Improve tests for strptime() (pythonGH-125090)

    Run them with different locales and different date and time.
    
    Add the @run_with_locales() decorator to run the test with multiple
    locales.
    
    Improve the run_with_locale() context manager/decorator -- it now
    catches only expected exceptions and reports the test as skipped if no
    appropriate locale is available.
    serhiy-storchaka authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    7c34a23 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0056888 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c4812df View commit details
    Browse the repository at this point in the history
  13. pythongh-90102: Fix pyio _isatty_open_only() (python#125089)

    Spotted by @ngnpope.
    
    `isatty` returns False to indicate the file is not a TTY. The C
    implementation of _io does that (`Py_RETURN_FALSE`) but I got the
    bool backwards in the _pyio implementaiton.
    cmaloney authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    148e3fe View commit details
    Browse the repository at this point in the history
  14. pythongh-75898: make use of thread more explicit in the "Socket Progr…

    …amming HOWTO" document (python#125023)
    zuo authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    753347e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6002315 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8e98322 View commit details
    Browse the repository at this point in the history
  17. pythongh-112433 add versionadded for ctypes.Structure._align_ (pyth…

    …on#125087)
    
    
    Co-authored-by: Kumar Aditya <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    6b6d27f View commit details
    Browse the repository at this point in the history
  18. pythongh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (p…

    …ython#125097)
    
    If the PYTHON_BASIC_REPL environment variable is set, the site module
    no longer imports the _pyrepl module.
    
    Moreover, the site module now respects -E and -I command line
    options: ignore PYTHON_BASIC_REPL in this case.
    vstinner authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b926c8e View commit details
    Browse the repository at this point in the history
  19. pythongh-115999: Stop the world when invalidating function versions (p…

    …ython#124997)
    
    Stop the world when invalidating function versions
    
    The tier1 interpreter specializes `CALL` instructions based on the values
    of certain function attributes (e.g. `__code__`, `__defaults__`). The tier1
    interpreter uses function versions to verify that the attributes of a function
    during execution of a specialization match those seen during specialization.
    A function's version is initialized in `MAKE_FUNCTION` and is invalidated when
    any of the critical function attributes are changed. The tier1 interpreter stores
    the function version in the inline cache during specialization. A guard is used by
    the specialized instruction to verify that the version of the function on the operand
    stack matches the cached version (and therefore has all of the expected attributes).
    It is assumed that once the guard passes, all attributes will remain unchanged
    while executing the rest of the specialized instruction.
    
    Stopping the world when invalidating function versions ensures that all critical
    function attributes will remain unchanged after the function version guard passes
    in free-threaded builds. It's important to note that this is only true if the remainder
    of the specialized instruction does not enter and exit a stop-the-world point.
    
    We will stop the world the first time any of the following function attributes
    are mutated:
    
    - defaults
    - vectorcall
    - kwdefaults
    - closure
    - code
    
    This should happen rarely and only happens once per function, so the performance
    impact on majority of code should be minimal.
    
    Additionally, refactor the API for manipulating function versions to more clearly
    match the stated semantics.
    mpage authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    fc4dc44 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8eec02d View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    bd716e0 View commit details
    Browse the repository at this point in the history
  22. pythongh-125084: Resolve paths in generator common code (pythonGH-125085

    )
    
    In out of tree builds, the paths can contain `../ which needs to be
    resolved for the relative path calculation to work.
    cmaloney authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b2764a9 View commit details
    Browse the repository at this point in the history
  23. pythongh-125063: Emit slices as constants in the bytecode compiler (p…

    …ython#125064)
    
    * Make slices marshallable
    
    * Emit slices as constants
    
    * Update Python/marshal.c
    
    Co-authored-by: Peter Bierma <[email protected]>
    
    * Refactor codegen_slice into two functions so it
    always has the same net effect
    
    * Fix for free-threaded builds
    
    * Simplify marshal loading of slices
    
    * Only return SUCCESS/ERROR from codegen_slice
    
    ---------
    
    Co-authored-by: Mark Shannon <[email protected]>
    Co-authored-by: Peter Bierma <[email protected]>
    3 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    320d1ab View commit details
    Browse the repository at this point in the history
  24. pythongh-124832: Add a note to indicate that datetime.now may retur…

    …n the same instant (python#124834)
    
    * Update datetime.rst
    
    * Update datetime.rst
    
    replace warning with note
    
    * Update Doc/library/datetime.rst
    
    Co-authored-by: Victor Stinner <[email protected]>
    
    * Update Doc/library/datetime.rst
    
    Co-authored-by: Bénédikt Tran <[email protected]>
    
    ---------
    
    Co-authored-by: Victor Stinner <[email protected]>
    Co-authored-by: Bénédikt Tran <[email protected]>
    3 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    bbe670b View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    7a4b55c View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    3b823fd View commit details
    Browse the repository at this point in the history
  27. pythonGH-124478: Cleanup argparse documentation (python#124877)

    Co-authored-by: Jelle Zijlstra <[email protected]>
    Co-authored-by: Tomas R <[email protected]>
    3 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0dcbd9b View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    5f4da9b View commit details
    Browse the repository at this point in the history
  29. pythongh-124612: Use ghcr.io/python/autoconf instead of public image (p…

    …ython#124657)
    
    * pythongh-124612: Use ghcr.io/python/autoconf instead of public image
    
    * Update
    corona10 authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    7c10a29 View commit details
    Browse the repository at this point in the history
  30. pythongh-101552: Allow pydoc to display signatures in source format (p…

    …ython#124669)
    
    Co-authored-by: Alex Waygood <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    8192c63 View commit details
    Browse the repository at this point in the history
  31. docs: in venv table use executable name (pythonGH-124315)

    Co-authored-by: musvaage <[email protected]>
    2 people authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    6996d4e View commit details
    Browse the repository at this point in the history
  32. pythongh-124502: Remove _PyUnicode_EQ() function (python#125114)

    * Replace unicode_compare_eq() with unicode_eq().
    * Use unicode_eq() in setobject.c.
    * Replace _PyUnicode_EQ() with _PyUnicode_Equal().
    * Remove unicode_compare_eq() and _PyUnicode_EQ().
    vstinner authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0d0e6f3 View commit details
    Browse the repository at this point in the history
  33. pythongh-125150: Skip test_fma_zero_result on NetBSD due to IEE 754-2…

    …008 implementation issues (python#125151)
    
    Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
    furkanonder authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    376a1d7 View commit details
    Browse the repository at this point in the history
  34. pythongh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (pythonGH-…

    …124974)
    
    Now it returns a tuple of up to 100 strings (an empty tuple on most locales).
    Previously it returned the first item of that tuple or an empty string.
    serhiy-storchaka authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    fbb424b View commit details
    Browse the repository at this point in the history
  35. pythongh-107562: make_ssl_certs.py: produce test certificates that ex…

    …pire far in the future by default (pythonGH-107594)
    
    This allows testing Y2038 with system time set to after that,
    so that actual Y2038 issues can be exposed, and not masked
    by expired certificate errors.
    
    Signed-off-by: Alexander Kanavin <[email protected]>
    kanavin authored and efimov-mikhail committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    2c98a00 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    8da7ac6 View commit details
    Browse the repository at this point in the history