Ngiri

Latest version: v0.0.3

Safety actively analyzes 688512 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 13

0.12.0

The 0.12 release tightens up the API expectations for `ngiri` by switching to private module names to enforce better clarity around public API.

All imports of `ngiri` should import from the top-level package only, such as `from ngiri import Request`, rather than importing from privately namespaced modules such as `from ngiri._models import Request`.

Added

* Support making response body available to auth classes with `.requires_response_body`. (Pull 803)
* Export `NetworkError` exception. (Pull 814)
* Add support for `NO_PROXY` environment variable. (Pull 835)

Changed

* Switched to private module names. (Pull 785)
* Drop redirect looping detection and the `RedirectLoop` exception, instead using `TooManyRedirects`. (Pull 819)
* Drop `backend=...` parameter on `AsyncClient`, in favour of always autodetecting `trio`/`asyncio`. (Pull 791)

Fixed

* Support basic auth credentials in proxy URLs. (Pull 780)
* Fix `ngiri.Proxy(url, mode="FORWARD_ONLY")` configuration. (Pull 788)
* Fallback to setting headers as UTF-8 if no encoding is specified. (Pull 820)
* Close proxy dispatches classes on client close. (Pull 826)
* Support custom `cert` parameters even if `verify=False`. (Pull 796)
* Don't support invalid dict-of-dicts form data in `data=...`. (Pull 811)

---

0.11.1

Fixed

* Fixed usage of `proxies=...` on `Client()`. (Pull 763)
* Support both `zlib` and `deflate` style encodings on `Content-Encoding: deflate`. (Pull 758)
* Fix for streaming a redirect response body with `allow_redirects=False`. (Pull 766)
* Handle redirect with malformed Location headers missing host. (Pull 774)

0.11.0

The 0.11 release reintroduces our sync support, so that `ngiri` now supports both a standard thread-concurrency API, and an async API.

Existing async `ngiri` users that are upgrading to 0.11 should ensure that:

* Async codebases should always use a client instance to make requests, instead of the top-level API.
* The async client is named as `ngiri.AsyncClient()`, instead of `ngiri.Client()`.
* When instantiating proxy configurations use the `ngiri.Proxy()` class, instead of the previous `ngiri.HTTPProxy()`. This new configuration class works for configuring both sync and async clients.

We believe the API is now pretty much stable, and are aiming for a 1.0 release sometime on or before April 2020.

Changed

- Top level API such as `ngiri.get(url, ...)`, `ngiri.post(url, ...)`, `ngiri.request(method, url, ...)` becomes synchronous.
- Added `ngiri.Client()` for synchronous clients, with `ngiri.AsyncClient` being used for async clients.
- Switched to `proxies=ngiri.Proxy(...)` for proxy configuration.
- Network connection errors are wrapped in `ngiri.NetworkError`, rather than exposing lower-level exception types directly.

Removed

- The `request.url.origin` property and `ngiri.Origin` class are no longer available.
- The per-request `cert`, `verify`, and `trust_env` arguments are escalated from raising errors if used, to no longer being available. These arguments should be used on a per-client instance instead, or in the top-level API.
- The `stream` argument has escalated from raising an error when used, to no longer being available. Use the `client.stream(...)` or `ngiri.stream()` streaming API instead.

Fixed

- Redirect loop detection matches against `(method, url)` rather than `url`. (Pull 734)

---

0.10.1

Fixed

- Fix issue with concurrent connection acquiry. (Pull 700)
- Fix write error on closing HTTP/2 connections. (Pull 699)

0.10.0

The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces.

In particular with streaming responses the `response.read()` method becomes `response.aread()`, and the `response.close()` method becomes `response.aclose()`.

If following redirects explicitly the `response.next()` method becomes `response.anext()`.

Fixed

- End HTTP/2 streams immediately on no-body requests, rather than sending an empty body message. (Pull 682)
- Improve typing for `Response.request`: switch from `Optional[Request]` to `Request`. (Pull 666)
- `Response.elapsed` now reflects the entire download time. (Pull 687, 692)

Changed

- Added `AsyncClient` as a synonym for `Client`. (Pull 680)
- Switch to `response.aread()` for conditionally reading streaming responses. (Pull 674)
- Switch to `response.aclose()` and `client.aclose()` for explicit closing. (Pull 674, 675)
- Switch to `response.anext()` for resolving the next redirect response. (Pull 676)

Removed

- When using a client instance, the per-request usage of `verify`, `cert`, and `trust_env` have now escalated from raising a warning to raising an error. You should set these arguments on the client instead. (Pull 617)
- Removed the undocumented `request.read()`, since end users should not require it.

---

0.9.5

Fixed

- Fix Host header and HSTS rewrites when an explicit `:80` port is included in URL. (Pull 649)
- Query Params on the URL string are merged with any `params=...` argument. (Pull 653)
- More robust behavior when closing connections. (Pull 640)
- More robust behavior when handling HTTP/2 headers with trailing whitespace. (Pull 637)
- Allow any explicit `Content-Type` header to take precedence over the encoding default. (Pull 633)

Page 8 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.