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 — Deprecate `typing.Text` · Issue #92332 · python/cpython

Deprecate typing.Text #92332

New issue
Copy link
New issue
Copy link
Closed
#92351
Closed
Deprecate typing.Text#92332
#92351
Copy link
Labels
topic-typingtype-featureA feature request or enhancementA feature request or enhancement

Description

@AlexWaygood
AlexWaygood
opened on May 5, 2022
Issue body actions

Feature or enhancement

The typing module has a huge API, and new features continue to be added in each version of Python. Deprecations should be done carefully and slowly, to minimise disruption for users, but we should nonetheless aim to shrink the API where features are no longer needed, so as to make the sheer size of the module less overwhelming for newcomers to Python typing.

Python 2.7 is now end-of-life, so typing.Text has no use anymore (its sole purpose was to provide backwards compatibility with Python 2). I propose that we should now deprecate typing.Text, with a view to eventually removing it.

Activity

  1. AlexWaygood
    added
    type-featureA feature request or enhancementA feature request or enhancement
    topic-typing
    on May 5, 2022
  2. JelleZijlstra commented on May 5, 2022

    @JelleZijlstra
    JelleZijlstra
    on May 5, 2022
    Member
    More actions

    I agree on deprecating Text and removing it from examples, but I don't want to remove it for a long time: that just needlessly breaks previously working code.

    To reduce cognitive load on readers of the typing module docs, we can eventually move it to a separate section about deprecated names and cover it only briefly.

    Reacted by Alex Waygood and Henry Schreiner
  3. AlexWaygood commented on May 5, 2022

    @AlexWaygood
    AlexWaygood
    on May 5, 2022
    MemberAuthor
    More actions

    I don't want to remove it for a long time: that just needlessly breaks previously working code.

    We agree.

  4. Fidget-Spinner commented on May 5, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on May 5, 2022
    Member
    More actions

    Please forgive my ignorance: I didn't even know typing.Text existed. I don't think many people still use this, so we can deprecate it (but like you mentioned, remove it a long long time later).

  5. JelleZijlstra commented on May 5, 2022

    @JelleZijlstra
    JelleZijlstra
    on May 5, 2022
    Member
    More actions

    It's pretty easy to miss :).

    To be clear, by "a long time" I mean something like "wait a decade and then maybe start thinking about removing it". We shouldn't set a concrete removal timeline yet.

    Reacted by Alex Waygood
    Reacted by Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)
  6. AlexWaygood commented on May 5, 2022

    @AlexWaygood
    AlexWaygood
    on May 5, 2022
    MemberAuthor
    More actions

    It's pretty easy to miss :).

    It's definitely not a big maintenance burden or anything!

  7. Fidget-Spinner
    closed this as completedin #92351on May 6, 2022
  8. Fidget-Spinner
    added a commit that references this issue on May 6, 2022

    gh-92332: Docs-only deprecation of `typing.Text` (GH-92351)

    6f18b86
  9. sobolevn
    added a commit that references this issue on May 9, 2024

    `typing.Text` is deprecated

    f936f80
  10. msullivan
    added a commit that references this issue on May 9, 2024

    `typing.Text` is deprecated (#27)

    4df3c26
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

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