Twirp

Latest version: v0.0.7

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

Scan your dependencies

Page 5 of 7

5.3.0

This release includes the following changes:
- Generated code no longer logs with the standard library's `log` package under any circumstances. Previously, it would log in rare cases like when failing to write a complete error body back to clients or when failing to close request bodies. Now, those circumstances trigger an Error hook if it hasn't already been triggered once during handling of the request.
(dfbd75ae3c12b7f8c9a355f582b635cf77c4645a)
- Generated Go clients now set an `Accept` header in requests. The JSON client sets `application/json`, and the Protobuf client sets `application/protobuf`. This should make generated clients work more smoothly with API gateways. Servers don't do any particular handling with this new header and it is not required by the Twirp spec, but it's recommended that clients set it in other language implementations as well.
(f91c5c69fd3b0f2bc8fd263b1dae3a67073fd9f0)
- Generated Python clients now work with Python 3.
(dbf7a0df8630b787da395fee3facdfb7ef5c38ce)

5.2.0

This release includes the following changes:

- Context values describing the requested service, package, and method are now
available to HTTPClients passed to generated Twirp clients.
(a22cc722f7feaeb12b7768699bf5e202464fa4b0)

- Generated clients no longer emit logs to the standard library logger under any
circumstances. Instead, they will return any error encountered closing an HTTP
response body if they found no other errors during the request. If they hit
other errors, then HTTP response body close errors are ignored.
(c0c435531e9a1787cec6159bd6262bcf5aa48bea)

- Handling of Content-Type headers with name=value pairs after the
MIME type is now correct.
(2067a95fa595ef8d484d02bdab04c922479a2225)

- The vendor directory is now committed. This should make installation of
protoc-gen-twirp more straightforward.
(2642ca800080894c36e3457b9a1603e4ee752eba)

5.1.0

Release v5.1.0 improves the flexibility of client constructors. It also fixes some typos, fixes a bug in the generator, and makes minor performance improvements.

Generated client constructors now accept an interface, `type HTTPClient interface { Do(*http.Request) (*http.Response, error) }` instead of the concrete type `*http.Client`. This lets users provide clients that smartly retry or use custom service discovery systems. It should be backwards compatible, as `*http.Client` fulfills that interface and can still be plugged in without changes. This is 39, and was proposed and designed in 12.

Generated servers will avoid an unnecessary string concatenation when handling requests; the string is now precomputed. This is 53.

Code generation now works correctly if a proto file imports another proto file found in the same directory. This was 15, fixed in 47.

36 and 44 fixed typos in documenting comments and error messages.


All associated PRs bundled into this release can be tracked found here: https://github.com/twitchtv/twirp/pulls?q=is%3Apr+is%3Aclosed+milestone%3Av5.1.0

5.0.0

This is the first public release of Twirp. Hooray!

0.0.7

Not secure
What's Changed
* Support proto3 field presence by sarahegler in https://github.com/verloop/twirpy/pull/38
* Add an example for optional field by ofpiyush in https://github.com/verloop/twirpy/pull/39

New Contributors
* sarahegler made their first contribution in https://github.com/verloop/twirpy/pull/38

**Full Changelog**: https://github.com/verloop/twirpy/compare/0.0.6...0.0.7

0.0.6

Not secure
What's Changed
* Handle request decode errors by chadawagner in https://github.com/verloop/twirpy/pull/37


**Full Changelog**: https://github.com/verloop/twirpy/compare/0.0.5...0.0.6

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.