Uplink

Latest version: v0.9.7

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

Scan your dependencies

Page 2 of 5

0.9.2

====================
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`_)

0.9.1

===================
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`_)

0.9.0

===================
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
-------
- Rename ``uplink.retry.stop.DISABLE`` to ``uplink.retry.stop.NEVER``

0.8.0

===================
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`_)

0.7.0

===================
Added
-----
- ``Consumer.exceptions`` property for handling common client exceptions in a
client-agnostic way. (`117 <https://github.com/prkumar/uplink/pull/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 <https://github.com/prkumar/uplink/pull/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 <https://github.com/prkumar/uplink/pull/126>`_ by
`nphilipp <https://github.com/nphilipp>`_)

Fixed
-----
- Support for changes to ``Schema().load`` and ``Schema().dump`` in
``marshmallow`` v3.
(`109 <https://github.com/prkumar/uplink/pull/109>`_)

0.6.1

==================
Changed
-------
- When the ``type`` parameter of a function argument annotation, such as
``Query`` or ``Body``, is omitted, the type of the annotated argument's
value is no longer used to determine how to convert the value before it's
passed to the backing client; the argument's value is converted only when
its ``type`` is explicitly set.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.