Skip to content

Add support for three-tuple input for Decimal - #12500

Merged
Viicos merged 4 commits into
pydantic:mainfrom
tanmaymunjal:tuple_input_for_decimal
Nov 17, 2025
Merged

Viicos merged 4 commits into
pydantic:mainfrom
tanmaymunjal:tuple_input_for_decimal

Conversation

@tanmaymunjal

@tanmaymunjal tanmaymunjal commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

Change Summary

Added support for three tuple input for decimal as already supported by python's decimal constructor.

Related issue number

Fix #12284

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @Viicos

@github-actions github-actions Bot added the relnotes-fix Used for bugfixes. label Nov 8, 2025
@github-actions

github-actions Bot commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@codspeed

codspeed Bot commented Nov 8, 2025 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #12500 will improve performances by 6.48%

Comparing tanmaymunjal:tuple_input_for_decimal (4344b01) with main (f42171c)

Summary

⚡ 1 improvement
✅ 208 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
⚡ test_list_of_strs_json_cached 327 µs 307.1 µs +6.48%

@tanmaymunjal

Copy link
Copy Markdown
Contributor Author

please review

Comment thread pydantic-core/src/input/input_python.rs Outdated
Comment thread pydantic-core/tests/validators/test_decimal.py Outdated
Comment thread pydantic-core/tests/validators/test_decimal.py Outdated
Comment thread pydantic-core/tests/validators/test_decimal.py Outdated
Comment thread docs/api/standard_library_types.md Outdated
@Viicos Viicos changed the title Added support for Three Tuple input for Decimal Add support for three-tuple input for Decimal Nov 12, 2025
@Viicos Viicos added feature request needs-blogpost-entry This PR needs to be documented in the release notes blog post relnotes-change Used for changes to existing functionality which don't have a better categorization. and removed relnotes-fix Used for bugfixes. feature request labels Nov 12, 2025
tanmaymunjal and others added 2 commits November 12, 2025 10:44
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
@tanmaymunjal
tanmaymunjal requested a review from Viicos November 12, 2025 18:49
@tanmaymunjal

Copy link
Copy Markdown
Contributor Author

Looking at the coverage-combine error in CI, I suspect the issue is unrelated to the code changes in this PR and might be transient. Can you try re-running the action to see if it passes? Happy to investigate further if it persists.

@davidhewitt

Copy link
Copy Markdown
Contributor

Done

@Viicos Viicos left a comment

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.

Thanks @tanmaymunjal

@Viicos
Viicos merged commit 421a50d into pydantic:main Nov 17, 2025
114 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-blogpost-entry This PR needs to be documented in the release notes blog post relnotes-change Used for changes to existing functionality which don't have a better categorization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support tuple input for decimals

3 participants