Repository navigation
test: Reach 100% test coverage - #156
Conversation
Documentation build overview
|
- Decode non-JSON payloads to str in HTTPRequest.data(), eliminating maybe_str across builders and utils. - Make HTTPRequest.auth() robust against malformed basic auth and preserve tokens with split(None, 1). - Add support for JSON null (None) and literal constants in astify_json_obj. - Preserve empty JSON objects and arrays in curl, wget, httpie, and requests builders. - Handle missing modules, type errors, and invalid specs gracefully in utils.resolve_path. - Add docs directory to sys.path in docs/conf.py for standalone sphinx-build and pytest runs. - Expand test suite across builders, directives, lexers, parsers, and utils to achieve 100% coverage. Assisted-by: Antigravity (Gemini 3.8 Flash)
|
@datakurre I see this marked as a draft. Is it ready for review? |
|
Not yet. I need to review it by myself first :) I think, I found more Py2 legacy to remove, but have not pushed yet. |
5c65062 to
9f61a0e
Compare
|
The review flagged my instruction to remove internal I'd like to merge this and rebase the |
|
@stevepiercy Now this is ready :) |
stevepiercy
left a comment
There was a problem hiding this comment.
A question and a possible typo. Otherwise LGTM and is a nice clean up.
Co-authored-by: Steve Piercy <web@stevepiercy.com>
- Add HTTPRequest.has_data() so builders distinguish a missing body from
falsy JSON bodies ({}, [], 0, false, "", null); drop unreachable inner
"if data" checks.
- Emit JSON null as data='null' in requests (json=None sends no body).
- Escape single quotes in curl --data-raw and wget --post/--body-data.
- requests: keep blank form values, accept form content type with
parameters, keep raw body when it has no key=value pairs.
- Split Basic auth token only on the first colon (wget, requests).
- Stop doubling newlines in multi-line bodies.
- Narrow auth() exception handling and decode bodies strictly.
- Align isort with black 26 by dropping lines_after_imports.
Assisted-by: Claude Code (claude-opus-5-5)
stevepiercy
left a comment
There was a problem hiding this comment.
It might be good to get another pair of eyes on this before merging. I'll request other folks to take a look. Maybe give them a day, oh, Plone Tune-up Day starts now!
|
@sneridagh @pnicolli @Hrittik20 this PR lays the foundation for better parsing of The docs look exactly the same, so I think this can be merged, if you don't want to wait. https://sphinxcontrib-httpexample--156.org.readthedocs.build/en/156/index.html |
Assisted-by: Antigravity (Gemini 3.8 Flash)
📚 Documentation preview 📚: https://sphinxcontrib-httpexample--156.org.readthedocs.build/