Commit Graph

308 Commits

Author SHA1 Message Date
Saugat Pachhai
23f11aaa8d Use chained comparison in status codes for error and success 2019-08-17 09:07:57 -05:00
Saugat Pachhai
3451028251 Fix typos in docstrings 2019-08-17 09:07:57 -05:00
euri10
e64fcad3b4 Add --diff flag to Black for easier debugging (#219) 2019-08-16 09:18:52 -05:00
euri10
cad9c03500 Added links property to BaseResponse (#211)
* Added docstring and better typing for parsed_header_links

* Added docstring and better typing for links property
Added tests for it too

* Added --diff to black check to see where CI fails
Relaxed travis build on master only

* Fixed black issue removing a \t

* Put noxfile and travis.yml as they were before
2019-08-16 09:07:52 -05:00
Seth Michael Larson
df8874b733
Accept SSLContext into SSLConfig(verify=...) (#215) 2019-08-14 22:30:02 -05:00
Seth Michael Larson
af907e85e1
Implement Response.stream_text() (#183) 2019-08-14 21:56:17 -05:00
Can Sarıgöl
9536b76f5c Fail unit tests without 100% coverage (#206) 2019-08-14 21:45:28 -05:00
Can Sarıgöl
45177d2cd8 Rely on IRIReference.encode() for IDNA encoding (#210) 2019-08-14 21:38:43 -05:00
Humberto Rocha
7156c36eb3 Add additional info to Contributing Guide (#213) 2019-08-14 21:37:44 -05:00
Can Sarıgöl
c5248e6c20 Run SSLConfig cert loading in threadpool (#209) 2019-08-14 21:30:01 -05:00
Tammo Behrends
bebedcbd5d Explicitly check is_redirect in simple test case (#208) 2019-08-14 06:22:12 -05:00
Humberto Rocha
e51b2125c9 Move all tooling configuration to setup.cfg (#204) 2019-08-13 16:27:00 -05:00
Can Sarıgöl
1b82d6373b Add flake8-comprehensions to nox check task (#200)
* fixed as flake8-comprehensions

* added site folder into gitignore
2019-08-13 09:22:18 -05:00
Seth Michael Larson
80dc3e274e
Use nox for automation and CI (#128) 2019-08-13 08:39:35 -05:00
Yeray Diaz Diaz
95dad247b5 Remove "Host" header on redirects if URL origin has changed (#199)
Fixes #198

* Reinstate accidentally removed return statement
2019-08-13 06:44:23 -05:00
Quentin Pradet
ebbc003c55 Fix invalid Content-Encoding header test (#197) 2019-08-09 08:10:59 -05:00
Stephen Brown II
fde30b8d14 Use pathlib.Path instead of os.path functions (#188) 2019-08-08 21:42:25 -05:00
Andreas Bernacca
de91fdfa16 Ignore Content-Encoding headers that are invalid (#196) 2019-08-08 21:33:55 -05:00
Humberto Rocha
079ab33c12 Create a Contributing page in the documentation (#190) 2019-08-06 16:52:54 -05:00
Andrew M. White
c7a5ce7dff Enable mypy to discover type hints as specified in PEP 561 (#194) 2019-08-06 12:18:34 -05:00
Can Sarıgöl
625ad127cc Check ~/.netrc and ~/_netrc files by default (#189) 2019-08-06 08:31:04 -05:00
halbow
92fbe5fd87 Added base class HTTPError with request/response attribute (#162) 2019-08-06 08:20:48 -05:00
Seth Michael Larson
9142a893ff Move HSTS preload checking to client (#184) 2019-08-01 10:26:45 +01:00
Can Sarıgöl
919e8d3f9b added netrc support (#177) 2019-08-01 09:32:00 +01:00
Seth Michael Larson
d1b1d35b5b
Convert DataEvent.data from bytearray to bytes (#182) 2019-07-31 18:27:10 -05:00
Stephen Brown II
40849bffcb Update IDNA encoding to 2008 spec (#161)
* Update IDNA encoding to 2008 spec

* Add Unicode IDNA Compatibility Processing

* Parametrize idna test

* Use rfc3986 iri_reference for IDNA names

* Add test for IRI object

* Remove test_iri as this interface has been removed
2019-07-31 14:41:40 +01:00
Tom Christie
66754ad0c5
Tweak query param types (#175)
* Tweak query param types

* Handle primitive data types for queryparams

* QueryParam keys as str-only, not PrimitiveData
2019-07-31 00:27:20 +01:00
Seth Michael Larson
33822973c3
Expose base classes for alternate backends (#178) 2019-07-30 17:47:44 -05:00
Tom Christie
db6731a3d2 Remove 'URIReference' from public interfaces (#170) 2019-07-29 19:46:15 -05:00
Nik
fb17459335 Fixed multipart header params encoding (#167) 2019-07-28 22:16:37 -05:00
Stephen Brown II
44beaa1c8f Make Origin use scheme, not is_ssl (#168) 2019-07-28 21:43:06 -05:00
Stephen Brown II
72e6f47897 Allow setting headers at the Client level (#159) 2019-07-28 20:39:35 -05:00
Seth Michael Larson
3ba2e8c328
Switch hosts on HSTS preload to HTTPS (#151) 2019-07-28 12:02:21 -05:00
Can Sarıgöl
7e9110b978 Add additional flake8 plugins (#157) 2019-07-28 11:40:05 -05:00
halbow
2cc8beabfc Added support for Google's Brotli library (#156)
* Ignore coverage for brotli decompression

* Updated assert comment for brotli and brotlipy
2019-07-27 11:32:01 -05:00
halbow
f974ebd93e Removed deprecated TLS versions (#155) 2019-07-27 00:03:12 -05:00
Tom Christie
00e4fdb05d Fix URL.join(...) (#144) 2019-07-25 17:01:03 -05:00
Tom Christie
77cf336eab Version 0.6.8 2019-07-25 22:53:31 +01:00
Tom Christie
ec365c0e8e
Check disconnections on connection reacquiry (#145)
* Detect EOF signaling remote server closed connection

Raise ConnectionClosedByRemote and handle on `send`

* Fix linting

* Use existing NotConnected exception

* Add `Reader.is_connection_dropped` method

* Check connection before sending h11 events as well

* Add test covering connection lost before reading response content

* Check for connection closed on acquiring it from the pool

* Clean up ConnectionPool logic around reaquiry of connections
2019-07-25 22:52:41 +01:00
Stephen Brown II
8db36ed6a5 Allow string comparison for URL().__eq__ (#139) 2019-07-24 16:28:16 +01:00
Stephen Brown II
37df46a83b Additional HTTP Status Codes 418, 451 (#135) 2019-07-22 15:13:00 -05:00
Tom Christie
edd702955e
Update README.md 2019-07-19 15:44:17 +01:00
Tom Christie
7511d7a562
Update README.md 2019-07-19 15:43:04 +01:00
Tom Christie
04501424cd
Update README.md 2019-07-19 15:41:18 +01:00
Tom Christie
890a800b9b
Update README.md 2019-07-19 15:40:32 +01:00
Tom Christie
f7c5378ebd
Update README.md 2019-07-19 15:38:53 +01:00
Tom Christie
44759609aa
Update README.md 2019-07-19 15:38:08 +01:00
Tom Christie
0f54645f95
Update README.md 2019-07-19 15:37:25 +01:00
Tom Christie
95db220e22
Update README.md 2019-07-19 15:37:02 +01:00
Tom Christie
17bb165042
Branding updates for httpx (#130) 2019-07-19 15:36:36 +01:00