Skip to content

fix: bump websockets minimum version to >=14#945

Open
m1lestones wants to merge 1 commit intoXRPLF:mainfrom
m1lestones:fix/websockets-version-constraint
Open

fix: bump websockets minimum version to >=14#945
m1lestones wants to merge 1 commit intoXRPLF:mainfrom
m1lestones:fix/websockets-version-constraint

Conversation

@m1lestones
Copy link
Copy Markdown

Summary

Closes #867

The websocket_base.py module migrated to websockets.asyncio.client and ClientConnection (the new asyncio-native API introduced in websockets 14.0) to eliminate deprecation warnings from the legacy interface. However, the pyproject.toml dependency lower bound was never updated to reflect this requirement.

With websockets = ">=11", users can install websockets 11–13 which lack websockets.asyncio, causing an ImportError at runtime.

Changes

  • Bumped websockets minimum version from >=11 to >=14 in pyproject.toml

Why >=14?

The websockets.asyncio subpackage (including ClientConnection) was introduced in websockets 14.0. The websockets changelog confirms this is the version that added the new asyncio-native API that websocket_base.py already uses.

Test plan

  • Verify import websockets.asyncio.client works with websockets >=14
  • Run existing WebSocket client tests: python -m pytest tests/unit/

🤖 Generated with Claude Code

The websocket_base.py module uses `websockets.asyncio.client` and
`ClientConnection`, which were introduced in websockets 14.0 as the
new asyncio-native API replacing the deprecated legacy interface.

The previous lower bound of >=11 allowed installing websockets versions
that lack `websockets.asyncio`, causing ImportError at runtime.

Closes XRPLF#867

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 427b6105-d19e-4f48-a173-156900b8ae07

📥 Commits

Reviewing files that changed from the base of the PR and between 8879e95 and 2cd114f.

📒 Files selected for processing (1)
  • pyproject.toml

Walkthrough

The websockets dependency constraint in pyproject.toml was updated from >=11 to >=14. This targets the minimum supported version to align with the websockets library's API changes and deprecation timeline.

Changes

Cohort / File(s) Summary
Dependency Version Update
pyproject.toml
Updated minimum websockets version constraint from >=11 to >=14 to address deprecation warnings in the websockets library.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, through version gates,
Websockets leap to fourteen's fate,
Old deprecations fade to gray,
As modernized connections play!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: bumping the websockets minimum version to >=14 to support the new asyncio-native API.
Description check ✅ Passed The description provides context, explains why >=14 is required, and lists test plans, but does not follow the repository's required template structure with sections like Type of Change or CHANGELOG updates.
Linked Issues check ✅ Passed The PR successfully addresses issue #867 by updating the websockets version constraint to >=14, which is required for the migration to websockets.asyncio that eliminates deprecation warnings.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to updating a single dependency version constraint, which is directly related to resolving the issue #867 deprecation warnings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

Fix deprecation warnings

1 participant