FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make @final introspectable at runtime · Issue #90500 · python/cpython · GitHub

Repository navigation

Make @final introspectable at runtime #90500

Closed

Description

BPO 46342
Nosy @gvanrossum, @JelleZijlstra, @Fidget-Spinner, @AlexWaygood
PRs
  • bpo-46342: make @typing.final introspectable #30530
  • 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/JelleZijlstra'
    closed_at = <Date 2022-01-12.22:05:14.069>
    created_at = <Date 2022-01-11.12:10:25.536>
    labels = ['type-feature', 'library', '3.11']
    title = 'Make @final introspectable at runtime'
    updated_at = <Date 2022-01-12.22:05:14.069>
    user = 'https://github.com/JelleZijlstra'

    bugs.python.org fields:

    activity = <Date 2022-01-12.22:05:14.069>
    actor = 'AlexWaygood'
    assignee = 'JelleZijlstra'
    closed = True
    closed_date = <Date 2022-01-12.22:05:14.069>
    closer = 'AlexWaygood'
    components = ['Library (Lib)']
    creation = <Date 2022-01-11.12:10:25.536>
    creator = 'JelleZijlstra'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46342
    keywords = ['patch']
    message_count = 2.0
    messages = ['410298', '410424']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'JelleZijlstra', 'kj', 'AlexWaygood']
    pr_nums = ['30530']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue46342'
    versions = ['Python 3.11']

    Activity

    1. JelleZijlstra commented on Jan 11, 2022

      MemberAuthor

      Currently, @typing.final is implemented as an identity function, which makes it impossible for type checkers that look at runtime objects to support it.

      I propose that we implement it as something like:

          def final(f):
              try:
                  f.__final__ = True
              except AttributeError:
                  pass  # in case it is used on an object that doesn't support setting attributes
              return f

      I will submit a PR implementing this idea.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      3.11only security fixes
      on Jan 11, 2022
    3. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Jan 11, 2022
    4. gvanrossum commented on Jan 12, 2022

      Member

      New changeset 0bbf30e by Jelle Zijlstra in branch 'main':
      bpo-46342: make @typing.final introspectable (GH-30530)
      0bbf30e

    5. 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 fixesstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL