1.0.6 halved max recursion depth on Windows
crusaderky opened this issue · 0 comments
crusaderky commented
The maximum recursion depth on Windows has dropped from 512 levels to 256 from version 1.0.5 to 1.0.6:
All packages from conda, running on github CI:
```python
import sys
import msgpack
for i in range(200, 5000):
root = outer = {}
inner = {}
for _ in range(i):
outer["children"] = inner
outer, inner = inner, {}
try:
msgpack.dumps(root)
except ValueError:
print(
f"msgpack {msgpack.__version__} on Python "
f"{sys.version.split()[0]}/{sys.platform} raises at {i}"
)
break
Output:
msgpack 1.0.5 on Python 3.9.18/linux raises at 512
msgpack 1.0.5 on Python 3.10.12/linux raises at 512
msgpack 1.0.5 on Python 3.11.5/linux raises at 512
msgpack 1.0.5 on Python 3.9.18/win32 raises at 512
msgpack 1.0.5 on Python 3.10.12/win32 raises at 512
msgpack 1.0.5 on Python 3.11.5/win32 raises at 512
msgpack 1.0.6 on Python 3.9.18/linux raises at 512
msgpack 1.0.6 on Python 3.10.12/linux raises at 512
msgpack 1.0.6 on Python 3.11.5/linux raises at 512
msgpack 1.0.6 on Python 3.9.18/win32 raises at 256
msgpack 1.0.6 on Python 3.10.12/win32 raises at 256
msgpack 1.0.6 on Python 3.11.5/win32 raises at 256