Skip to content

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

Description

@vstinner

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

Activity

  1. added 2 commits that reference this issue on Jan 15, 2025
  2. added 3 commits that reference this issue on Jan 15, 2025
  3. vstinner commented on Jan 16, 2025

    @vstinner
    MemberAuthor

    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)
  4. added 3 commits that reference this issue on Jan 22, 2025
  5. skirpichev commented on Jan 23, 2025

    @skirpichev
    Member

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

  6. added a commit that references this issue on Jan 23, 2025
  7. added 3 commits that reference this issue on Jan 23, 2025
  8. added a commit that references this issue on Feb 20, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions