Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to stdlib json if integer exceeds 64-bit range #18148

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

q0w
Copy link
Contributor

@q0w q0w commented Nov 12, 2024

Fixes the error below:

 File "mypy/main.py", line 102, in main
  File "mypy/main.py", line 186, in run_build
  File "mypy/build.py", line 194, in build
  File "mypy/build.py", line 269, in _build
  File "mypy/build.py", line 2935, in dispatch
  File "mypy/build.py", line 3333, in process_graph
  File "mypy/build.py", line 3460, in process_stale_scc
  File "mypy/build.py", line 2497, in write_cache
  File "mypy/build.py", line 1560, in write_cache
  File "mypy/util.py", line 924, in json_dumps
TypeError: Integer exceeds 64-bit range

Related: ijl/orjson#116

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@hauntsaninja hauntsaninja merged commit b137254 into python:master Nov 14, 2024
19 checks passed
@q0w q0w deleted the patch-1 branch November 14, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants