Skip to content

gh-136250: Document that int to str conversion can slightly exceed the digit limit - #136279

Merged
StanFromIreland merged 6 commits into
python:mainfrom
KentaroJay:fix-issue-136250
Dec 6, 2026
Merged

StanFromIreland merged 6 commits into
python:mainfrom
KentaroJay:fix-issue-136250

Conversation

@KentaroJay

@KentaroJay KentaroJay commented Jul 4, 2025 •

Copy link
Copy Markdown
Contributor

Comment thread Doc/library/stdtypes.rst Resolved
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@skirpichev
skirpichev requested a review from terryjreedy July 4, 2025 13:49
@skirpichev skirpichev added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Aug 31, 2025
@skirpichev

Copy link
Copy Markdown
Member

CC @terryjreedy

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 26, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 1, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Sep 3, 2026
@read-the-docs-community

read-the-docs-community Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Sep 9, 2026
@skirpichev

Copy link
Copy Markdown
Member

@KentaroJay, could you please resolve merge conflicts?

@skirpichev skirpichev self-assigned this Dec 3, 2026
@KentaroJay

Copy link
Copy Markdown
Contributor Author

@KentaroJay, could you please resolve merge conflicts?

OK, let me do it in a minute

@python-cla-bot

python-cla-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@skirpichev

Copy link
Copy Markdown
Member

The following commit authors need to sign the Contributor License Agreement:

noreply@anthropic.com

I guess, this newer be signed.

Could you please redo the last commit (only) and do a force-push without claude?

OK, let me do it in a minute

No need to reply each time to every comment from reviewer. Just do what you were asked for, if you accept suggestion.

@skirpichev skirpichev removed the needs backport to 3.13 only security fixes label Dec 3, 2026
@skirpichev

Copy link
Copy Markdown
Member

CC @StanFromIreland

Comment thread Doc/builtins/stdtypes.rst Outdated
Comment on lines +6911 to +6912
For integer to string conversions, the limit is applied to an estimated
size of the result.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
For integer to string conversions, the limit is applied to an estimated
size of the result.
For integer to string conversions with large limits, the check is
based on an estimate of the result size, so the result may slightly
exceed the limit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO, "with large limits" is useless, it give no glue on when actually it happens.

Maybe this: "For integer to string conversions, the check is based on an estimate of the lower bound of the result size." ?

PS: See #96537 for details.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I pushed a commit that combines both suggestions:

For integer to string conversions, the check is based on an estimate of
the lower bound of the result size, so the result may slightly exceed
the limit.

Does this wording work for both of you?

Comment thread Doc/builtins/stdtypes.rst Resolved
@StanFromIreland StanFromIreland changed the title gh-136250: Clarify Integer string conversion length limitation gh-136250: Document that int to str conversion can slightly exceed the digit limit Dec 6, 2026
@StanFromIreland
StanFromIreland enabled auto-merge (squash) December 6, 2026 16:58
@StanFromIreland
StanFromIreland merged commit d899016 into python:main Dec 6, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Dec 6, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @KentaroJay for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Dec 6, 2026

Copy link
Copy Markdown

GH-163247 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Dec 6, 2026
@bedevere-app

bedevere-app Bot commented Dec 6, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 6, 2026
StanFromIreland added a commit that referenced this pull request Dec 6, 2026
…ceed the digit limit (GH-136279) (#163248)

(cherry picked from commit d899016)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Dec 6, 2026
…ceed the digit limit (GH-136279) (#163247)

(cherry picked from commit d899016)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants