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 — Document `NewType.__supertype__` · Issue #104874 · python/cpython

Document NewType.__supertype__ #104874

New issue
Copy link
New issue
Copy link
Closed
#104875
Closed
Document NewType.__supertype__#104874
#104875
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-typing

Description

@JelleZijlstra
JelleZijlstra
opened on May 24, 2023
Issue body actions

typing.NewType has always had an attribute __supertype__ pointing to its supertype. It is widely used in the wild (e.g. https://github.com/pydantic/pydantic/blob/00158878cb1c6218cd58ee62248db56c65e4172c/pydantic/_internal/_typing_extra.py#L153, https://github.com/quora/pyanalyze/blob/bd7f520adc2d8b098be657dfa514d1433bea3b0c/pyanalyze/annotations.py#L456), but not documented. Let's document it and commit to leaving it stable.

Linked PRs

  • gh-104874: Document NewType.__supertype__ #104875
  • [3.12] gh-104874: Document NewType.__supertype__ (GH-104875) #104906
  • [3.11] gh-104874: Document NewType.__supertype__ (GH-104875) #104907
Reacted by Alex Waygood

Activity

  1. JelleZijlstra
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    topic-typing
    on May 24, 2023
  2. AlexWaygood
    closed this as completedin #104875on May 24, 2023
  3. AlexWaygood
    added a commit that references this issue on May 24, 2023

    gh-104874: Document NewType.__supertype__ (#104875)

    41768a2
  4. miss-islington
    added 2 commits that reference this issue on May 24, 2023

    pythongh-104874: Document NewType.__supertype__ (pythonGH-104875)

    b29fc4b

    pythongh-104874: Document NewType.__supertype__ (pythonGH-104875)

    fa00882
  5. AlexWaygood
    added 2 commits that reference this issue on May 24, 2023

    [3.12] gh-104874: Document NewType.__supertype__ (GH-104875) (#104906)

    a064233

    [3.11] gh-104874: Document NewType.__supertype__ (GH-104875) (#104907)

    3b3f2e1
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

    docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-typing

    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.