SIGN IN SIGN UP

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

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
a69472e242e768545d734cf336bdbbff6f749f3f
Parent: 163f532
Committed by GitHub <noreply@github.com> on 7/21/2025, 9:23:33 AM