| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Agent-Logs-Url: https://github.com/msgpack/msgpack-python/sessions/d5bc8a6a-e14e-4de3-b55f-4206dc3ca170 Co-authored-by: methane <199592+methane@users.noreply.github.com>
| sys.setrecursionlimit(max(old_limit, 10000)) | ||
| try: | ||
| packed = packb(d) | ||
| assert unpackb(packed) == d |
There was a problem hiding this comment.
@copilot この == が インタプリタ内部の recursion limit に当たってRuntimeErrorになるんだ。これはCレベルの制限だから sys.setrecursionlimit() では対策できない。
json.dumps(packed) == json.dumps(d) にしてくれる?もしくは他にいいやり方があったら提案お願い。
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed in 30e46c8. Instead of using == (which recurses through the 1024-level structure at C level), the test now iteratively unwraps the result one level at a time and asserts structure/type at each step, avoiding any deep recursion in the comparison.
Sorry, something went wrong.
…ecursion limit Agent-Logs-Url: https://github.com/msgpack/msgpack-python/sessions/b5597430-50ea-4c37-b94f-7b4c9ed4142c Co-authored-by: methane <199592+methane@users.noreply.github.com>
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> Fix `test_deep_nesting_metastruct_size_over_limit` and `test_deep_nesting_metastruct_size_under_limit` Culprit: `msgpack 1.2.0` has just released. It includes [Raise DEFAULT_RECURSE_LIMIT from 511 to 1024 by Copilot · Pull Request #676 · msgpack/msgpack-python](msgpack/msgpack-python#676) which changes `DEFAULT_RECURSE_LIMIT` from 511 to 1024 `python 3.9` is unaffected as the new msgpack version has dropped the support #### What does this implement or fix? Hard-pin the arcticdb limit to `511` as msgpack <1.2.0 #### Any other comments? msgpack <1.2.0 has the recurse limit set at 511. arcticdb imports the limit from msgpack to calculate the metastruct layer limit msgpack 1.2.0 has raised limit from 511 to 1024. Since reconstructing the metastruct from is done by recursion, increasing the no. of layers in the metastruct will make arcticdb hit the python recursion limit. #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing -->
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> Fix `test_deep_nesting_metastruct_size_over_limit` and `test_deep_nesting_metastruct_size_under_limit` Culprit: `msgpack 1.2.0` has just released. It includes [Raise DEFAULT_RECURSE_LIMIT from 511 to 1024 by Copilot · Pull Request #676 · msgpack/msgpack-python](msgpack/msgpack-python#676) which changes `DEFAULT_RECURSE_LIMIT` from 511 to 1024 `python 3.9` is unaffected as the new msgpack version has dropped the support #### What does this implement or fix? Hard-pin the arcticdb limit to `511` as msgpack <1.2.0 #### Any other comments? msgpack <1.2.0 has the recurse limit set at 511. arcticdb imports the limit from msgpack to calculate the metastruct layer limit msgpack 1.2.0 has raised limit from 511 to 1024. Since reconstructing the metastruct from is done by recursion, increasing the no. of layers in the metastruct will make arcticdb hit the python recursion limit. #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing --> #### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> #### What does this implement or fix? #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing --> Co-authored-by: Phoebus Mak <61957902+phoebusm@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.