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-97696 Add documentation for get_coro() behavior with eager tasks #104189

Closed
wants to merge 62 commits into from

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    5c30058 View commit details
    Browse the repository at this point in the history
  2. Update asyncio-task.rst

    jbower-fb authored May 5, 2023
    Configuration menu
    Copy the full SHA
    248b78b View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    3205457 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4126669 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    992dead View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be60d71 View commit details
    Browse the repository at this point in the history
  5. pythongh-68395: Avoid naming conflicts by mangling variable names in …

    …Argument Clinic (python#104065)
    
    Add all internally used variable names to CLINIC_PREFIXED_ARGS.
    erlend-aasland authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    582fe9a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    78dc058 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d3192a2 View commit details
    Browse the repository at this point in the history
  8. pythonGH-96803: Add three C-API functions to make _PyInterpreterFrame…

    … less opaque for users of PEP 523. (pythonGH-96849)
    markshannon authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    5405b60 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    21fb990 View commit details
    Browse the repository at this point in the history
  10. pythongh-69152: Add _proxy_response_headers attribute to HTTPConnecti…

    …on (python#26152)
    
    Add _proxy_response_headers attribute to HTTPConnection (python#26152)
    
    ---------
    
    Co-authored-by: Senthil Kumaran <senthil@python.org>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ef989ab View commit details
    Browse the repository at this point in the history
  11. pythonGH-100479: Add pathlib.PurePath.with_segments() (pythonGH-103975

    )
    
    Add `pathlib.PurePath.with_segments()`, which creates a path object from arguments. This method is called whenever a derivative path is created, such as from `pathlib.PurePath.parent`. Subclasses may override this method to share information between path objects.
    
    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    0b62e96 View commit details
    Browse the repository at this point in the history
  12. pythongh-99113: Share the GIL via PyInterpreterState.ceval.gil (pytho…

    …ngh-104203)
    
    In preparation for a per-interpreter GIL, we add PyInterpreterState.ceval.gil, set it to the shared GIL for each interpreter, and use that rather than using _PyRuntime.ceval.gil directly.  Note that _PyRuntime.ceval.gil is still the actual GIL.
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    0826f80 View commit details
    Browse the repository at this point in the history
  13. pythongh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (

    …pythongh-104148)
    
    I'll be adding a value to indicate support for per-interpreter GIL in pythongh-99114.
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    efc84cd View commit details
    Browse the repository at this point in the history
  14. pythongh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (pythongh-10…

    …4205)
    
    Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules.  We will start checking for it in pythongh-104206 (once PyInterpreterState.ceval.own_gil is added in pythongh-104204).
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    7192a46 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c205faa View commit details
    Browse the repository at this point in the history
  16. pythongh-99113: Add PyInterpreterConfig.own_gil (pythongh-104204)

    We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL.
    
    Note that for now we don't actually respect own_gil; all interpreters still share the one GIL.  However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil.  That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b057233 View commit details
    Browse the repository at this point in the history
  17. pythongh-104144: Skip scheduling a done callback if a TaskGroup task …

    …completes eagerly (python#104140)
    
    Co-authored-by: Carl Meyer <carl@oddbird.net>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    0b9d0b2 View commit details
    Browse the repository at this point in the history
  18. pythongh-97696: Remove redundant #include (python#104216)

    Remove "#include cpython/context.h"` from `_asynciomodule.c`.
    
    It's already included in `Python.h`.
    jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8df75f2 View commit details
    Browse the repository at this point in the history
  19. pythongh-101819: Prepare to modernize the _io extension (python#104178)

    * Add references to static types to _PyIO_State:
    
      * PyBufferedIOBase_Type
      * PyBytesIOBuffer_Type
      * PyIncrementalNewlineDecoder_Type
      * PyRawIOBase_Type
      * PyTextIOBase_Type
    
    * Add the defining class to methods:
    
      * _io.BytesIO.getbuffer()
      * _io.FileIO.close()
    
    * Add get_io_state_by_cls() function.
    * Add state parameter to _textiowrapper_decode()
    * _io_TextIOWrapper___init__() now sets self->state before calling
      _textiowrapper_set_decoder().
    
    Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    88482c7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    810e47b View commit details
    Browse the repository at this point in the history
  21. pythonGH-97950: Use new-style index directive ('builtin') (python#104164

    )
    
    * Uncomment builtin removal in pairindextypes
    
    * Use new-style index directive ('builtin') - C API
    
    * Use new-style index directive ('builtin') - Extending
    
    * Use new-style index directive ('builtin') - Library
    
    * Use new-style index directive ('builtin') - Reference
    
    * Use new-style index directive ('builtin') - Tutorial
    AA-Turner authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    cf8ee0b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    b2c254d View commit details
    Browse the repository at this point in the history
  23. pythongh-65772: Clean-up turtle module (python#104218)

    * Remove the unused, private, and undocumented name `_ver` and
    the commented-out `print` call.
    
    * Don't add math functions to `__all__`.  Beginners should learn
    to `import math` to access them.
    
    * Gregor Lindel, who wrote this version of turtle, dropped plans
    to implement turtle on another toolkit at least a decade ago.
    Drop `_dot` code preparing for this, but add a hint comment.
    
    * `_Screen` is meant to be a singleton class.  To enforce that,
    it needs either a `__new__` that returns the singleton or
    `else...raise` in `__iter__`.  Merely removing the `if` clauses
    as suggested might break something if a user were to call `_Screen`
    directly.  Leave the code alone until a problem is evident.
    
    * Turtledemo injects into _Screen both _root and _canvas,
    configured as it needs them to be.  Making _canvas an `__init__`
    option would require skipping some but not all of the lines under
    'if _Screen._canvas is None:`.  Leave working code alone.
    terryjreedy authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    6ab9a42 View commit details
    Browse the repository at this point in the history
  24. Rewrite the turtledemo makeGraphFrame method (python#104224)

    Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
    with `self.canvas, which is accessed in other methods.
    Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
    Add a comment explaining the unorthodox use of
    function turtle.Screen and singleton class turtle._Screen.
    terryjreedy authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b4f3496 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    cb70222 View commit details
    Browse the repository at this point in the history
  26. pythongh-90953: Emit deprecation warnings for ast features deprecat…

    …ed in Python 3.8 (python#104199)
    
    `ast.Num`, `ast.Str`, `ast.Bytes`, `ast.Ellipsis` and `ast.NameConstant` now all emit deprecation warnings on import, access, instantation or `isinstance()` checks.
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    1173ce2 View commit details
    Browse the repository at this point in the history
  27. pythonGH-103548: Improve performance of pathlib.Path.[is_]absolute() (

    pythonGH-103549)
    
    Improve performance of `pathlib.Path.absolute()` and `cwd()` by joining paths only when necessary. Also improve
    performance of `PurePath.is_absolute()` on Posix by skipping path parsing and normalization.
    barneygale authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    a719df1 View commit details
    Browse the repository at this point in the history
  28. pythongh-101819: Remove unused 'locale_module' from _io state (python…

    …#104246)
    
    The locale module reference was introduced by 932ff83 in 2013,
    and rendered unused by 710e826 (pythongh-23050) in 2020.
    erlend-aasland authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    060a31e View commit details
    Browse the repository at this point in the history
  29. pythongh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (p…

    …ythongh-104206)
    
    Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in pythongh-104205.
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    fc1e63f View commit details
    Browse the repository at this point in the history
  30. pythongh-99113: Make Sure the GIL is Acquired at the Right Places (py…

    …thongh-104208)
    
    This is a pre-requisite for a per-interpreter GIL.  Without it this change isn't strictly necessary.  However, there is no real downside otherwise.
    ericsnowcurrently authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    74d38ea View commit details
    Browse the repository at this point in the history
  31. pythongh-101640: Make argparse _print_message catch any write error (p…

    …ython#101802)
    
    * In particular, don't exit when trying to print to stderr = None.
    * Add tests
    
    Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    de9f9dd View commit details
    Browse the repository at this point in the history
  32. pythongh-104254: Document the optional keyword-only "context" argumen…

    …t to Task constructor (python#104251)
    
    (This was added in 3.11. It was already documented for `create_task()`, but not for `Task()`.)
    itamaro authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    fe13226 View commit details
    Browse the repository at this point in the history
  33. pythongh-103886: Improve builtins.__doc__ (python#104179)

    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    33e8bdb View commit details
    Browse the repository at this point in the history
  34. pythongh-97696: Use PyObject_CallMethodNoArgs and inline is_loop_ru…

    …nning check in `_asyncio` (python#104255)
    itamaro authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    44b081d View commit details
    Browse the repository at this point in the history
  35. pythongh-104018: remove unused format "z" handling in string formatfl…

    …oat() (python#104107)
    
    This is a cleanup overlooked in PR python#104033.
    belm0 authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    06707b9 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    7e11146 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    c66f1b6 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    e63898e View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    18babf4 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    b61f7d2 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    f06a11c View commit details
    Browse the repository at this point in the history
  42. pythongh-103193: cache calls to inspect._shadowed_dict in `inspect.…

    …getattr_static` (python#104267)
    
    Co-authored-by: Carl Meyer <carl@oddbird.net>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    86ca8d2 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    c195a2c View commit details
    Browse the repository at this point in the history
  44. pythonGH-89812: Churn pathlib.Path methods (pythonGH-104243)

    Re-arrange `pathlib.Path` methods in source code. No other changes.
    
    The methods are arranged as follows:
    
    1. `stat()` and dependants (`exists()`, `is_dir()`, etc)
    2. `open()` and dependants (`read_text()`, `write_bytes()`, etc)
    3. `iterdir()` and dependants (`glob()`, `walk()`, etc)
    4. All other `Path` methods
    
    This patch prepares the ground for a new `_AbstractPath` class, which will
    support the methods in groups 1, 2 and 3 above. By churning the methods
    here, subsequent patches will be easier to review and less likely to break
    things.
    barneygale authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    3145c0f View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    44914e0 View commit details
    Browse the repository at this point in the history
  46. pythonGH-102613: Improve performance of pathlib.Path.rglob() (pytho…

    …nGH-104244)
    
    Stop de-duplicating results in `_RecursiveWildcardSelector`. A new
    `_DoubleRecursiveWildcardSelector` class is introduced which performs
    de-duplication, but this is used _only_ for patterns with multiple
    non-adjacent `**` segments, such as `path.glob('**/foo/**')`. By avoiding
    the use of a set, `PurePath.__hash__()` is not called, and so paths do not
    need to be stringified and case-normalised.
    
    Also merge adjacent '**' segments in patterns.
    barneygale authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    f6943eb View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    8e76e2d View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    67b4b55 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    52539f0 View commit details
    Browse the repository at this point in the history
  50. pythongh-99108: Replace SHA3 implementation HACL* version (python#103597

    )
    
    Replaces our built-in SHA3 implementation with a verified one from the HACL* project.
    
    This implementation is used when OpenSSL does not provide SHA3 or is not present.
    
    3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project.
    
    ---------
    
    Co-authored-by: Gregory P. Smith <greg@krypto.org>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    82a37a4 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    2745006 View commit details
    Browse the repository at this point in the history
  52. pythongh-102500: Remove mention of bytes shorthand (python#104281)

    The bytes shorthand was removed in PEP 688:
    https://peps.python.org/pep-0688/#no-special-meaning-for-bytes
    
    I also remove the reference to `collections.abc.ByteString`, since that
    object is deprecated (python#91896) and has different semantics (python#102092)
    hauntsaninja authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    013469f View commit details
    Browse the repository at this point in the history
  53. Trim trailing whitespace and test on CI (python#104275)

    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ffa4d19 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    7714382 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    a7e9a63 View commit details
    Browse the repository at this point in the history
  56. pythongh-99108: fix typo in Modules/Setup (python#104293)

    case sensitive filename
    msprotz authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    82bc549 View commit details
    Browse the repository at this point in the history
  57. pythongh-104223: Fix issues with inheriting from buffer classes (pyth…

    …on#104227)
    
    Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
    2 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b28c5f2 View commit details
    Browse the repository at this point in the history
  58. pythongh-89550: Buffer GzipFile.write to reduce execution time by ~15% (

    python#101251)
    
    Use `io.BufferedWriter` to buffer gzip writes.
    
    ---------
    
    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    Co-authored-by: Gregory P. Smith <greg@krypto.org>
    3 people authored and jbower-fb committed May 8, 2023
    Configuration menu
    Copy the full SHA
    a49c8a8 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    b8116d8 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    9a51482 View commit details
    Browse the repository at this point in the history