[CHORE] sync dev with master#414
Conversation
release/v1_19_changes_to_master_for_v1_14_release
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.
…cy_version fix/update_python_dependency_version
📝 WalkthroughWalkthroughRelease v1.14.1 bumps the package version, expands Python runtime support to versions 3.13 and 3.14, fixes timezone-aware datetime comparison in cookie expiration logic, and simplifies the broadcaster test by removing unused mocks. ChangesRelease 1.14.1 updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pyproject.toml (1)
24-24: ⚡ Quick winAlign Black target-version with the Python range that includes 3.13 and 3.14.
The declared Python support
python = ">=3.10,<3.15"includes versions 3.13 and 3.14, buttool.black.target-versiononly specifies["py310", "py311", "py312"]. Addpy313andpy314to keep Black's formatting behavior consistent with the declared runtime support.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pyproject.toml` at line 24, The Black configuration's target versions in tool.black.target-version must match the declared Python support range; update the tool.black.target-version entry (the list under the tool.black section) to include "py313" and "py314" in addition to the existing "py310","py311","py312" so Black's formatting targets align with python = ">=3.10,<3.15".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 7: Replace the misleading phrase "Python v1.14" in CHANGELOG.md with the
correct wording "Python 3.14" (or "Python 3.13/3.14" if both are intended);
locate the line containing the text "Update Python version limitation to
">=3.10,<3.15" to support Python v1.14" and update only the human-readable
version reference to "Python 3.14" (or the dual "Python 3.13/3.14") while
leaving the version constraint string ">=3.10,<3.15" unchanged.
In `@tests/core/test_broadcaster.py`:
- Around line 34-39: The test currently allows unrelated constructor failures
because it uses pytest.raises(Exception) and passes client=None; update the test
for MsgBroadcasterWithPk to supply a valid mock client (replace client=None with
a Mock client) and narrow the assertion to the OFAC-specific failure by using
pytest.raises with either the OFAC-specific exception class (e.g., OFACError or
OFACDeniedError) or pytest.raises(Exception, match="OFAC") so the failure is
asserted against an OFAC-related error message rather than any constructor
error.
---
Nitpick comments:
In `@pyproject.toml`:
- Line 24: The Black configuration's target versions in
tool.black.target-version must match the declared Python support range; update
the tool.black.target-version entry (the list under the tool.black section) to
include "py313" and "py314" in addition to the existing "py310","py311","py312"
so Black's formatting targets align with python = ">=3.10,<3.15".
🪄 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: 1e36b02d-7edf-484c-a22a-b920a7806426
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
CHANGELOG.mdpyinjective/core/network.pypyproject.tomltests/core/test_broadcaster.py
|
|
||
| ## [1.14.1] - 2026-04-29 | ||
| ### Changed | ||
| - Update Python version limitation to ">=3.10,<3.15" to support Python v1.14 |
There was a problem hiding this comment.
Fix incorrect Python version wording in the changelog.
Line 7 says “Python v1.14”, which is misleading. Please change it to “Python 3.14” (or “Python 3.13/3.14” if both are intended).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 7, Replace the misleading phrase "Python v1.14" in
CHANGELOG.md with the correct wording "Python 3.14" (or "Python 3.13/3.14" if
both are intended); locate the line containing the text "Update Python version
limitation to ">=3.10,<3.15" to support Python v1.14" and update only the
human-readable version reference to "Python 3.14" (or the dual "Python
3.13/3.14") while leaving the version constraint string ">=3.10,<3.15"
unchanged.
| 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.
Narrow the exception assertion to the OFAC-specific failure path.
Using pytest.raises(Exception) with client=None can let this test pass due to unrelated constructor failures (e.g., None client usage) instead of OFAC enforcement. Please assert a specific exception type or at least an OFAC-related message match.
Suggested test tightening
- with pytest.raises(Exception):
+ with pytest.raises(Exception, match="OFAC|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|sanction"): | |
| _ = MsgBroadcasterWithPk( | |
| network=network, | |
| account_config=account_config, | |
| client=None, | |
| fee_calculator=Mock(), |
🧰 Tools
🪛 Ruff (0.15.12)
[warning] 34-34: Do not assert blind exception: Exception
(B017)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/core/test_broadcaster.py` around lines 34 - 39, The test currently
allows unrelated constructor failures because it uses pytest.raises(Exception)
and passes client=None; update the test for MsgBroadcasterWithPk to supply a
valid mock client (replace client=None with a Mock client) and narrow the
assertion to the OFAC-specific failure by using pytest.raises with either the
OFAC-specific exception class (e.g., OFACError or OFACDeniedError) or
pytest.raises(Exception, match="OFAC") so the failure is asserted against an
OFAC-related error message rather than any constructor error.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sync dev branch with latest changes from
masterSummary by CodeRabbit
Bug Fixes
Chores