Don't construct a KleinRequest via adaptation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 838
- Forks
- 123
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 12
Description
In #359, @glyph notes:
The real problem here though appears to be that we are constructing a
KleinRequestvia adaptation - apparently for no good reason. Rather than lie about the type of mapper, I think it would make more sense to replaceKleinResource.render's invocation with a simpleKleinRequest(request, mapper).Technically what I'm proposing is an incompatible change, but given that
KleinRequest(request)gives you a nonsense non-functional object without an attached mapper, I'm OK with a short deprecation cycle here.
Contributor guide
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.
Research direction
Start by reading KleinResource.render and the discussion linked from issue #359. Trace how KleinRequest is currently constructed through adaptation, then compare it with the proposed KleinRequest(request, mapper) path. Done means replacing the unnecessary adaptation while addressing the stated short deprecation cycle for KleinRequest(request).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100