Skip to content

Conversation

@strawgate
Copy link
Owner

@strawgate strawgate commented Oct 27, 2025

Summary

Relaxes minimum version constraints for several library dependencies based on compatibility research and testing. This provides broader compatibility while maintaining support for all tested store versions.

Changes

Relaxed Constraints:

  • pymongo: >=4.15.0>=4.0.0 (supports MongoDB 5.0+)
  • elasticsearch: >=9.0.0>=8.0.0 (required for Elasticsearch 8.x)
  • cachetools: >=6.0.0>=5.0.0 (stable API)
  • diskcache: >=5.6.0>=5.0.0 (no breaking changes)

All changes verified through:

  • Research of SDK compatibility documentation
  • Testing with uv sync --resolution=lowest-direct
  • Linting and type checking

Testing

  • ✓ Ruff linting passed
  • ✓ Basedpyright type checking passed
  • ✓ Minimum dependency resolution verified

Fixes #118


Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated optional-dependency version constraints for memory, disk, MongoDB, and Elasticsearch storage backends to support a broader range of library versions.

…ools, and diskcache

Lower minimum versions based on compatibility research:
- pymongo: 4.15.0 → 4.0.0 (supports MongoDB 5.0+)
- elasticsearch: 9.0.0 → 8.0.0 (required for Elasticsearch 8.x)
- cachetools: 6.0.0 → 5.0.0 (stable API)
- diskcache: 5.6.0 → 5.0.0 (no breaking changes)

This provides broader compatibility while maintaining support for the
tested store versions.

Fixes #118

Co-authored-by: William Easton <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

📝 Walkthrough

Walkthrough

Updated Python optional-dependency version constraints across two projects to support older package versions. Minimum versions relaxed for cachetools, diskcache, pymongo, and elasticsearch across both key-value-aio and key-value-sync packages.

Changes

Cohort / File(s) Change Summary
Relaxed optional dependency versions
key-value/key-value-aio/pyproject.toml,
key-value/key-value-sync/pyproject.toml
Updated minimum version constraints: cachetools (>=6.0.0 → >=5.0.0), diskcache (>=5.6.0 → >=5.0.0), pymongo (>=4.15.0 → >=4.0.0), elasticsearch (>=9.0.0 → >=8.0.0)

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning Issue #118 specifies that tests for older store versions should be added before relaxing dependency constraints. The PR summary indicates verification through SDK documentation research and testing with lowest-direct resolution, and mentions that Ruff and Basedpyright checks passed. However, the raw_summary shows only changes to pyproject.toml files with no new test files added for older store versions. The linked issue's primary requirement—adding tests for older stores—does not appear to be met by the changes in this PR. To satisfy the requirements in issue #118, this PR should include tests for older store versions (for pymongo, elasticsearch, cachetools, and diskcache) similar to the existing Redis tests mentioned in the issue. Without these tests, the dependency constraint relaxation is done without the safety verification that the issue requirements mandate. Either add the required test files or update the issue to reflect that constraints can be relaxed based on SDK documentation and dependency resolution testing instead.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: relax dependency constraints for pymongo, elasticsearch, cachetools, and diskcache" directly and accurately summarizes the main change in the changeset. The title is concise, specific, and clearly communicates that the PR loosens version constraints for four specific dependencies. It avoids vague terminology and provides meaningful information about what the changeset accomplishes.
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly related to the stated objective of relaxing dependency constraints. The modifications are limited to version constraint updates in two pyproject.toml files (key-value-aio and key-value-sync) for the four specified dependencies. No alterations to exported/public entities, code logic, or unrelated changes are present.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-118-20251026-2326

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d58fe24 and 663893f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • key-value/key-value-aio/pyproject.toml (1 hunks)
  • key-value/key-value-sync/pyproject.toml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
key-value/key-value-sync/**

📄 CodeRabbit inference engine (AGENTS.md)

Never edit files in key-value/key-value-sync/ directly; regenerate from async via make codegen

Files:

  • key-value/key-value-sync/pyproject.toml
🔇 Additional comments (2)
key-value/key-value-sync/pyproject.toml (1)

35-35: The review comment is based on an incorrect assumption about the codegen process.

The make codegen command runs scripts/build_sync_library.py, which converts async Python code to sync Python code. However, this script processes only .py files using ASYNC_PROJECT_MODULE_DIR.rglob(pattern="*.py") and does not handle configuration files like pyproject.toml.

The coding guideline to "never edit files in key-value/key-value-sync/ directly" applies to Python source code that should be generated from the async package—not configuration files. Manual edits to pyproject.toml are necessary and expected. Your changes are correct: both the async and sync pyproject.toml files were updated identically with relaxed dependency constraints, and the sync file correctly preserves its sync-specific dependencies (valkey-glide-sync and pydantic).

Likely an incorrect or invalid review comment.

key-value/key-value-aio/pyproject.toml (1)

35-35: Verify testing with lowest-direct versions and UUID handling risk in PyMongo 4.0.

The concerns in the original review about breaking changes are substantiated but need context:

PyMongo 4.0 breaking change confirmed: The default uuid_representation changed to UNSPECIFIED, so attempting to encode a uuid.UUID to BSON will raise an error unless explicitly configured. However, codebase grep found no direct UUID handling in MongoDB store code—this does not rule out implicit risk if objects with UUIDs are stored/retrieved.

Elasticsearch 8.0 compatibility: Elasticsearch 8.0 introduced REST API compatibility mode with per-request headers and header-based authentication changes, but test configuration shows Elasticsearch tests are parameterized with versions 9.0.0 and 9.2.0, not 8.0.0, meaning lowest-direct versions are not being validated.

Missing verification:

  • No evidence of actual test runs with pymongo>=4.0.0 and elasticsearch>=8.0.0
  • Elasticsearch test fixtures target 9.x, indicating untested 8.x compatibility path

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

@strawgate strawgate merged commit 80ad163 into main Oct 27, 2025
79 checks passed
@strawgate strawgate deleted the claude/issue-118-20251026-2326 branch October 27, 2025 00:42
claude bot pushed a commit that referenced this pull request Oct 27, 2025
Resolved conflicts by accepting relaxed version constraints from main (#139)
while keeping DuckDB store additions from this branch.

Co-authored-by: William Easton <[email protected]>
@claude claude bot mentioned this pull request Oct 27, 2025
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.

Identify constraints that can be loosened

2 participants