gh-143050: correct PyLong_FromString() to use _PyLong_Negate() by skirpichev · Pull Request #145901 · python/cpython · GitHub

github.com

Tin mới

skirpichev:fix-PyLong_FromString/143050

miss-islington-app

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Remove redundant decref from _PyLong_Negate #143050

: correct PyLong_FromString() to use _PyLong_Negate()

cleanup, use _testcapi.test_immortal_small_ints()

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

+ add also test with nonzero small int

_long_is_small_int() -> _PyLong_IsImmortal() helper

View reviewed changes

awaiting core review

awaiting core review

Merge branch 'master' into fix-PyLong_FromString/143050

address review: rename _PyLong_IsImmortal -> _PyLong_HasImmortalTag

View reviewed changes

Merge branch 'master' into fix-PyLong_FromString/143050

address review: some comments

View reviewed changes

Merge branch 'main' into fix-PyLong_FromString/143050

address review: add assert on _PY_IS_SMALL_INT

View reviewed changes

Rename to _PyLong_IsSmallInt()

View reviewed changes

needs backport to 3.14

needs backport to 3.14

bedevere-app Bot commented Mar 31, 2026

bedevere-app Bot commented Mar 31, 2026

GH-147331 is a backport of this pull request to the 3.14 branch.

: Correct PyLong_FromString() to use _PyLong_Negate() (

: Correct PyLong_FromString() to use _PyLong_Negate() (

: Correct PyLong_FromString() to use _PyLong_Negate() (

gh-130273: Fix traceback color output with unicode characters #142529

: Correct PyLong_FromString() to use _PyLong_Negate() (

: Correct PyLong_FromString() to use _PyLong_Negate() (