question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

broken with httpx 0.10

See original GitHub issue

Describe the bug

authlib uses old classes of httpx. New version of httpx 0.10 removed AsyncRequest AsyncResponse and also there’s no middleware.

Environment:

  • OS: Linux
  • Python Version: 3.7
  • Authlib Version: 0.13

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kesavkollacommented, Jan 6, 2020

Still getting error

asyncio.run(client.fetch_token(token_endpoint))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 107, in _fetch_token
    auth=auth, **kwargs)
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/client.py", line 761, in post
    trust_env=trust_env,
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 87, in request
    method, url, auth=auth, **kwargs)
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/client.py", line 268, in request
    timeout=timeout,
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/client.py", line 402, in send
    request, auth=auth, timeout=timeout, allow_redirects=allow_redirects,
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/client.py", line 454, in send_handling_redirects
    request, auth=auth, timeout=timeout,
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/client.py", line 572, in send_handling_auth
    request = next(auth_flow)
  File "/home/kesav/.virtualenvs/keycloak/lib/python3.7/site-packages/httpx/auth.py", line 62, in __call__
    yield self.func(request)
TypeError: __call__() missing 1 required positional argument: 'get_response'
0reactions
lepturecommented, Feb 11, 2020

fixed in master

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage - HTTPX
When you make requests using the top-level API as documented in the Quickstart guide, HTTPX has to establish a new connection for every...
Read more >
Python module not found even though "Requirement Already ...
Run in command prompt. pip list. Check what version you have installed on your system if you have an old version.
Read more >
cryptocom-exchange 0.11.16 on PyPI - Libraries.io
Python 3.7+ async library for crypto.com/exchange API using httpx and ... PLEASE use 0.10.3+ [prev versions have private websocket broken ...
Read more >
Deductions | Gymnastics Wiki - Fandom
0.10 Deduction ; flexed feet. 1dzogl.gif ; lacking flexibility in split (up to 20°). 4p5eio.gif ; insufficient arch position in ring leap or...
Read more >
Package List — Spack 0.20.0.dev0 documentation
boostmplcartesianproduct, perl-net-http, qt-base ... Versions: 0.14, 0.10; Build Dependencies: gnuconfig, pkgconfig, m4, autoconf, automake, libtool, gsl, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found