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 — [C API] Deprecate private functions which have a public replacement · Issue #128863 · python/cpython

[C API] Deprecate private functions which have a public replacement #128863

New issue
Copy link
New issue
Copy link
Closed
Closed
[C API] Deprecate private functions which have a public replacement#128863
Copy link
Labels
topic-C-APItype-featureA feature request or enhancementA feature request or enhancement

Description

@vstinner
vstinner
opened on Jan 15, 2025
Issue body actions

Hi,

Python 3.13 and 3.14 added public functions to replace private functions. For example, a public function PyBytes_Join() was added to replace the private function _PyBytes_Join().

I propose to deprecate the private functions which have a public replacement, and remove them in Python 3.16.

Victor

Linked PRs

  • gh-128863: Deprecate private C API functions #128864
  • gh-128863: Deprecate _PyLong_Sign() function #129176
  • gh-128863: deprecate _PyLong_New() function #129212
  • gh-128863: deprecate _PyLong_FromDigits() function #127939
  • gh-128863: Deprecate the private _PyUnicodeWriter API #129245

Activity

  1. vstinner
    added
    topic-C-API
    on Jan 15, 2025
  2. vstinner
    added 2 commits that reference this issue on Jan 15, 2025

    pythongh-128863: Deprecate private C API functions

    873d8bd

    pythongh-128863: Deprecate private C API functions

    814670d
  3. vstinner commented on Jan 15, 2025

    @vstinner
    vstinner
    on Jan 15, 2025
    MemberAuthor
    More actions

    Previous discussion: https://discuss.python.org/t/remove-again-private-apis-which-now-have-new-public-replacement/68081

  4. vstinner
    added 3 commits that reference this issue on Jan 15, 2025

    pythongh-128863: Deprecate private C API functions

    37869e2

    pythongh-128863: Deprecate private C API functions

    18f8581

    pythongh-128863: Deprecate private C API functions

    8140437
  5. vstinner commented on Jan 16, 2025

    @vstinner
    vstinner
    on Jan 16, 2025
    MemberAuthor
    More actions

    Other deprecations to consider:

    • _PyCode_GetExtra(): PyUnstable_Code_GetExtra()
    • _PyCode_SetExtra(): PyUnstable_Code_SetExtra()
    • _PyEval_RequestCodeExtraIndex(): PyUnstable_Eval_RequestCodeExtraIndex()
    • _PyLong_AsByteArray(): PyLong_AsNativeBytes()
    • _PyLong_FromByteArray(): PyLong_FromNativeBytes()
    • _PyLong_FromDigits(): PyLongWriter_Create()
    • _PyLong_New(): PyLongWriter_Create()
    • _PyLong_Sign(): PyLong_GetSign()
    • _PyUnicodeWriter_Init(): PyUnicodeWriter_Create() (and other _PyUnicodeWriter functions)
  6. picnixz
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jan 17, 2025
  7. vstinner
    added 3 commits that reference this issue on Jan 22, 2025

    gh-128863: Deprecate private C API functions (#128864)

    9012fa7

    pythongh-128863: Deprecate _PyLong_Sign() function

    be36fc8

    gh-128863: Deprecate _PyLong_Sign() function (#129176)

    1d485db
  8. skirpichev commented on Jan 23, 2025

    @skirpichev
    skirpichev
    on Jan 23, 2025
    Member
    More actions

    I'm closing #127937 and #127936 in favor of this issue.

  9. skirpichev
    added a commit that references this issue on Jan 23, 2025

    pythongh-128863: deprecate _PyLong_New() function

    2d4b969
  10. vstinner
    added 3 commits that reference this issue on Jan 23, 2025

    gh-128863: Deprecate _PyLong_New() function (#129212)

    5c9a63f

    pythongh-128863: Deprecate the private _PyUnicodeWriter API

    e1fd675

    gh-128863: Deprecate _PyLong_FromDigits() function (#127939)

    233fd00
  11. vstinner
    added a commit that references this issue on Feb 20, 2025

    gh-128863: Deprecate the private _PyUnicodeWriter API (#129245)

    519c2c6
  12. vstinner
    closed this as completedon Mar 13, 2025
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-C-APItype-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.