Skip to content

gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts - #160482

Merged
picnixz merged 1 commit into
python:mainfrom
picnixz:meta/decimal/py/test-mod-divmod-unbound-140036
Oct 28, 2026
Merged

picnixz merged 1 commit into
python:mainfrom
picnixz:meta/decimal/py/test-mod-divmod-unbound-140036

Conversation

@picnixz

@picnixz picnixz commented Oct 23, 2026

Copy link
Copy Markdown
Member

Add tests for x % 1 and divmod(x, 1) in an unbounded context, next to the existing x // 1 test from gh-140044. Both operations go through Decimal._divide, which gh-140044 fixed.

…ounded contexts

Check that `%` and `divmod()` stay fast when the context precision is
`MAX_PREC`, as `//` already is.
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Oct 23, 2026
@picnixz
picnixz merged commit e7ab898 into python:main Oct 28, 2026
55 of 56 checks passed
@picnixz picnixz added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 28, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 28, 2026

Copy link
Copy Markdown

GH-160808 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 Oct 28, 2026
@bedevere-app

bedevere-app Bot commented Oct 28, 2026

Copy link
Copy Markdown

GH-160809 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 Oct 28, 2026
picnixz added a commit that referenced this pull request Oct 28, 2026
…bounded contexts (GH-160482) (#160808)

gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts (GH-160482)
(cherry picked from commit e7ab898)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Oct 28, 2026
…bounded contexts (GH-160482) (#160809)

gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts (GH-160482)
(cherry picked from commit e7ab898)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant