Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTRUMENTED_FUNCTION_CALL_EX should set arg0 to MISSING instead of None if argument is absent #116735

Closed
gaogaotiantian opened this issue Mar 13, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@gaogaotiantian
Copy link
Member

gaogaotiantian commented Mar 13, 2024

Bug report

Bug description:

I should've caught this in #116626 but somehow I missed it. INSTRUMENTED_FUNCTION_CALL_EX sets arg0 to None now, instead of MISSING, when there's no argument.

def f(a=1, b=2):
    return a + b
empty_args = []
f(*empty_args)  # arg0 will be None

CPython versions tested on:

3.12, CPython main branch

Operating systems tested on:

Linux

Linked PRs

@gaogaotiantian gaogaotiantian added the type-bug An unexpected behavior, bug, or error label Mar 13, 2024
gaogaotiantian added a commit to gaogaotiantian/cpython that referenced this issue Mar 15, 2024
… absent (pythonGH-116737)

(cherry picked from commit 59e30f4)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
markshannon pushed a commit that referenced this issue Mar 19, 2024
#116873)

[3.12] gh-116735: Use `MISSING` for `CALL` event if argument is absent (GH-116737)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant