Commit 6d72dc8
Fix circular recursion in _accel fallback encode/decode_varints
The pure-Python fallback functions in _accel/__init__.py were calling
back into ucis.ncdb.varint.encode_varints/decode_varints. Since varint.py
successfully imports from _accel (no exception raised), _HAVE_ACCEL is True
and varint's bulk functions delegate back to _accel, creating infinite
mutual recursion (RecursionError in CI).
Fix: inline the LEB128 encode/decode logic directly in the _accel
fallback functions instead of re-importing from varint.py.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 695f7ed commit 6d72dc8
1 file changed
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
| |||
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
92 | | - | |
93 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
94 | 120 | | |
95 | 121 | | |
96 | 122 | | |
| |||
0 commit comments