Commit 6d3a89f
committed
Add Python 3.9-3.10 compatibility for PEP 678 exception notes
Add hasattr(e, 'add_note') checks before calling add_note() to ensure
compatibility with Python 3.9 and 3.10 where PEP 678 exception notes
are not available. The enhanced HTTP status context will only be added
in Python 3.11+ while maintaining backward compatibility.1 parent 94499f7 commit 6d3a89f
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
1464 | | - | |
| 1464 | + | |
1465 | 1465 | | |
1466 | 1466 | | |
1467 | 1467 | | |
| |||
0 commit comments