twisted / twisted/treq

Pluggable json loads/dumps

Open
#201 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
603
Forks
140
PR merge metrics
No merged PRs in 30d

Description

An optional argument to treq.HTTPClient could allow a user to plug in an alternative JSON implementation, with the expectation that it has the basic dumps() and loads() functions.

If treq also accepts that such functions may return Deferred, it also opens the door to other interesting avenues such as deferring to a thread to avoid blocking the reactor with a huge piece of JSON.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the treq.HTTPClient entry point and trace how JSON encoding and decoding are currently selected. Define the optional implementation contract, including whether dumps() and loads() may return Deferred, and verify completion with tests covering synchronous and deferred behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.