Commit 7cb581a
committed
gh-156187: Fix the warning stacklevel inside a nested set operand
_parse_charset() derives the stacklevel of its FutureWarning from
nested, and the nested-operand path inserts two frames, _parse_operand()
and the inner _parse_charset(), while advancing nested by one. The
warning was therefore reported against a frame inside the re package
instead of the caller, and further off the deeper the nesting.1 parent cdca502 commit 7cb581a
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1540 | 1544 | | |
1541 | 1545 | | |
1542 | 1546 | | |
| |||
1557 | 1561 | | |
1558 | 1562 | | |
1559 | 1563 | | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1560 | 1568 | | |
1561 | 1569 | | |
1562 | 1570 | | |
| |||
0 commit comments