Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBumps package version to 1.14.1, relaxes Python upper bound to <3.15, makes cookie expiration checks timezone-aware in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pyproject.toml (1)
73-73:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate Black target-version to match extended Python support.
The
target-versionfor Black still only includes["py310", "py311", "py312"], but line 24 extends Python support to<3.15. Black should be configured to target Python 3.13 and 3.14 as well to ensure correct formatting for syntax features available in those versions.🛠️ Proposed fix to align Black configuration
-target-version = ["py310", "py311", "py312"] +target-version = ["py310", "py311", "py312", "py313", "py314"]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` at line 73, Update the Black configuration's target-version array to include Python 3.13 and 3.14 so it matches the extended support; specifically modify the target-version setting (currently ["py310","py311","py312"]) to include "py313" and "py314" (e.g. ["py310","py311","py312","py313","py314"]) so Black will format for those newer syntax features.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Line 24: Update the Python version constraint in pyproject.toml from the
restrictive "python = \">=3.10,<3.15\"" to a range that includes 3.6–3.14 (for
example "python = \">=3.6,<3.15\"") so packages like hdwallets (3.6–3.9) remain
compatible, and then update the Black configuration under [tool.black] to add
target-version entries for py313 and py314 (in the target-version list) so
formatting targets Python 3.13 and 3.14 as requested.
---
Outside diff comments:
In `@pyproject.toml`:
- Line 73: Update the Black configuration's target-version array to include
Python 3.13 and 3.14 so it matches the extended support; specifically modify the
target-version setting (currently ["py310","py311","py312"]) to include "py313"
and "py314" (e.g. ["py310","py311","py312","py313","py314"]) so Black will
format for those newer syntax features.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 86e303f3-71b4-41a2-a9f8-698f621fcc46
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
pyproject.toml
|
|
||
| [tool.poetry.dependencies] | ||
| python = ">=3.10,<3.13" | ||
| python = ">=3.10,<3.15" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What is the latest stable Python 3.x release as of April 2026?
💡 Result:
As of April 30, 2026, the latest stable Python 3.x release is Python 3.14.4 (released April 7, 2026).
Citations:
🏁 Script executed:
#!/bin/bash
# Description: Check PyPI metadata for key dependencies to verify Python 3.14 support
echo "Checking Python version classifiers for key dependencies..."
for pkg in aiohttp bech32 bip32 ecdsa eip712 eth-pydantic-types grpcio grpcio-tools hdwallets mnemonic protobuf requests safe-pysha3 websockets web3; do
echo "=== $pkg ==="
curl -s "https://pypi.org/pypi/$pkg/json" | jq -r '.info.classifiers[] | select(startswith("Programming Language :: Python :: 3"))'
echo ""
doneRepository: InjectiveLabs/sdk-python
Length of output: 3430
Fix Python version constraint: several dependencies are incompatible with Python 3.10+ requirements.
While Python 3.14.4 is stable (released April 7, 2026), this constraint introduces runtime compatibility issues:
- hdwallets declares support only for Python 3.6–3.9, making it incompatible with the stated minimum of Python 3.10.
- ecdsa, mnemonic, and safe-pysha3 do not explicitly declare Python 3.14 support (max declared: 3.13, 3.11, 3.13 respectively).
- grpcio-tools and several others lack specific version classifiers.
Additionally, update the Black target-version on line 73 to include py313 and py314 to align with the expanded Python support.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pyproject.toml` at line 24, Update the Python version constraint in
pyproject.toml from the restrictive "python = \">=3.10,<3.15\"" to a range that
includes 3.6–3.14 (for example "python = \">=3.6,<3.15\"") so packages like
hdwallets (3.6–3.9) remain compatible, and then update the Black configuration
under [tool.black] to add target-version entries for py313 and py314 (in the
target-version list) so formatting targets Python 3.13 and 3.14 as requested.
Avoid creating AsyncClient in the OFAC broadcaster unit test so it no longer depends on an implicit event loop, which fails on Python 3.14. Also replace utcnow() in network cookie expiration checks with timezone-aware UTC comparisons to remove deprecation warnings and ensure correct expiry handling.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/core/test_broadcaster.py (1)
10-11:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove stale imports to keep pre-commit passing.
AsyncClientandComposerare unused now and are already reported by CI (ruff) as lint violations.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/core/test_broadcaster.py` around lines 10 - 11, Remove the now-unused imports AsyncClient and Composer from the top of the test file; locate the import statement that reads "from pyinjective.async_client_v2 import AsyncClient" and "from pyinjective.composer_v2 import Composer" and delete those two imports so the test no longer references AsyncClient or Composer and the linter/ruff violations are resolved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Line 7: Fix the typo and version wording in the changelog line: replace
"Pythong" with "Python" and change "v1.14" to "3.14" so the line reads that the
Python version limitation was updated to ">=3.10,<3.15" to support Python 3.14;
update the text containing the original phrase "- Update Python version
limitation to ">=3.10,<3.15" to support Pythong v1.14" accordingly.
In `@tests/core/test_broadcaster.py`:
- Around line 36-42: The test currently uses pytest.raises(Exception) when
constructing MsgBroadcasterWithPk(network=network,
account_config=account_config, client=None, fee_calculator=Mock()), which is too
broad; change the assertion to expect the OFAC-specific failure by using
pytest.raises with the specific OFAC-related exception type (e.g., OFACError or
OfacCheckFailed) or, if no dedicated exception class exists, use
pytest.raises(Exception, match="OFAC") (or a precise OFAC error substring) to
ensure the constructor call to MsgBroadcasterWithPk fails for OFAC reasons
rather than an unrelated None client error.
---
Outside diff comments:
In `@tests/core/test_broadcaster.py`:
- Around line 10-11: Remove the now-unused imports AsyncClient and Composer from
the top of the test file; locate the import statement that reads "from
pyinjective.async_client_v2 import AsyncClient" and "from
pyinjective.composer_v2 import Composer" and delete those two imports so the
test no longer references AsyncClient or Composer and the linter/ruff violations
are resolved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dd9ef884-44f5-4cfd-8a73-d8de67d811bd
📒 Files selected for processing (4)
CHANGELOG.mdpyinjective/core/network.pypyproject.tomltests/core/test_broadcaster.py
✅ Files skipped from review due to trivial changes (1)
- pyproject.toml
|
|
||
| ## [1.14.1] - 2026-04-29 | ||
| ### Changed | ||
| - Update Python version limitation to ">=3.10,<3.15" to support Pythong v1.14 |
There was a problem hiding this comment.
Fix typo and version format in changelog entry.
Line 7 contains two issues:
- "Pythong" should be "Python"
- "v1.14" should be "3.14" (referring to Python 3.14, not v1.14)
📝 Proposed fix
-- Update Python version limitation to ">=3.10,<3.15" to support Pythong v1.14
+- Update Python version limitation to ">=3.10,<3.15" to support Python 3.14📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Update Python version limitation to ">=3.10,<3.15" to support Pythong v1.14 | |
| - Update Python version limitation to ">=3.10,<3.15" to support Python 3.14 |
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: Ensure spelling is correct
Context: ...limitation to ">=3.10,<3.15" to support Pythong v1.14 ## [1.14.0] - 2026-04-27 ### Cha...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~7-~7: Ensure spelling is correct
Context: ... ">=3.10,<3.15" to support Pythong v1.14 ## [1.14.0] - 2026-04-27 ### Changed - Upda...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CHANGELOG.md` at line 7, Fix the typo and version wording in the changelog
line: replace "Pythong" with "Python" and change "v1.14" to "3.14" so the line
reads that the Python version limitation was updated to ">=3.10,<3.15" to
support Python 3.14; update the text containing the original phrase "- Update
Python version limitation to ">=3.10,<3.15" to support Pythong v1.14"
accordingly.
| with pytest.raises(Exception): | ||
| _ = MsgBroadcasterWithPk( | ||
| network=network, | ||
| account_config=account_config, | ||
| client=client, | ||
| composer=composer, | ||
| client=None, | ||
| fee_calculator=Mock(), | ||
| ) |
There was a problem hiding this comment.
Tighten the expected failure to OFAC-specific behavior.
At Line 36, pytest.raises(Exception) is too broad. With client=None on Line 40, unrelated constructor errors can satisfy the assertion and make the test pass for the wrong reason. Please assert a specific exception type (or at least match an OFAC-related error message).
Suggested test hardening
- with pytest.raises(Exception):
+ with pytest.raises(Exception, match="OFAC|blocked|sanction"):
_ = MsgBroadcasterWithPk(
network=network,
account_config=account_config,
client=None,
fee_calculator=Mock(),
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| with pytest.raises(Exception): | |
| _ = MsgBroadcasterWithPk( | |
| network=network, | |
| account_config=account_config, | |
| client=client, | |
| composer=composer, | |
| client=None, | |
| fee_calculator=Mock(), | |
| ) | |
| with pytest.raises(Exception, match="OFAC|blocked|sanction"): | |
| _ = MsgBroadcasterWithPk( | |
| network=network, | |
| account_config=account_config, | |
| client=None, | |
| fee_calculator=Mock(), | |
| ) |
🧰 Tools
🪛 Ruff (0.15.12)
[warning] 36-36: Do not assert blind exception: Exception
(B017)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/core/test_broadcaster.py` around lines 36 - 42, The test currently uses
pytest.raises(Exception) when constructing MsgBroadcasterWithPk(network=network,
account_config=account_config, client=None, fee_calculator=Mock()), which is too
broad; change the assertion to expect the OFAC-specific failure by using
pytest.raises with the specific OFAC-related exception type (e.g., OFACError or
OfacCheckFailed) or, if no dedicated exception class exists, use
pytest.raises(Exception, match="OFAC") (or a precise OFAC error substring) to
ensure the constructor call to MsgBroadcasterWithPk fails for OFAC reasons
rather than an unrelated None client error.
Summary by CodeRabbit