Skip to content

Releases: prkumar/uplink

v0.9.7

12 Mar 04:12
3740377
Compare
Choose a tag to compare

Fixed

  • Fix behavior of async @response_handler with AiohttpClient. (#256)

v0.9.6

24 Jan 20:09
bab3a02
Compare
Choose a tag to compare

Added

  • Add a new base class, uplink.retry.RetryBackoff, which can be extended to
    implement custom backoff strategies. An instance of a RetryBackoff subclass
    can be provided through the backoff argument of the @retry decorator.
    (#238)

Changed

  • Bump minimum version of six to 1.13.0. (#246)

Fixed

  • Fix @returns.json to cast JSON response (or field referenced by the key
    argument) using the type argument when the given type is callable. This
    restores behavior that was inadvertently changed in v0.9.3. (#215)
  • Remove all usages of asyncio.coroutine in the library code to fix warnings
    related to the function's deprecation in Python 3.8+. (#203)

v0.9.5

04 Jan 09:17
a013758
Compare
Choose a tag to compare

Added

  • Add Python 3.8, 3.9, and 3.10 as officially supported. (#237)

Fixed

  • Fix FieldMap and PartMap from raising NoneType error. (#221)
  • Fix Python 2.7 support. (#217)

Deprecated

  • Python 2.7 support will be removed in v0.10.0.

v0.9.4

15 Feb 20:29
1649e43
Compare
Choose a tag to compare

Fixed

  • A type set as a consumer method's return annotation should not be used to
    deserialize a response object if no registered converters can handle the type.
    (3653a672ee)

v0.9.3

22 Nov 21:53
e84e10c
Compare
Choose a tag to compare

Added

  • Support for serialization using a subclass of pydantic_'s BaseModel that contains fields of a complex type, such as datetime.
  • Support for passing a subclass of pydantic's BaseModel as the request body.

v0.9.2

18 Oct 00:02
73ea8ae
Compare
Choose a tag to compare

Added

  • Support for (de)serializing subclasses of pydantic's BaseModel
    (#200 by @gmcrocetti)

Fixed

  • Using the @get, @post, @patch, etc. decorators should retain the
    docstring of the wrapped method (#198)
  • The Body and Part argument annotations should support uploading binary
    data (#180, #183, #204)

v0.9.1

08 Feb 09:02
be2b3ac
Compare
Choose a tag to compare

Fixed

  • Omit Header argument from request when its value is None.
    (#167, #169)
  • Fix AttributeError raised on usage of uplink.Url.
    (#164, #165 by @cognifloyd)

Changed

  • Exclude tests subpackages from wheel.
    (#188 by @daa)

v0.9.0

06 Jun 06:15
ff72f3f
Compare
Choose a tag to compare

Added

  • Create consumer method templates to reduce boilerplate in request
    definitions. (#151, #159)
  • Context argument annotation to pass request-specific information to
    middleware. (#143, #155)
  • Session.context property to pass session-specific information to
    middleware. (#143, #155)
  • Built-in authentication support for API tokens in the querystring
    and header, Bearer tokens, and multi-auth. (#137)

Fixed

  • Schema defined using @returns.* decorators should override the
    consumer method's return annotation. (#144, #154)
  • @returns.* decorators should propagate to all consumer method when used
    as a class decorator. (#145, #154)
  • Decorating a Consumer subclass no longer affects other subclasses. (#152)

Changed

  • Renamed uplink.retry.stop.DISABLE to uplink.retry.stop.NEVER

v0.8.0

13 Mar 05:52
ac0f1b2
Compare
Choose a tag to compare

Added

  • A retry decorator to enable reattempts of failed requests. (#132)
  • A ratelimit decorator to constrain consumers to making some maximum number
    of calls within a given time period. (#132)
  • Timeout argument annotation to be able to pass the timeout as a consumer
    method argument or to inject it as a transaction hook using a Consumer
    instance's _inject method. (#133 by @daa)

Changed

  • Consumer subclasses now inherit class decorators from their
    Consumer parents, so those decorators are also applied to the subclasses'
    methods that are decorated with @get, @post, @patch, etc.
    (#138 by @daa)

Fixed

  • Memory leaks in RequestsClient and AiohttpClient caused by
    use of atexit.register, which was holding references to session objects
    and preventing the garbage collector from freeing memory reserved for those
    objects. (#134 by @SakornW)

v0.7.0

07 Dec 00:13
adabcbf
Compare
Choose a tag to compare

Added

  • Consumer.exceptions property for handling common client exceptions in a client-agnostic way. (#117)
  • Optional argument requires_consumer for response_handler and error_handler; when set to True, the registered callback should accept a reference to a Consumer instance as its leading argument. (#118)

Changed

  • For a Query-annotated argument, a None value indicates that the query parameter should be excluded from the request. Previous behavior was to encode the parameter as ...?name=None. To retain this behavior, specify the new encode_none parameter (i.e., Query(..., encode_none="None")). (#126 by @nphilipp)

Fixed

  • Support for changes to Schema().load and Schema().dump in marshmallow v3. (#109)