pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.4k stars 232 forks source link

Reuse `re.Pattern` object in regex patterns #1318

Closed sydney-runkle closed 3 months ago

sydney-runkle commented 3 months ago

Working on https://github.com/pydantic/pydantic/issues/9568

sydney-runkle commented 3 months ago

Will have to add changes to the core schema to support re.Pattern[str] to str_schema() and friends.

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1318 will not alter performance

Comparing regex-fix (4555a1a) with main (8afaa45)

Summary

✅ 155 untouched benchmarks

davidhewitt commented 3 months ago

Looking good! Let's add a test or two here, otherwise I'm happy👍