Commit Graph

32 Commits

Author SHA1 Message Date
Alex
6d852d319a
Fix client.send() timeout new Request instance (#3116) 2024-02-26 16:36:58 +00:00
Thomas Grainger
e27d1b8333
replace pytest-asyncio and pytest-trio with anyio (#2512)
* replace pytest-asyncio with anyio

* remove pytest-trio also

* Update setup.cfg

* use anyio.Lock in test_auth

Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:53:30 +00:00
Tom Christie
61188feeae
Version 0.21 (#1935)
* Integrate with httpcore 0.14

* Fix pool timeout test

* Add request extensions to API

* Add certificate and connection info to client, using 'trace' extension

* Fix test_pool_timeout flakiness
2021-11-15 14:30:54 +00:00
Antonio Larrosa
77193b2ab6
Add a network pytest mark for tests that use the network (#1669)
* Add a network pytest mark for tests that use the network

Sometimes it's useful to have the tests that use the network
marked so they can be skipped easily when we know the network
is not available.

This is useful for example on SUSE and openSUSE's build servers.
When building the httpx packages (actually, any package in the
distribution) the network is disabled so we can assure
reproducible builds (among other benefits). With this mark, it's
easier to skip tests that can not succeed.

* Add a better explanation for the network marker

Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>

Co-authored-by: Joe <nigelchiang@outlook.com>
Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-08-13 14:13:43 +01:00
Tom Christie
f932af9172
Version 0.15.0 (#1301)
* Version 0.15.0

* Update CHANGELOG.md

Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>

* Escalate deprecations into removals.

* Deprecate overly verbose timeout parameter names

* Fully deprecate max_keepalive in favour of explicit max_keepalive_connections

* Fully deprecate PoolLimits in favour of Limits

* Deprecate instantiating 'Timeout' without fully explicit values

* Include deprecation notes in changelog

* Use httpcore 0.11.x

Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>
2020-09-22 11:44:28 +01:00
Tom Christie
feb404f86b
Seperate content=... and data=... parameters (#1266)
* Seperate content=... and data=... parameters

* Update compatibility.md
2020-09-15 13:36:10 +01:00
Florimond Manca
f67e925f72
Rename PoolLimits to Limits (#1113)
* Rename PoolLimits to Limits

* Lint

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-01 20:44:58 +01:00
Florimond Manca
26cd4f54e8
Switch to more concise Timeout parameters (#1111)
* Switch to more concise Timeout parameters

* Update docs

* Rename attributes

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-01 19:59:01 +01:00
Tom Christie
dba83d45a5
httpx.Timeout must include a default (#1085)
* httpx.Timeout must include a default

* Tweak docstring

* Gentle deprecation for mandatory default on httpx.Timeout(...)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-07-31 11:41:53 +01:00
Josep Cugat
89a8100b6c
Replace remaining occurrences of dispatch with transport (#1010)
* Replace remaining occurrences of dispatch with transport

* Remove unused AsyncDispatcher

Was removed in #804

* Remove hard_limit warning in test
2020-05-30 23:18:48 +02:00
Florimond Manca
e284b84bf9 Rename Client to AsyncClient (with compat synonym) (#680)
* Rename Client to AsyncClient (with compat synonym)

* Document motivation for AsyncClient renaming

Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:34:23 +00:00
Florimond Manca
d0427bead0
Clean up 'backend' fixture (#664)
* Clean up 'backend' fixture

* Add docstring to 'async_environment' fixture
2019-12-21 16:08:40 +01:00
Florimond Manca
ab41a5d5c3
Refactor tests in the light of backend auto-detection (#615)
* Refactor tests in the light of backend auto-detection

* Test passing explicit backend separately

* Drop 'backend=backend'

* Fix usage of asyncio.run() on 3.6
2019-12-07 15:17:35 +01:00
Tom Christie
d15dc0b1f8
Tighten up top-level API to only expose public API (#608)
* Tighten up top-level API to only expose public API

* Leave HTTPProxyMode for backwards compat, raising warnings.

* Add missing import
2019-12-06 15:20:01 +00:00
Tom Christie
8d8ea8bbba
Add Client.stream() method. (#600)
* Add Client.stream() method.

* Add top-level stream API

* Documentation
2019-12-05 17:25:43 +00:00
Tom Christie
c033ed1b65
TimeoutConfig -> Timeout (#591) 2019-12-04 11:39:45 +00:00
Tom Christie
364378a814
Pool timeouts should be on the TimeoutConfig, not PoolLimits (#563)
* Pool timeouts should be on the TimeoutConfig, not PoolLimits

* Linting

* Fix type annotation

* Linting
2019-11-29 12:01:51 +00:00
Tom Christie
206c5372a6
Drop sync (#544)
Drop sync client
2019-11-27 10:43:42 +00:00
Florimond Manca
cadb9a4d4c Fix bug when using client without timeouts in Python 3.6 (#383) 2019-09-25 06:31:50 -05:00
Florimond Manca
08355c62f5 Add trio concurrency backend (#276) 2019-09-21 11:10:20 -05:00
Bakhtiyor Ruziev
e34d280673 Add server.url property in tests (#300)
* Add server.url to test server

* Move a property to top of the class
2019-09-01 09:07:22 +02:00
Florimond Manca
3674058ff7
Parametrize tests with concurrency backend (#273)
* Parametrize tests with concurrency backend

* Refactor server restart

* Add no-backend test
2019-08-25 20:25:18 +02:00
Tom Christie
2d09d5b36c
Renaming -> httpx (#129)
* Renaming -> httpx

* Renaming to httpx
2019-07-19 15:15:16 +01:00
Tom Christie
c9747aa357
http3 (#86)
* Start fleshing out documentation

* Docs work

* http3

* Update docs

* Include lowercase status codes, for requests compat

* Updating docs

* Docs tweaks
2019-06-12 15:02:16 +01:00
Tom Christie
feae0a895d
Cookie support (#73)
* Initial pass at cookie support
* Add Cookies model
* Support cookie persistence
2019-05-17 12:51:00 +01:00
Tom Christie
fc16d31d62
100% test coverage (#71) 2019-05-16 11:14:21 +01:00
Yeray Diaz Diaz
b8b3714d8e Add test for write timeout error (#67)
* Add test for write timeout error
* Bump up write data 10x
2019-05-16 11:00:45 +01:00
Tom Christie
8627b62863 Switch to sync-by-default 2019-05-13 13:48:08 +01:00
Tom Christie
6b60d95a4d Truckin' on 2019-05-01 14:35:23 +01:00
Tom Christie
fab6fcd397 Adapters 2019-04-26 15:34:04 +01:00
Tom Christie
74c9048ba2 Add ConnectTimeout test 2019-04-18 09:38:29 +01:00
Tom Christie
148818c212 Add PoolTimeout, and timeout tests 2019-04-17 17:38:03 +01:00