python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
18.55k stars 2.84k forks source link

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

Closed q0w closed 1 week ago

q0w commented 1 week ago

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: https://github.com/ijl/orjson/issues/116

github-actions[bot] commented 1 week ago

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