Deprecate Actor.name_email_regex (#2220) · gitpython-developers/GitPython@4082545 · GitHub
Skip to content

Commit 4082545

Browse files
codexByron
authored andcommitted
Deprecate Actor.name_email_regex (#2220)
Keep returning the historical compiled pattern for downstream compatibility, but emit DeprecationWarning whenever the class member is accessed. The warning explains its quadratic behavior on long malformed strings and recommends Actor._from_string() or direct string parsing. The regression verifies that access warns, names both alternatives, and still supports the existing match behavior. Validation: - test/test_actor.py: 8 passed - ruff check and format checks passed - basedpyright git/util.py: no errors
1 parent 8afd1fd commit 4082545

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

git/util.py

Lines changed: 15 additions & 3 deletions

test/test_actor.py

Lines changed: 7 additions & 2 deletions

0 commit comments

Comments
 (0)