Commit 4eb9011
authored
Python 3.13 support in validator.py (#1326)
Fixes #1173
**Why This Broke in Python 3.13**
Python ≤ 3.12: When `exec(func)` was called with only globals, the
dynamically `generated generate_validate_all` function was accessible in
the local scope, and the fallback `locals()['generate_validate_all']`
worked.
Python 3.13: The scoping behavior changed. When `exec()` is called with
only globals, the generated function is no longer accessible via
`locals()`, causing the `KeyError: 'generate_validate_all'` encountered
in #1173.1 parent ad5af80 commit 4eb9011
1 file changed
+8
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
| 160 | + | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| |||
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
222 | 219 | | |
223 | 220 | | |
224 | 221 | | |
| |||
0 commit comments