Closed kxx317 closed 1 month ago
Attention: Patch coverage is 80.00000%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 89.30%. Comparing base (
ab503cb
) to head (725d640
). Report is 157 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/serializers/infer.rs | 80.00% | 1 Missing :warning: |
Comparing kxx317:custom-int-type-infer-bigint-error
(725d640) with main
(f4a0675)
✅ 155
untouched benchmarks
please review
Change Summary
Modified the
infer.rs
infer_to_python_known
function to support the inference of BigInt/int beyond the i64 limit for IntSubclass object type whenSerMode=Json
.My approach is similar to code inside
return_enums.extract_bound
. I attempted to import that function intoinfer.rs
and re-use it but couldn't get it working so I duplicated theif
logics instead (first time to rust). As this was my first time working with Rust, I’m uncertain whether re-using it is the best solution especially since it doesn’t seem to align precisely with the purpose of return_enums.extract_bound.Related issue number
fix https://github.com/pydantic/pydantic/issues/10152
Checklist
pydantic-core
(except for expected changes)Selected Reviewer: @sydney-runkle