Skip to content

Conversation

@kossman
Copy link
Contributor

@kossman kossman commented Sep 10, 2025

Rationale

The PythonSDK is currently using an outdated version of Pydantic by default. Based on benchmarks, the latest version of the library offers up to 100x faster JSON serialization and deserialization.

Changes

This PR completes DEVC-1282 by migrating the SDK codebase to Pydantic v2, updating validators and type annotations to align with the new API, ensuring compatibility with Python 3.9–3.13, and fixing/porting the test suite. It also bumps the minor version and applies linting fixes.

Also included changes for revamp Redis PR

Tasks:
DEVC-1282
DEVC-1286

@kossman kossman self-assigned this Sep 10, 2025
@kossman kossman marked this pull request as ready for review September 11, 2025 12:57
@kossman kossman changed the title Feature/devc 1282 migrate to pydantic v2 feature(DEVC-1282): migrate SDK to pydantic v2 Sep 11, 2025
Copy link
Contributor

@YevherniiFeshchenko YevherniiFeshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kossman kossman changed the title feature(DEVC-1282): migrate SDK to pydantic v2 feat(DEVC-1282): migrate SDK to pydantic v2 Sep 18, 2025
kossman and others added 2 commits September 24, 2025 15:23
- upgrade redis version for test server
- bump bunch of related third party dependencies:
  - fakeredis[lua] -> removed prefix LUA
  - redis == 6.2.0 latest supported with Python3.9+
  - types-redis~=4.6.0
- removed:
  - all LUA bindings from RedisRepository
  - use_lua_52
  - vacuum(...) and dependant codes
  - InternalCacheSdkProtocol
  - InternalRedisSdk
  - FakeInternalCacheSdk
  - DeprecatedRedisAdapter
- Add migration logic
@kossman kossman mentioned this pull request Sep 24, 2025
1 task
@kossman kossman changed the title feat(DEVC-1282): migrate SDK to pydantic v2 feat(DEVC-1282): migrate SDK to v2 Sep 24, 2025
@kossman kossman merged commit 360b922 into master Sep 24, 2025
14 checks passed
@kossman kossman deleted the feature/DEVC-1282-migrate-to-pydantic-v2 branch September 24, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants