Commit Graph

693 Commits

Author SHA1 Message Date
Tom Christie
ba073c8a46
Clean up docs scripts (#953)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-05-15 20:49:08 +01:00
Tom Christie
0a8b0c65bd
Enforce coverage (#955)
* Enforce coverage when running tests

* Enforce test coverage
2020-05-15 16:17:33 +01:00
Tom Christie
51b70b3fca
If scripts/check fails then prompt and autofix. (#952)
* If scripts/check fails then prompt and autofix

* Update scripts/test

Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>

* Update test

Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
2020-05-15 13:22:46 +01:00
Yeray Diaz Diaz
790a3ead5d
Document pool_limits and SSL context on verify (#942)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-05-13 11:53:35 +01:00
Tom Christie
d6b3794395
Attempt to resolve test flakiness (#946) 2020-05-12 16:02:25 +01:00
Tom Christie
97d488a95c
Version 0.13.0.dev2 (#941)
* Update __version__.py

* Update CHANGELOG.md

* Update setup.py

* Update CHANGELOG.md
2020-05-12 10:20:22 +01:00
Jamie Hewland
d568ecda53
ASGI: Wait for response to complete before sending disconnect message (#919)
* asgi: Wait for response to complete before sending disconnect message

* Dial back type checking + remove concurrency module

* Remove somewhat redundant comment
2020-05-12 10:06:53 +01:00
Yeray Diaz Diaz
560b119d32
Version 0.13.0.dev1 (#935) 2020-05-06 15:49:00 +01:00
Yeray Diaz Diaz
4af3dd7abc
Pass http2 flag to proxy dispatch (#934) 2020-05-06 15:08:38 +01:00
Yeray Diaz Diaz
afbd4c846a
Document dev proxy setup (#933) 2020-05-06 12:11:05 +01:00
Tom Christie
d34c89a819
Update test-suite.yml (#925)
Run Test Suite on commits to master.
2020-05-04 12:52:23 +01:00
Florimond Manca
8c182e271f
Mark Response.json() as returning Any (#923) 2020-05-02 14:29:56 +02:00
Ryan Balfanz
3b9ebe0523
Fix small typo (#920) 2020-05-01 20:37:01 +02:00
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