GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Enum] update __contains__ to return True for valid values · Issue #88123 · python/cpython

[Enum] update __contains__ to return True for valid values #88123

New issue
Copy link
New issue
Copy link
Closed
Closed
[Enum] update __contains__ to return True for valid values#88123
Copy link
Assignees
ethanfurman
Labels
3.12only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@ethanfurman
ethanfurman
opened on Apr 27, 2021
Issue body actions
BPO 43957
Nosy @ethanfurman, @pablogsal
PRs
  • bpo-43957: [Enum] deprecate TypeError from containment checks #25670
  • bpo-43957: Add a missing space to the new format enum warning #25770
  • 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/ethanfurman'
    closed_at = <Date 2021-05-01.20:39:22.594>
    created_at = <Date 2021-04-27.19:11:08.744>
    labels = ['type-bug', '3.10']
    title = '[Enum] update __contains__ to return True for valid values'
    updated_at = <Date 2021-05-01.20:39:22.594>
    user = 'https://github.com/ethanfurman'

    bugs.python.org fields:

    activity = <Date 2021-05-01.20:39:22.594>
    actor = 'ethan.furman'
    assignee = 'ethan.furman'
    closed = True
    closed_date = <Date 2021-05-01.20:39:22.594>
    closer = 'ethan.furman'
    components = []
    creation = <Date 2021-04-27.19:11:08.744>
    creator = 'ethan.furman'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43957
    keywords = ['patch']
    message_count = 4.0
    messages = ['392122', '392127', '392622', '392633']
    nosy_count = 2.0
    nosy_names = ['ethan.furman', 'pablogsal']
    pr_nums = ['25670', '25770']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43957'
    versions = ['Python 3.10']

    Activity

    Next
    1. ethanfurman commented on Apr 27, 2021

      @ethanfurman
      ethanfurman
      on Apr 27, 2021
      MemberAuthor
      More actions

      In 3.12 __contains__ will check for both members and values:

      Color.RED in Color  --> True
      1 in Color          --> True
      'RED' in Color      --> False
      

      Add DeprecationWarning for now.

    2. ethanfurman
      added
      3.10 (EOL)end of lifeend of life
      on Apr 27, 2021
    3. ethanfurman
      self-assigned this
      on Apr 27, 2021
    4. ethanfurman
      added
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      3.10 (EOL)end of lifeend of life
      on Apr 27, 2021
    5. ethanfurman
      self-assigned this
      on Apr 27, 2021
    6. ethanfurman
      added
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Apr 27, 2021
    7. ethanfurman commented on Apr 27, 2021

      @ethanfurman
      ethanfurman
      on Apr 27, 2021
      MemberAuthor
      More actions

      New changeset 6bd9288 by Ethan Furman in branch 'master':
      bpo-43957: [Enum] Deprecate TypeError from containment checks. (GH-25670)
      6bd9288

    8. pablogsal commented on May 1, 2021

      @pablogsal
      pablogsal
      on May 1, 2021
      Member
      More actions

      New changeset 9a42d50 by Pablo Galindo in branch 'master':
      bpo-43957: Add a missins space to the new format enum warning (bpo-25770)
      9a42d50

    9. pablogsal commented on May 1, 2021

      @pablogsal
      pablogsal
      on May 1, 2021
      Member
      More actions

      Ethan can we close this issue?

    10. ethanfurman
      closed this as completedon May 1, 2021
    11. ethanfurman
      closed this as completedon May 1, 2021
    12. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    13. corona10
      reopened this on May 17, 2022
    14. corona10 commented on May 17, 2022

      @corona10
      corona10
      on May 17, 2022
      Member
      More actions

      @ethanfurman __contains__ should be updated before Python 3.12 is released.
      I add this issue as a release blocker since tests are broken.
      cc @pablogsal

    15. 1 remaining item

    16. corona10
      added
      3.12only security fixesonly security fixes
      and removed
      3.10 (EOL)end of lifeend of life
      on May 17, 2022
    17. carlbordum commented on May 27, 2022

      @carlbordum
      carlbordum
      on May 27, 2022
      Contributor
      More actions

      I have attempted to implement the new behaviour here #93298

    18. ethanfurman
      added 2 commits that reference this issue on Jun 22, 2022

      pythongh-88123: Implement new Enum __contains__

      650b70a

      gh-88123: Implement new Enum __contains__ (GH-93298)

      9a479c3
    19. serhiy-storchaka
      added a commit that references this issue on Jun 26, 2022

      Revert 30935 defer bpo45162 to 312 (#94285)

      1ffde3e
    20. ezio-melotti
      added this to Release and Deferred blockers 🚫on Jun 30, 2022
    21. ethanfurman
      closed this as completedon Nov 14, 2022
    22. ethanfurman
      moved this to Done in Release and Deferred blockers 🚫on Nov 14, 2022
    23. apocalyptech
      added a commit that references this issue on May 31, 2024

      Don't rely on Python 3.12+ enum `__contains__`

      3e9dbce
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @ethanfurman
      ethanfurman

    Labels

    3.12only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Release and Deferred blockers 🚫
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.