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 PyASCIIObject/PyUnicodeObject · Issue #131510 · python/cpython

Deprecate PyASCIIObject/PyUnicodeObject #131510

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Deprecate PyASCIIObject/PyUnicodeObject#131510
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItopic-unicodetype-featureA feature request or enhancementA feature request or enhancement

Description

@encukou
encukou
opened on Mar 20, 2025
Issue body actions

Feature or enhancement

Deprecate, and plan removal of, direct access to string internals:

  • `PyASCIIObject, PyCompactUnicodeObject, PyUnicodeObject structs
  • the PyUnicode_IS_COMPACT macro

This will allow reorganizing the structs for optimizations or new features.

One possible new feature is better support for subclasses that need additional C state. The NumPy and PyObjC projects currently do this. Both can adapt to CPython changes relatively quickly, so we can provide unstable API for their use case.

See discussion.

C API WG vote pending.

Linked PRs

  • gh-131510: Deprecate PyUnicodeObject structs, revert memory layout #130697
  • gh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH() #141520

Activity

  1. encukou
    added
    topic-C-API
    type-featureA feature request or enhancementA feature request or enhancement
    on Mar 20, 2025
  2. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    topic-unicode
    on Mar 22, 2025
  3. encukou commented on Apr 28, 2025

    @encukou
    encukou
    on Apr 28, 2025
    MemberAuthor
    More actions

    The discussion identified a use case to address first. I'll close this for now.

  4. encukou
    closed this as not plannedon Apr 28, 2025
  5. vstinner
    added a commit that references this issue on Nov 13, 2025

    pythongh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH()

    fe59d0e
  6. encukou
    added a commit that references this issue on Nov 14, 2025

    gh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH() (GH-141520)

    3bacae5
  7. StanFromIreland
    added a commit that references this issue on Dec 6, 2025

    pythongh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH() (pythonGH-1…

    0310ac9
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItopic-unicodetype-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 01402520 — 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.