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 — Add `__orig_bases__` to non-generic TypedDict · Issue #103699 · python/cpython

Add __orig_bases__ to non-generic TypedDict #103699

New issue
Copy link
New issue
Copy link
Closed
Closed
Add __orig_bases__ to non-generic TypedDict#103699
Copy link
Labels
3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancementA feature request or enhancement

Description

@adriangb
adriangb
opened on Apr 22, 2023
Issue body actions

Feature or enhancement

As discussed at the typing summit, non generic TypedDict's completely loose all inheritance information. Funny enough, generic TypedDict's actually preserve it via __orig_bases__ because Generic does that. So this just brings non-generic TypedDicts to be the same.

Pitch

This is very useful for runtime type checkers, and as per above the attribute already exists for generic TypedDicts

Previous discussion

Discussed at PyCon 2023 typing summit, this was an uncontroversial yes at the time.

Linked PRs

  • GH-103699: Add __orig_bases__ to various typing classes #103698

Activity

  1. adriangb
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 22, 2023
  2. AlexWaygood
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    topic-typing
    3.12only security fixesonly security fixes
    on Apr 22, 2023
  3. AlexWaygood
    added a commit that references this issue on Apr 23, 2023

    GH-103699: Add `__orig_bases__` to various typing classes (#103698)

    0056701
  4. AlexWaygood
    closed this as completedon Apr 23, 2023
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.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      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.