Commit 4082545
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 errors1 parent 8afd1fd commit 4082545
2 files changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
856 | 870 | | |
857 | 871 | | |
858 | 872 | | |
859 | 873 | | |
860 | 874 | | |
861 | | - | |
862 | | - | |
863 | | - | |
| 875 | + | |
864 | 876 | | |
865 | 877 | | |
866 | 878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
0 commit comments