SIGN IN SIGN UP

[3.13] gh-134411: assert `PyLong_FromLong(x) != NULL` when `x` is known to be small (GH-134415) (#136911)

gh-134411: assert `PyLong_FromLong(x) != NULL` when `x` is known to be small (GH-134415)

Since `PyLong_From Long(PY_MONITORING_DEBUGGER_ID)` falls to `small_int` case and can't return `NULL`. Added `assert`s for extra confidence.
https://github.com/python/cpython/issues/134411#issuecomment-2897653868
(cherry picked from commit cf19b6435d02dd7be11b84a44f4a8a9f1a935b15)

Co-authored-by: Sergey Muraviov <smurav@mail.ru>
M
Miss Islington (bot) committed
f2f30c494782509f39b98a26f08369032f498723
Parent: 3ee46cc
Committed by GitHub <noreply@github.com> on 7/21/2025, 9:21:30 AM