Skip to content

Conversation

@davidhewitt
Copy link
Contributor

Change Summary

Makes it actually possible to set regex_engine in pydantic/pydantic#7768

Related issue number

Part of pydantic/pydantic#7714

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

hide_input_in_errors: bool
validation_error_cause: bool # default: False
coerce_numbers_to_str: bool # default: False
regex_engine: Literal['rust-regex', 'python-re'] # default: 'rust-regex'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the interest of time today I have just pushed this missing item, I'd like to follow up with a proper test next week. 🙏

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #1011 (82e57a4) into main (8bbfb33) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1011   +/-   ##
=======================================
  Coverage   93.05%   93.05%           
=======================================
  Files         106      106           
  Lines       15713    15714    +1     
  Branches       35       35           
=======================================
+ Hits        14621    14622    +1     
  Misses       1085     1085           
  Partials        7        7           
Files Coverage Δ
python/pydantic_core/core_schema.py 94.75% <100.00%> (+<0.01%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bbfb33...82e57a4. Read the comment docs.

@davidhewitt davidhewitt enabled auto-merge (squash) October 9, 2023 14:17
@davidhewitt davidhewitt merged commit 8e66bd9 into main Oct 9, 2023
@davidhewitt davidhewitt deleted the dh/core-schema-regex-engine branch October 9, 2023 14:19
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 9, 2023

CodSpeed Performance Report

Merging #1011 will improve performances by 14.19%

Comparing dh/core-schema-regex-engine (82e57a4) with main (8bbfb33)

Summary

⚡ 3 improvements
✅ 137 untouched benchmarks

Benchmarks breakdown

Benchmark main dh/core-schema-regex-engine Change
test_variable_tuple 38.5 µs 34.3 µs +12.46%
test_validate_literal[python-few_mixed] 33.1 µs 29 µs +14.19%
test_validate_literal[json-few_mixed] 35.3 µs 31.4 µs +12.53%

davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants