psf / psf/requests

bool(failure response) is False

Open
#2,002 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Breaking API Change Feature Request
Dominant language
Python
Stars
54.3k
Forks
10.4k
Avg merge
16h 43m
Merged PRs (30d)
3

Description

This is rather surprising, and not documented that I've seen (though I could certainly have missed it):

>>> r = requests.request('get', 'http://google.com/aopsdufsaf')
>>> r
<Response [404]>
>>> bool(r)
False

To me, "failure = false" is neither intuitive nor expected.

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 the issue and its 20-comment discussion to determine whether the intended outcome is a behavior change, documentation, or both. The issue names no files or tests; done should be an agreed, explicit truthiness contract for failure responses with corresponding project coverage.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.