Commit Graph

680 Commits

Author SHA1 Message Date
Tom Christie
30102612b7
Fix VERSION_FILE in publish script. (#916) 2020-05-01 13:47:29 +01:00
Jamie Hewland
8710079d5d
asgi: Send http.disconnect message on receive() after response complete (#909)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-05-01 11:51:35 +02:00
Tom Christie
bed3d8bd38
Version 0.13.0.dev0 (#915)
* Version 0.13.0.dev0

* Bump httpcore

* Include packaging in requirements

* Include note on UDS support

* Update CHANGELOG
2020-04-30 17:09:49 +01:00
Tom Christie
e586e5df37
Publish workflow (#913)
* Publish workflow

* Set PYTHONPATH to allow auto docs to import package

* Seperate install, build, publish steps
2020-04-30 15:22:54 +01:00
Nicholas Guriev
97cf9dadd2
Proper warning level of deprecation notice (#908)
This enables us to control emitted messages via the PYTHONWARNINGS
environment variable or by -W option.
2020-04-25 09:42:03 +02:00
Tom Christie
c6872e1fea
Update README.md 2020-04-24 16:47:24 +01:00
Tom Christie
19bf2112a1
Test Suite on GitHub Actions (#907)
* Test Suite on GitHub Actions

* Add linting checks

* Update badges. Drop unused codecov, pending GitHub action support,
2020-04-24 16:46:45 +01:00
David Vo
9085582211
Avoid hasattr in hot loop in Brotli decoder (#906) 2020-04-19 09:03:56 +02:00
Florimond Manca
4c01117dd2
Move types definitions to a dedicated module (#902) 2020-04-15 13:12:09 +02:00
Florimond Manca
5829ecb648
Implement streaming multipart uploads (#857)
* Implement streaming multipart uploads

* Tweak seekable check

* Don't handle duplicate computation yet

* Add memory test for multipart streaming

* Lint

* 1 pct is enough

* Tweak lazy computations, fallback to non-streaming for broken filelikes

* Reduce diff size

* Drop memory test

* Cleanup
2020-04-10 20:40:04 +02:00
Florimond Manca
af75908b7a
Drop concurrency backends (#901)
* Drop concurrency backends

* Put back as_network_error for use in urllib3 dispatcher
2020-04-10 18:48:01 +02:00
Tom Christie
3046e920ea
Httpcore interface (#804)
* First pass as switching dispatchers over to httpcore interface

* Updates for httpcore interface

* headers in dispatch API as plain list of bytes

* Integrate against httpcore 0.6

* Integrate against httpcore interface

* Drop UDS, since not supported by httpcore

* Fix base class for mock dispatchers in tests

* Merge master and mark as potential '0.13.dev0' release
2020-04-08 13:32:10 +01:00
Tom Christie
631ba97635
Revert "Add content-length header for empty bytestream (#866)" (#898)
This reverts commit 939f3ce7ce.
2020-04-08 13:15:22 +01:00
Florimond Manca
4ef5de4002
Add issue templates (#880)
* Add issue templates

* Fix typos/phrasing

* Swap docs and GH search

Co-Authored-By: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>

* Drop code example in favor of prose

* Update .github/ISSUE_TEMPLATE/2-bug-report.md

Co-Authored-By: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>

Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
2020-03-29 15:55:12 +02:00
Ed Singleton
94323f98ac
Fix support for generator-based WSGI apps (#887)
* Handle generator WSGI app

* Lint code

* Add type annotations

* Add more tests

* Refactor test to use application_factory

* Remove content length as it's misleading

* Add test for WSGI generator

* Add test for empty generator

* Remove previous tests

* Move docstring to a comment

* Fix whitespace

* Fix name of function

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update tests/test_wsgi.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update tests/test_wsgi.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update httpx/_dispatch/wsgi.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-03-29 13:13:01 +02:00
Florimond Manca
1c9b852783
Improve type hinting for HTTPError.request (#886) 2020-03-29 13:12:05 +02:00
Florimond Manca
d63108d613
Fix casing nits (#889) 2020-03-29 12:46:38 +02:00
Florimond Manca
3acd72a6ee
Remove stitches in requirements.txt (#888)
* Remove stitches in requirements.txt

* Put back attrs pin
2020-03-29 12:44:56 +02:00
Florimond Manca
8f400c269e
Drop usage of AnyStr (#882) 2020-03-29 11:39:31 +02:00
Ed Singleton
fc980e7792
Fix Client Docstring and add AsyncClient to API docs (#883)
* Fix docstring of Client

* Add AsyncClient to API docs

* Add AsyncClient to ToC

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-03-28 17:22:10 +01:00
Dima Boger
939f3ce7ce
Add content-length header for empty bytestream (#866)
Also, fixed related tests
2020-03-28 16:05:06 +01:00
Florimond Manca
21f533774f
Add 'Third Party Packages' docs page (#876) 2020-03-26 15:43:04 +01:00
Srikanth Chekuri
5cf1acc403
Add docs on request instances to Requests compatibility guide (#823)
* Update docs/compatibility.md

* Add prepare_request equivalent of httpx to compatibility document

* Add difference b/w httpx.Request and requests.Request arguments to compatibility document

* Update docs/compatibility.md
* Remove Request arguments section
* Add new section Request instantiation with necessary info

* Update docs/compatibility.md

Commit the suggested changes

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-03-25 22:33:16 +01:00
Tom Christie
23486b5438
Version 0.12.1 (#868) 2020-03-19 20:55:13 +00:00
Dima Boger
430285f55b
Fix multipart edge cases with data={} and/or files={} (#861)
* Add reproducible test example for empty multipart

* Possible fix for empty combination of files/data

* Return bytestream with empty data/files

* Remove content-length in test

Co-authored-by: florimondmanca <florimond.manca@gmail.com>
2020-03-16 22:34:50 +01:00
Florimond Manca
43ec09c3cb
Fix type checking breakage (#865) 2020-03-15 10:30:58 +01:00
Tom Christie
a82adcc933
Update CHANGELOG.md (#854) 2020-03-09 14:51:04 +00:00
Tom Christie
6e40c1b26a
Version 0.12 (#852)
* Version 0.12

* Update docs to reference 0.12
2020-03-09 10:18:34 +00:00
Tom Christie
970886629d
Version 0.12 (#849)
* Version 0.12

* Tweak whicespacing
2020-03-06 09:10:50 +00:00
Tom Christie
ae45c23cc5
Do not mark wheel as universal (#851) 2020-03-05 12:56:47 +00:00
Evan Lurvey
707e54c484
Enable NO_PROXY environment variable support (#835)
* Enabling NO_PROXY env support

* Enabling NO_PROXY env var support and writing tests

* Update tests/client/test_proxies.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update tests/client/test_proxies.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-03-02 16:51:34 +01:00
Tom Christie
3333152b54
Don't support broken dict-of-dicts case for data argument (#811) 2020-03-02 10:34:04 +00:00
Florimond Manca
7256366ba9
Revamp docs on Client instances (#836)
* Revamp docs on Client instances

* Apply suggestions from code review

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Reword 'Why use a Client?' section

* Apply suggestions from code review

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-03-01 21:38:01 +01:00
Yeray Diaz Diaz
112fb9c07d
Remove proxies from Request docstring (#839) 2020-03-01 20:34:16 +01:00
Florimond Manca
53804173bb
Drop backend parameter on AsyncClient (#791)
* Drop backend parameter on AsyncClient

* Fix master merge

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-02-27 20:42:18 +00:00
Tom Christie
2714f32238
Close proxy dispatch classes on Client.close() (#826) 2020-02-27 20:41:28 +00:00
zueve
19555f6103
Forward cert param to SSLConf if verify=False (#796) 2020-02-27 11:32:10 +00:00
Piotr Staroszczyk
50d337e807
When setting headers, fallback to utf-8 if no encoding is specified yet. (#820)
* Headers: fallback to utf8 encoding

* Headers.__setitem__: use utf8 only if encoding is not set
2020-02-24 12:29:51 +00:00
Piotr Staroszczyk
efe9f61bc2
Drop RedirectLoop exception (#819)
* drop RedirectLoop exception

* tests is package to allow run it easly

* bring back test for redirect loop
2020-02-24 10:09:52 +00:00
Tom Christie
db33c071e1
Add 'chat' to docs (#818) 2020-02-19 11:38:14 +00:00
Primož Godec
3e12fd0656
Adding NetworkError to __init__ (#814) 2020-02-12 15:19:48 +00:00
George Kettleborough
b3db9ff0b6
Add Auth.requires_response_body attribute (#803)
* Add Auth.requires_response_body attribute

If set then responses are read by the client before being sent back into the auth flow

* Update tests and docs

* PR fixes

* Change example methods
2020-02-10 12:10:11 +00:00
Colin Bounouar
cfe2278096
Document that iter_* methods are synchronous (#807) 2020-02-06 13:40:42 +01:00
Florimond Manca
6614831739
Use a base_url in app dispatcher examples (#799) 2020-02-03 13:05:56 +01:00
Florimond Manca
82dc6f32f8 Switch to private module names (#785)
* Rename modules

* Update names in package

* Fix tests

* Review docs
2020-01-28 14:34:43 +00:00
Tim Gates
c2eb0bd40f Fix simple typo: conncurrent -> concurrent (#793)
Closes #792
2020-01-26 01:24:41 -05:00
Jung Sang-jun
b1e99a5cf9 Fix ProxyMode for code in dispatch/proxy_http (#788)
FORWARD_ONLY seems correct
2020-01-22 10:50:06 +00:00
Yeray Diaz Diaz
b23420392e
Detect credentials in proxy URLs and create Proxy-authorization header (#780)
* Detect auth in proxy URLs and create Proxy-authorization header

* Add credentials and SOCKS details to proxy documentation

* Use URL.copy_with to remove credentials from URL
2020-01-20 13:50:50 +00:00
Tom Christie
b128bfaf21
Version 0.11.1 (#773)
* Version 0.11.1

* Update changelog

* Update CHANGELOG.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-17 21:31:56 +00:00
Tom Christie
1f8fb28d93
Handle redirect with malformed Location headers missing host. (#774) 2020-01-17 11:42:51 +00:00