🐛 ub-needs-exchange: NaN, Infinity and lone surrogates are read although they are not JSON
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
The issue names the reader's use of Python's json.loads and its parse_constant hook, which is where NaN, Infinity and -Infinity could be rejected with invalid_json. Read the RFC 8259 contract section (§2.3) and the reviews in #2219 first, since the lone-surrogate behaviour still needs a maintainer decision. Done means the three constants and lone surrogates are rejected, each has a corpus case, and changelog lines are added for the package and sphinx-needs.
Written by the indexing model from the issue text.
Description
The reader accepts NaN, Infinity and -Infinity (Python's json reads them by default) and lone surrogate escapes, none of which is JSON (RFC 8259); a strict reader such as serde_json refuses them as a syntax error. The 1.0.0 contract records this as "out of contract" (§2.3) rather than fixing it, since the slice changed no behaviour.
Candidate fix: json.loads(text, parse_constant=…) raising invalid_json for the three constants, a decision on lone surrogates, and a corpus case for each — a behaviour change that needs a changelog line in the package and in sphinx-needs.
Found by the 1.0.0 build's reviews (#2219; A-2 / B-1).
- Dominant language
- Python
- Stars
- 309
- Forks
- 103
- Avg merge
- 10h 41m
- Merged PRs (30d)
- 128
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from useblocks/sphinx-needs
-
documentation pkg: sphinx-needs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
useblocks/sphinx-needs#2255 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
useblocks/sphinx-needs#2253 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2251 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
useblocks/sphinx-needs#2249 ·
Maintainers usually reply within 1 day
-
documentation pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2247 ·
Maintainers usually reply within 1 day
All issues in useblocks/sphinx-needs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/sentence-transformers#4186 ·
Maintainers usually reply within 5 days
-
documentation good first issue
Difficulty 2/5 Half a day Newbie friendliness 72/100
sujithputta02/Esapay#13 ·
-
bot-triaged module: correctness (silent) module: mps module: NaNs and Infs triage review
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SCIInstitute/SCIRun#2842 ·
Maintainers usually reply within 3 days