`RequestHandler.build_request_kwargs` drops empty request bodies such as `{}` or `""`
Maintainers usually reply within 1 day
@abhirajadhikary06 is already working on this.
Since Nov 27, 2026.
- #171 by @abhirajadhikary06 — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start with RequestHandler.build_request_kwargs() and trace how its data argument becomes the outgoing request content. Check the existing tests for request body handling and add coverage for {}, "", b"", and None; done means falsy non-None bodies are preserved while None still omits content.
Written by the indexing model from the issue text.
Description
Description
RequestHandler.build_request_kwargs() checks the truthiness of kwargs.get("data") rather than checking is not None. As a result, valid falsy request bodies like {} (for example, client.analytics.events.flush() passes body={}), "", or b"" are silently omitted from the request.
Steps to Reproduce
request_kwargs = request_handler.build_request_kwargs(data={})
# "content" is missing instead of "{}"
Actual Behavior
if body := kwargs.get("data"): evaluates to False for {}, "", and b"", so request_kwargs["content"] is never set and no body is sent.
Expected Behavior
Check if (body := kwargs.get("data")) is not None: so {} is serialized to "{}" and ""/b"" are preserved, while None (or omitted data) still omits content.
- Dominant language
- Python
- Stars
- 247
- Forks
- 69
- Avg merge
- 19h 4m
- Merged PRs (30d)
- 9
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 typesense/typesense-python
-
`MultiSearchResponse` type does not account for union search response shapePossibly taken @tharropoulos claimed this 207 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
typesense/typesense-python#128 ·
Maintainers usually reply within 1 day
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`Possibly taken @tharropoulos claimed this 280 days ago. Open
Difficulty 2/5 1-2 days Newbie friendliness 68/100
typesense/typesense-python#124 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
typesense/typesense-python#100 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
typesense/typesense-python#122 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug] - DeprecationWarning on instantiation of ClientPossibly taken @tharropoulos claimed this 301 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
typesense/typesense-python#114 · 8 comments ·
Maintainers usually reply within 1 day
All issues in typesense/typesense-python
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meetecho/juturna_nodes#43 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TigreGotico/text2spoken#726 ·
Maintainers usually reply within 1 day
-
bug dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
nolte/claude-shared#822 ·
Maintainers usually reply within 1 day
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-official-plugins#538 ·
Maintainers usually reply within 3 days
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidatePossibly taken @houzhongyu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
Maintainers usually reply within 2 days