← 输入框|github.com|刷新
Skip to content

Add a new bytecode instruction to create generators #90567

Closed

Description

@markshannon
BPO 46409
Nosy @markshannon, @sobolevn
PRs
  • bpo-46409: Make generators in bytecode #30633
  • bpo-46470: remove unused branch from typing._remove_dups_flatten #30780
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/markshannon'
    closed_at = <Date 2022-01-20.11:49:42.702>
    created_at = <Date 2022-01-17.11:54:35.954>
    labels = ['interpreter-core', 'type-bug', '3.11']
    title = 'Add a new bytecode instruction to create generators'
    updated_at = <Date 2022-01-22.20:19:21.483>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2022-01-22.20:19:21.483>
    actor = 'sobolevn'
    assignee = 'Mark.Shannon'
    closed = True
    closed_date = <Date 2022-01-20.11:49:42.702>
    closer = 'Mark.Shannon'
    components = ['Interpreter Core']
    creation = <Date 2022-01-17.11:54:35.954>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46409
    keywords = ['patch']
    message_count = 2.0
    messages = ['410764', '411018']
    nosy_count = 2.0
    nosy_names = ['Mark.Shannon', 'sobolevn']
    pr_nums = ['30633', '30780']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46409'
    versions = ['Python 3.11']

    Activity

    1. markshannon commented on Jan 17, 2022

      @markshannon
      MemberAuthor

      (including coroutines, and async generators)

      We now make the start and resumption of Python functions explicit in the bytecode which allows us to initialize frames in the bytecode without exposing incomplete frames tracing, the GC etc.
      However, we still expose incomplete frames when creating generators.

      By making the creation of generators explicit in the bytecode we first create the frame, then the generator and all is well.

      See https://bugs.python.org/issue46374 and https://bugs.python.org/issue46389 for examples.

    2. self-assigned this
      on Jan 17, 2022
    3. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      3.11only security fixes
      on Jan 17, 2022
    4. self-assigned this
      on Jan 17, 2022
    5. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Jan 17, 2022
    6. markshannon commented on Jan 20, 2022

      @markshannon
      MemberAuthor

      New changeset b04dfbb by Mark Shannon in branch 'main':
      bpo-46409: Make generators in bytecode (GH-30633)
      b04dfbb

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions