Commit babe3da
committed
gh-152212: Reject a POSIX TZ footer with a missing std offset in pure-Python zoneinfo
The pure-Python _parse_tz_str defaulted a missing std offset to 0, so a POSIX TZ
footer with a bare std abbreviation and no offset (e.g. 'AAA') was silently accepted
as a fixed offset-0 zone. POSIX requires the offset after std, and the C accelerator
already rejects it, so the pure-Python parser now raises ValueError to match.1 parent 56ae0b8 commit babe3da
3 files changed
Lines changed: 12 additions & 1 deletion
File tree
- Lib
- test/test_zoneinfo
- zoneinfo
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1145 | 1150 | | |
1146 | 1151 | | |
1147 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments