Skip to content

feat: Add Python 3.14 zstd builtin support#749

Merged
tchaton merged 3 commits into
Lightning-AI:mainfrom
bhimrazy:feat/python-314-zstd-support
Nov 6, 2025
Merged

feat: Add Python 3.14 zstd builtin support#749
tchaton merged 3 commits into
Lightning-AI:mainfrom
bhimrazy:feat/python-314-zstd-support

Conversation

@bhimrazy
Copy link
Copy Markdown
Collaborator

@bhimrazy bhimrazy commented Nov 6, 2025

What does this PR do?

Uses Python 3.14's built-in zstd compression to remove third-party dependency while keeping backward compatibility.

requires #747

ref:

Changes

  • Added _PYTHON_GREATER_EQUAL_3_14 constant following PyTorch Lightning's naming convention
  • Updated zstd imports to use compression.zstd for Python 3.14+ and third-party zstd for older versions
  • Made zstd installation conditional (python_version < "3.14") in test requirements

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80%. Comparing base (8437a03) to head (106c052).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #749   +/-   ##
===================================
  Coverage    80%    80%           
===================================
  Files        52     52           
  Lines      7331   7341   +10     
===================================
+ Hits       5873   5887   +14     
+ Misses     1458   1454    -4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@deependujha deependujha left a comment

Choose a reason for hiding this comment

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

nice!

In python 3.14, is built-in zstd same as external zstd library?

@bhimrazy
Copy link
Copy Markdown
Collaborator Author

bhimrazy commented Nov 6, 2025

nice!

In python 3.14, is built-in zstd same as external zstd library?

yes @deependujha. let's see how the test goes with our ci .

@tchaton tchaton merged commit b070032 into Lightning-AI:main Nov 6, 2025
36 checks passed
@bhimrazy bhimrazy deleted the feat/python-314-zstd-support branch November 6, 2025 09:17
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.

3 participants