Bug report
Bug description:
You should be careful when matching unicode regexes:
|
NUMBER_RE = re.compile( |
|
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', |
|
(re.VERBOSE | re.MULTILINE | re.DOTALL)) |
>>> import sys
>>> sys.modules["_json"] = None
>>> import json
>>> json.loads("[1\uff10, 0.\uff10, 0e\uff10]")
[10, 0.0, 0.0]
I think it's safer to use [0-9] instead of \d here.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs