Skip to content

Conversation

@Arthurdw
Copy link
Contributor

  • Move return statements out of finally blocks in axon.py and dendrite.py (SyntaxWarning: 'return' in a 'finally' block is deprecated in 3.14, will be an error in 3.16)
  • Relax aiohttp constraint from ~=3.9 to >=3.9,<4.0

Bug

Python 3.14 raises SyntaxWarning for return statements inside finally blocks, which will become errors in Python 3.16.

Description of the Change

  • Move return statements out of finally blocks in axon.py:1211 and dendrite.py:392,601
  • Relax aiohttp constraint from ~=3.9 to >=3.9,<4.0 to allow newer compatible versions

Alternate Designs

N/A - this is the standard fix for the deprecation warning.

Possible Drawbacks

None - the behavior is identical, just restructured to avoid the deprecated pattern.

Verification Process

Ran test suite on Python 3.14 and confirmed warnings are resolved.

Release Notes

Fixed Python 3.14 deprecation warnings for return statements in finally blocks.

Branch Acknowledgement

  • I am acknowledging that I am opening this branch against SDKv10 (for sdkv10 not v9, so not staging. this is correct right?)

- Move return statements out of finally blocks in axon.py and dendrite.py
  (SyntaxWarning: 'return' in a 'finally' block is deprecated in 3.14,
   will be an error in 3.16)
- Relax aiohttp constraint from ~=3.9 to >=3.9,<4.0
@Arthurdw
Copy link
Contributor Author

Uh, how come only 6 checks run? Is this expected/? I remember there being way more checks?

@thewhaleking thewhaleking added the SDKv10 Use this label for issues and feature requests relevant to Bittensor SDK v10. label Nov 25, 2025
@thewhaleking
Copy link
Contributor

Uh, how come only 6 checks run? Is this expected/? I remember there being way more checks?

SDKv10 is a temporary "staging" branch, so we didn't update the workflows to automatically run all tests on PRs opened against it. It requires certain labels to run.

@basfroman
Copy link
Collaborator

basfroman commented Nov 25, 2025

Uh, how come only 6 checks run? Is this expected/? I remember there being way more checks?

SDKv10 is a temporary "staging" branch, so we didn't update the workflows to automatically run all tests on PRs opened against it. It requires certain labels to run.

This isn't accurate. All workflows are configured correctly from the scratch, tests and checks run automatically on every PR to this branch. Since I previously created PRs from an account in our organization, I didn't account for the fact that GitHub Actions repository variables aren't available for PRs from forks. This is a GitHub security restriction, but still my bad too.

Thanks for your efforts, but unfortunately, PR #3156 doesn't fix this for a few reasons: the inherit flag is set by default, so adding it only clarifies intent. Even with inherit, PRs from forks don't get access to GitHub Actions repository variables.

I've created PR #3158 to address this. To be more accurate, I created a PR from the fork under an account that is not part of the organization. Now, instead of storing the list of supported Python versions in GitHub Settings, I now use a JSON file and import it in the workflows for use.

@Arthurdw thank you! Your fork PR helped us discover this issue on early stage!
Pls update you PR with updated (after #3158 merged) SDKv10 branch and I'll merge it. After you pull the SDKv10 changes, you have to see all tests and checkers in your PR.

@basfroman basfroman changed the title fix: resolve python 3.14 syntax warnings and update deps [v10] fix: resolve python 3.14 syntax warnings and update deps Nov 25, 2025
@basfroman basfroman mentioned this pull request Nov 25, 2025
@basfroman basfroman merged commit f3c533b into opentensor:SDKv10 Nov 25, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SDKv10 Use this label for issues and feature requests relevant to Bittensor SDK v10.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants