Skip to content

Indexing the union type can return NotImplemented #88799

Closed

Description

@serhiy-storchaka
BPO 44633
Nosy @gvanrossum, @serhiy-storchaka, @miss-islington, @uriyyo, @Fidget-Spinner
PRs
  • bpo-44633: Fix parameter substitution of the union type with wrong types. #27218
  • [3.10] bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218) #27224
  • Dependencies
  • bpo-44632: Union with TypeVar does not work as intended
  • 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 = None
    closed_at = <Date 2021-07-18.13:01:37.955>
    created_at = <Date 2021-07-14.05:42:46.707>
    labels = ['interpreter-core', 'type-bug', '3.10', '3.11']
    title = 'Indexing the union type can return NotImplemented'
    updated_at = <Date 2021-07-18.13:01:37.954>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-07-18.13:01:37.954>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-07-18.13:01:37.955>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2021-07-14.05:42:46.707>
    creator = 'serhiy.storchaka'
    dependencies = ['44632']
    files = []
    hgrepos = []
    issue_num = 44633
    keywords = ['patch']
    message_count = 4.0
    messages = ['397468', '397625', '397744', '397746']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'serhiy.storchaka', 'miss-islington', 'uriyyo', 'kj']
    pr_nums = ['27218', '27224']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44633'
    versions = ['Python 3.10', 'Python 3.11']

    Activity

    1. serhiy-storchaka commented on Jul 14, 2021

      @serhiy-storchaka
      MemberAuthor
      >>> import typing
      >>> (int | typing.T)[1]
      NotImplemented

      It is related to bpo-44632.

    2. added
      3.11only security fixes
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Jul 14, 2021
    3. serhiy-storchaka commented on Jul 16, 2021

      @serhiy-storchaka
      MemberAuthor

      Expected raising a TypeError.

    4. serhiy-storchaka commented on Jul 18, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset 3ea5332 by Serhiy Storchaka in branch 'main':
      bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218)
      3ea5332

    5. serhiy-storchaka commented on Jul 18, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset 85b5829 by Miss Islington (bot) in branch '3.10':
      bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218) (GH-27224)
      85b5829

    6. 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

    No one assigned

      Labels

      3.10 (EOL)end of life3.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