Skip to content

Add Python 3.14 support - #20195

Merged
cmmarslender merged 62 commits into
mainfrom
EL.python3.14
May 13, 2026
Merged

cmmarslender merged 62 commits into
mainfrom
EL.python3.14

Conversation

@emlowe

@emlowe emlowe commented Oct 24, 2025 •

Copy link
Copy Markdown
Collaborator

Add python 3.14 support.

Current status: Runs fine - ready for review

Draft For:


Note

Medium Risk
Mostly compatibility and test/cleanup changes, but it touches event loop policy selection and a few shutdown/sync paths (ChiaPolicy, timelord, node discovery) that could affect runtime behavior under load or during shutdown.

Overview
Adds Python 3.14 support by expanding CI matrices (pre-commit/tests/wheel checks/mypy) and updating install.sh/Install.ps1 to prefer/allow 3.14.

Improves asyncio/transport compatibility for 3.14 by updating ChiaPolicy to use the new base policy class, and adjusts tests for changed error messages and deprecation warnings.

Hardens resource management and shutdown behavior: closes aiohttp sessions/websockets and RPC clients more consistently, adds a safer timelord VDF client shutdown sequence, waits for node-discovery tasks to finish on close, fixes temp file handling, and adds Windows-safe temp directory cleanup retries.

Reviewed by Cursor Bugbot for commit 45b7cb6. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls-official

coveralls-official Bot commented Oct 24, 2025 •

Copy link
Copy Markdown

Coverage Report for CI Build 25567115061

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.09%) to 91.252%

Details

  • Coverage decreased (-0.09%) from the base build.
  • Patch coverage: 11 uncovered changes across 3 files (185 of 196 lines covered, 94.39%).
  • 107 coverage regressions across 29 files.

Uncovered Changes

File Changed Covered %
chia/server/chia_policy.py 13 7 53.85%
chia/_tests/util/full_sync.py 14 10 71.43%
chia/_tests/util/test_replace_str_to_bytes.py 5 4 80.0%

Coverage Regressions

107 previously-covered lines in 29 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
chia/_tests/core/util/test_lockfile.py 22 77.42%
chia/timelord/timelord.py 16 73.04%
chia/wallet/wallet_node.py 10 86.87%
chia/daemon/server.py 7 80.62%
chia/server/ws_connection.py 7 92.01%
chia/_tests/core/server/test_event_loop.py 6 89.74%
chia/data_layer/data_layer.py 4 85.68%
chia/server/server.py 4 84.67%
chia/full_node/full_node.py 3 87.68%
chia/data_layer/data_store.py 2 95.55%

Coverage Stats

Coverage Status
Relevant Lines: 118945
Covered Lines: 108711
Line Coverage: 91.4%
Relevant Branches: 11822
Covered Branches: 10616
Branch Coverage: 89.8%
Branches in Coverage %: Yes
Coverage Strength: 1.83 hits per line

💛 - Coveralls

@emlowe emlowe added the Added Required label for PR that categorizes merge commit message as "Added" for changelog label Oct 30, 2025
@socket-security

socket-security Bot commented Nov 3, 2025 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​certifi@​2024.7.4 ⏵ 2026.1.4100 +110010010070
Updatedpypi/​pycryptodome@​3.20.0 ⏵ 3.23.08110010010080
Updatedpypi/​prompt-toolkit@​3.0.51 ⏵ 3.0.5290 +1100100100100
Updatedpypi/​distlib@​0.3.7 ⏵ 0.4.093 +1100100100100
Updatedpypi/​bitarray@​3.0.0 ⏵ 3.8.094 +1100100100100
Updatedpypi/​virtualenv@​20.26.6 ⏵ 20.36.196 +1100 +2100100100
Updatedpypi/​execnet@​2.1.1 ⏵ 2.1.297 +1100100100100
Updatedpypi/​rich@​13.9.4 ⏵ 14.3.298 +1100100100100
Updatedpypi/​nodeenv@​1.9.1 ⏵ 1.10.098 +1100100100100
Updatedpypi/​jeepney@​0.8.0 ⏵ 0.9.098100100100100
Updatedpypi/​altgraph@​0.17.4 ⏵ 0.17.599100100100100
Updatedpypi/​charset-normalizer@​3.3.0 ⏵ 3.4.499100100100100
Updatedpypi/​pydot@​3.0.4 ⏵ 4.0.199100100100100
Updatedpypi/​pyproject-hooks@​1.0.0 ⏵ 1.2.099 +1100100100100
Updatedpypi/​portalocker@​2.8.2 ⏵ 3.2.099 +1100100100100
Updatedpypi/​tomli@​2.0.1 ⏵ 2.4.099100100100100
Updatedpypi/​requests@​2.32.4 ⏵ 2.33.099 +1100 +2100100100
Updatedpypi/​jaraco-context@​5.3.0 ⏵ 6.1.0100100 +16100100100
Updatedpypi/​python-dateutil@​2.8.2 ⏵ 2.9.0.post0100 +1100100100100
Updatedpypi/​wcwidth@​0.2.13 ⏵ 0.6.0100100100100100
Updatedpypi/​pycparser@​2.21 ⏵ 3.0100 +4100100100100
Updatedpypi/​markdown-it-py@​3.0.0 ⏵ 4.0.0100 +1100100100100
Updatedpypi/​macholib@​1.16.3 ⏵ 1.16.4100100100100100
Updatedpypi/​identify@​2.5.30 ⏵ 2.6.16100 +1100100100100 +31
Updatedpypi/​pefile@​2023.2.7 ⏵ 2024.8.26100 +1100100100100
Updatedpypi/​attrs@​23.1.0 ⏵ 25.4.0100 +1100100100100
Updatedpypi/​platformdirs@​3.11.0 ⏵ 4.5.1100 +1100100100100
Updatedpypi/​pyparsing@​3.2.3 ⏵ 3.3.2100 +1100100100100
Updatedpypi/​jaraco-functools@​4.0.1 ⏵ 4.4.0100 +1100100100100
Updatedpypi/​yarl@​1.18.3 ⏵ 1.22.0100 +1100100100100
Updatedpypi/​iniconfig@​2.0.0 ⏵ 2.3.0100100100100100
Updatedpypi/​jmespath@​1.0.1 ⏵ 1.1.0100 +1100100100100
See 17 more rows in the dashboard

View full report

@emlowe

emlowe commented Dec 5, 2025

Copy link
Copy Markdown
Collaborator Author

close and reopen for latest

@emlowe emlowe closed this Dec 5, 2025
@emlowe emlowe reopened this Dec 5, 2025
@socket-security

socket-security Bot commented Dec 8, 2025 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: pypi charset-normalizer under CC-BY-SA-3.0

License: CC-BY-SA-3.0 - The applicable license policy does not permit this license (5) (charset_normalizer-3.4.4/data/NOTICE.md)

From: poetry.lock → pypi/charset-normalizer@3.4.4

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/charset-normalizer@3.4.4. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Native binaries present: pypi tomli

Location: Package overview

From: poetry.lock → pypi/tomli@2.4.0

ℹ Read more on: This package | This alert | Why is native code a concern?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Verify that the inclusion of native code is expected and necessary for this package's functionality. If it is unnecessary or unexpected, consider using alternative packages without native code to mitigate potential risks.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/tomli@2.4.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@emlowe

emlowe commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator Author

cursor review

Comment thread chia/_tests/util/temp_file.py Outdated
@github-actions github-actions Bot added the merge_conflict Branch has conflicts that prevent merge to main label Dec 9, 2025
Comment thread install.sh
@github-actions github-actions Bot added the merge_conflict Branch has conflicts that prevent merge to main label May 6, 2026
@github-actions github-actions Bot removed the merge_conflict Branch has conflicts that prevent merge to main label May 6, 2026
Comment thread chia/server/node_discovery.py Outdated
Comment thread chia/timelord/timelord.py Outdated
Comment thread chia/timelord/timelord.py Outdated
Comment thread chia/server/chia_policy.py
Comment thread chia/_tests/fee_estimation/test_fee_estimation_rpc.py
Comment thread chia/_tests/util/test_replace_str_to_bytes.py
Comment thread chia/_tests/wallet/test_new_wallet_protocol.py
Comment thread chia/_tests/connection_utils.py
Comment thread chia/server/chia_policy.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 45b7cb6. Configure here.

Comment thread chia/daemon/server.py
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor
File Coverage Missing Lines
chia/_tests/util/full_sync.py 71.4% lines 270-273
chia/_tests/util/test_replace_str_to_bytes.py 80.0% lines 145
chia/server/chia_policy.py 53.8% lines 354-355, 357-358, 360, 362
Total Missing Coverage
195 lines 11 lines 94%

@emlowe
emlowe requested review from Quexington and arvidn May 12, 2026 16:44
@emlowe emlowe added ready_to_merge Submitter and reviewers think this is ready and removed coverage-diff labels May 13, 2026
@cmmarslender
cmmarslender merged commit c32a4a7 into main May 13, 2026
1535 of 1548 checks passed
@cmmarslender
cmmarslender deleted the EL.python3.14 branch May 13, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Added Required label for PR that categorizes merge commit message as "Added" for changelog ready_to_merge Submitter and reviewers think this is ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants