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: Remove deprecate PyEval_CallObject() function · Issue #105107 · python/cpython

C API: Remove deprecate PyEval_CallObject() function #105107

New issue
Copy link
New issue
Copy link
Closed
Closed
C API: Remove deprecate PyEval_CallObject() function#105107
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on May 30, 2023
Issue body actions

The Python C API has many functions to call a function or a method: https://docs.python.org/dev/c-api/call.html

The PyEval variants were deprecated in Python 3.9. I propose to now remove them:

  • PyEval_CallObject()
  • PyEval_CallObjectWithKeywords()
  • PyEval_CallFunction()
  • PyEval_CallMethod()

There are replacement functions like PyObject_Call() and PyObject_CallFunction() which exist since Python 3.0 at least and so is backward compatible.

Linked PRs

  • gh-105107: Remove PyEval_CallFunction() function #105108
  • gh-105107: Remove PyCFunction_Call() function #105181

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 30, 2023
  2. vstinner
    added 2 commits that reference this issue on May 30, 2023

    pythongh-105107: Remove PyEval_CallFunction() function

    4022016

    pythongh-105107: Remove PyEval_CallFunction() function

    211fb31
  3. vstinner commented on May 30, 2023

    @vstinner
    vstinner
    on May 30, 2023
    MemberAuthor
    More actions

    There are replacement functions like PyObject_Call() and PyObject_CallFunction() which exist since Python 3.0 at least and so is backward compatible.

    Replacing PyEval_CallObject(func, args) with PyObject_Call(args) does crash if args is NULL. Python 3.9 added PyObject_CallNoArgs() for this purpose: https://docs.python.org/dev/c-api/call.html#c.PyObject_CallNoArgs

  4. vstinner commented on May 30, 2023

    @vstinner
    vstinner
    on May 30, 2023
    MemberAuthor
    More actions

    The PyEval_Call*() functions are not documented and not tested.

  5. vstinner
    added 2 commits that reference this issue on May 31, 2023

    pythongh-105107: Remove PyEval_CallFunction() function

    a394bbc

    gh-105107: Remove PyEval_CallFunction() function (#105108)

    579c41c
  6. vstinner
    closed this as completedon May 31, 2023
  7. vstinner
    added 4 commits that reference this issue on Jun 1, 2023

    pythongh-105107: Remove PyCFunction_Call() function

    55ca62f

    pythongh-105107: Remove PyCFunction_Call() function

    ae5a709

    pythongh-105107: Remove PyCFunction_Call() function

    781f429

    pythongh-105107: Remove PyCFunction_Call() function

    d3e66c8
  8. vstinner commented on Jun 1, 2023

    @vstinner
    vstinner
    on Jun 1, 2023
    MemberAuthor
    More actions

    I also removed the PyCFunction_Call() function.

  9. vstinner
    added a commit that references this issue on Jun 1, 2023

    gh-105107: Remove PyCFunction_Call() function (#105181)

    27f9491
  10. shadchin
    added a commit that references this issue on Jul 20, 2024

    Switch from `PyEval_CallObject` to `PyObject_Call`

    846468d
  11. jimbob88
    added a commit that references this issue on Sep 17, 2024

    Remove Python 3.9 deprecation

    81c844c
  12. chris-allan
    added a commit that references this issue on Feb 26, 2025

    Add support for Python 3.13 (See zeroc-ice/ice#2906)

    0efd731
  13. xtexx
    added a commit that references this issue on May 10, 2025

    Fix for Python 3.13.0

    0a6dc9d
  14. MingcongBai
    added a commit that references this issue on Jan 4, 2026

    AOSCOS: Fix for Python 3.13.0

    8270dbb
  15. chris-allan
    added 3 commits that reference this issue on Jun 25, 2026

    Add support for Python 3.13 (See zeroc-ice/ice#2906)

    113a093

    Add support for Python 3.13 (See zeroc-ice/ice#2906)

    f3f6c10

    Add support for Python 3.13 (See zeroc-ice/ice#2906)

    6ad6b1c
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

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    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.