matrix-org / matrix-org/matrix-python-sdk

Move features of MatrixHttpApi related to application-services into subclass

Open
#204 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Api layer architecture breaking enhancement
Dominant language
Python
Stars
266
Forks
118
PR merge metrics
No merged PRs in 30d

Description

See discussion on #143.

In general, I want to move the sdk more towards a set of composable classes with a clear api for extending them. Something where parameters specific to application-service usage live either in an additional kwarg `extras` or in slurped kwargs `**extras` seems like the right direction for this.

Issues to be resolved still:

- [ ] What if somebody wants to combine functionality available on two different subclasses of `MatrixHttpApi` (e.g. application-service support and async as in #168)? We should support composing those together somehow.

Maybe in addition to swapping out `_send` we should have a list of decorators that get applied to `_send`?

cc @Cadair

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 by reading MatrixHttpApi and the discussion on #143, then review the related async proposal in #168. Done means application-service functionality is moved into a composable subclass or extension, while the issue's unresolved combination of application-service and async behavior has a defined solution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.