Skip to content

Releases: Toloka/toloka-kit

v1.2.2

26 Oct 15:53
c944855
Compare
Choose a tag to compare

Changes:

  • Updated Apps API-related TolokaClient and AsyncTolokaClient methods to support new features.

v1.2.1

25 Aug 14:16
fd4bbe7
Compare
Choose a tag to compare

Python versions support:

  • Python 3.7 support dropped

Changes:

  • Updated TolokaClient.create_app_items and AsyncTolokaClient.create_app_items to return the list of created app
    items ids.
  • Added tier parameter to TolokaClient.create_pool and AsyncTolokaClient.create_pool methods.

v1.2.0.post1

21 Jun 13:43
a5953c4
Compare
Choose a tag to compare

Bugfixes:

  • Fixed OAuth authorization header generation.

v1.2.0 [YANKED]

19 Jun 13:59
2e1c42a
Compare
Choose a tag to compare

Changes:

  • Changed streaming cursors behavior: now events are processed not sooner than time_lag seconds after they were created. This parameter is configurable, but it is not recommended to decrease the default value of 1 minute as this can lead to some events being skipped. This change affects streaming cursors, cursor-based streaming observers, and some cursor-based metric collectors.

Features:

  • Supported SSO authorization tokens.
  • Added Python 3.11 support
  • TolokaClient.create_task, TolokaClient.create_task_suite and TolokaClient.create_user_bonus now support operation_id parameter.

Fixes:

  • TolokaClient.create_task, TolokaClient.create_task_suite, TolokaClient.create_user_bonus and TolokaClient.create_user_bonus can be safely retried now (previously they could create duplicate items in case of an unstable connection).
  • Previously AsyncTolokaClient could not outlive the asyncio event loop which was used during the first API call, which lead to an inability to pickle AsyncTolokaClient. Now AsyncTolokaClient survives asyncio event loop change.
  • TolokaClient and AsyncTolokaClient follows urllib3 retrying behavior more closely in case of the Retry object being passed to the retry or retryer_factory parameters.
  • Previously streaming cursors could skip some Toloka events when fetching them from the API concurrently with them being created. Now streaming cursors utilize time lag to prevent such concurrent reads.

v1.1.4

24 Feb 10:27
3ecf810
Compare
Choose a tag to compare

Features:

  • Added verify parameter to TolokaClient and AsyncTolokaClient. This parameter controls SSL certificate verification settings.

Bugfixes:

  • Fixed deserialization of legacy Toloka projects bug which was caused by an attempt to parse view spec with empty lock field.

v1.1.3

02 Feb 17:53
bf7884b
Compare
Choose a tag to compare

Bugfixes:

  • Removed upper bound on cattrs version.
  • While structuring objects with unknown spec_value corresponding classes are generated in runtime now. Thus objects like filters, rule actions and others that are not fully documented in api/experimental/removed in past from toloka-kit could be safely structured now.

v1.1.2

26 Jan 11:25
4d338a9
Compare
Choose a tag to compare

Bugfixes:

  • Methods for the batch creation of tasks, task suites or user bonuses could create duplicate items in case of unstable connection:
    • TolokaClient.create_tasks_async, TolokaClient.create_task_suites_async and TolokaClient.create_user_bonuses_async as well as TolokaClient.create_tasks, TolokaClient.create_task_suites with async_mode=True now guaranteed to create not more than one batch of items for a single function call.
    • TolokaClient.create_user_bonuses and TolokaClient.create_user_bonus are guaranteed to create not more than one batch of items for a single function call but may raise an exception if there was an attempt to create the same batch of items for the second time due to the unstable connection.

v1.1.1

20 Jan 12:06
14ae1fc
Compare
Choose a tag to compare

Features:

  • Add batch_size argument to operations that involve returning a generator object to retrieve items in batches.

Bug Fixes:

  • Asynchronous client made pickleable

Changes:

  • Added deprecation warnings when CAPTCHA pool settings are used

v1.1.0.post1

16 Dec 13:28
ce8f419
Compare
Choose a tag to compare

Patch for the 1.1.0 release

Bugfixes:

  • Content-type header is now specified correctly when preforming POST requests with JSON body

v1.1.0 [YANKED]

08 Dec 12:23
e4bb40d
Compare
Choose a tag to compare

Features:

  • AsyncTolokaClient rework. Previously AsyncTolokaClient was a simple wrapper over TolokaClient that provided asynchrony via threading. This lead to poor performance and instability in the case of many concurrent connections. With the current release, AsyncTolokaClient is implemented with native python async code and httpx async networking provider internally, fixing all the above problems.

Deprecated:

  • All AsyncTolokaClient methods returning generators now return async generators. Currently, the old (synchronous) iteration syntax is still supported via an adapter, but we encourage you to switch to the new (asynchronous) one.
    Example:
async_toloka_client = AsyncTolokaClient(...)

# deprecated syntax, support will be dropped in the feature
for assignment in await async_toloka_client.get_assignments(...):
    ...

# recommended syntax
async for assignment in async_toloka_client.get_assignments(...):
    ...

Changes:

  • Toloka-Kit now internally uses httpx library instead of requests.

Bug fixes:

  • TolokaClient.create_task_suites now returns response of the correct type.