Skip to content

Wrong elapsed timedelta #1310

Closed
Closed

Description

@enguerranchevalier

Checklist

  • [ X] The bug is reproducible against the latest release and/or master.
  • [ X] There are no similar issues or pull requests to fix it yet.

Describe the bug

The elapsed argument obtained following a stream request seems completely incoherent.

To reproduce

Code example with httpx 0.15.1:

import httpx

client = httpx.Client()

with client.stream("GET", "https://httpbin.org/basic-auth/user/pass", auth=("user", "pass")) as r:
   print(r)

print(r.elapsed)

Expected behavior

Result got with httpx 0.14.3: 0:00:02.275297

Actual behavior

Result got with httpx 0.15.1: 1 day, 17:07:15.687523

Debugging material

image

Environment

  • OS: Linux
  • Python version: 3.7.5
  • HTTPX version: 0.15.1
  • Async environment: None
  • HTTP proxy: No
  • Custom certificates: No

Thanks,

Activity

  1. lovelydinosaur commented on Sep 23, 2020

    @lovelydinosaur
    Member

    👀 Yikes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions