Skip to content

feat: support python 3.14#3739

Merged
johanneskoester merged 14 commits into
snakemake:mainfrom
maarten-k:py314
Jun 1, 2026
Merged

feat: support python 3.14#3739
johanneskoester merged 14 commits into
snakemake:mainfrom
maarten-k:py314

Conversation

@maarten-k

@maarten-k maarten-k commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

This pull request is the first start to enable python 3.14.

There are a few dependencies that must be ported to Python 3.14 in conda-forge before the build will succeed. I generate a list wich dependencies still need action. Level of work depends on packages: some just need just a pull request to accept are are more hands-on (e.g. pandas)
run dependencies

test dependencies

  • brotli done parent of cwltool
  • cheetah3 in-pr Rebuild for python 3.14 conda-forge/cheetah3-feedstock#23 parent of cwltool
  • genshi done parent of cwltool
  • lxml done parent of cwltool
  • msgpack-python done parent of cwltool
  • mypy done parent of cwltool
  • orjson done parent of cwltool
  • pillow done parent of cwltool
  • psutil done parent of cwltool
  • pydantic-core done parent of cwltool
  • pydot done parent of cwltool
  • pyreadline3 done parent of cwltool
  • ruamel.yaml done parent of cwltool
  • schema-salad in-pr Rebuild for python 3.14 conda-forge/schema-salad-feedstock#137 parent of cwltool
  • whoosh done parent of cwltool
  • zstandard done parent of cwltool

Also missing for testing(found 2025-10-03):

Summary by CodeRabbit

  • Tests

    • CI test matrix expanded to include Python 3.14, increasing interpreter coverage.
  • Bug Fixes / Compatibility

    • Object serialization now uses an explicit newer protocol (protocol 4); may affect loading previously saved data on much older Python interpreters.

@coderabbitai

coderabbitai Bot commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

CI matrix extended to include py314 in .github/workflows/main.yml. generate_preamble in src/snakemake/script/__init__.py now calls pickle.dumps(..., protocol=4) for Snakemake object serialization.

Changes

Cohort / File(s) Summary
CI workflow matrix update
.github/workflows/main.yml
Added py314 to the env/python-version matrix for CI tests job; no other steps or exclusions changed.
Preamble serialization change
src/snakemake/script/__init__.py
generate_preamble now uses pickle.dumps(..., protocol=4) (explicit protocol 4) instead of default protocol.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • johanneskoester
  • cademirch
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description provides substantial detail about Python 3.14 enablement work, including dependency status tracking. However, it does not address the QC template requirements about test coverage and documentation updates. Complete the QC section by confirming whether test cases cover these changes and whether documentation updates are needed for Python 3.14 support.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: support python 3.14' directly reflects the main objective of the PR, which is to enable Python 3.14 support. It is concise and clearly summarizes the primary change.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maarten-k maarten-k marked this pull request as draft September 12, 2025 12:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/main.yml (1)

51-51: Fix typo in comment.

“pyprojec.toml” → “pyproject.toml”.

-        # see pyprojec.toml: [tool.pixi.feature.test] for available test types
+        # see pyproject.toml: [tool.pixi.feature.test] for available test types
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcf9bcf and 1aba1c9.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (1)
  • .github/workflows/main.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/main.yml (2)

72-79: Verify Pixi/action versions are 3.14-ready.

setup-pixi@v0.9.0 is a wrapper; pixi v0.42.1 will only create a Python 3.14 environment if your configured channels publish Python 3.14 builds. Verify:

  • pixi manifest (and pixi.lock if present) requests Python 3.14 (or >=3.14).
  • the channels you use (e.g., conda‑forge) provide Python 3.14 packages for every runner OS in your matrix (ubuntu-latest, windows-latest, macos-latest).

53-53: Gate py314 to avoid blocking CI while deps catch up.

Workflow matrix includes "py314" (.github/workflows/main.yml) but the repo contains no pixi.toml/pyproject.toml entry for a py314 environment (docs reference only py311/py312: docs/project_info/contributing.rst). Mark py314 runs non-blocking and/or restrict to Linux until upstream wheels exist.

Apply:

 jobs:
   tests:
+    continue-on-error: ${{ matrix.env == 'py314' }}
     strategy:
       fail-fast: false
       matrix:
         test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         # see pyprojec.toml: [tool.pixi.feature.test] for available test types
         os: [ubuntu-latest, windows-2022, macos-latest] #  , macos-13 not supported yet
         env: ["py311", "py312", "py313", "py314"]
         exclude:
           - os: windows-2022
             env: "py311"
           - os: macos-latest
             env: "py311"
+          # Temporarily exclude py314 on platforms most likely to miss wheels initially
+          - os: windows-2022
+            env: "py314"
+          - os: macos-latest
+            env: "py314"

Verify that Pixi defines an environment named "py314" (show pixi.toml or pyproject.toml [tool.pixi.feature.test] entries); if not, remove or gate py314 in the workflow.

@EwoutH

EwoutH commented Oct 1, 2025

Copy link
Copy Markdown

Pandas 2.3.3 was released with Python 3.14 support and the conda forge pandas feedstock was also updated (conda-forge/pandas-feedstock#233).

@maarten-k maarten-k changed the title support python 3.14 feat: support python 3.14 Oct 3, 2025
@maarten-k

Copy link
Copy Markdown
Contributor Author

Conda 26.1 with Python 3.14 support is available. Currently checks hang on some network issues

@maarten-k maarten-k marked this pull request as ready for review February 3, 2026 23:20
@maarten-k maarten-k marked this pull request as draft February 4, 2026 09:19
@maarten-k maarten-k marked this pull request as ready for review February 4, 2026 14:33
@maarten-k

Copy link
Copy Markdown
Contributor Author

@johanneskoester Can you do a review?

@johanneskoester johanneskoester enabled auto-merge (squash) June 1, 2026 10:47
@johanneskoester johanneskoester merged commit 7e3be0c into snakemake:main Jun 1, 2026
89 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Snakemake Hackathon 2026 Jun 1, 2026
johanneskoester pushed a commit that referenced this pull request Jun 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[9.22.0](v9.21.1...v9.22.0)
(2026-06-01)


### Features

* add semantic helper functions choose_file/choose_folder/choose_tmp and
allow all semantic helper functions to be used when parsing resources
([#3820](#3820))
([d3c2386](d3c2386))
* add temp to default pathvars
([#4108](#4108))
([917fb11](917fb11))
* add workflow info to log
([#4079](#4079))
([e40e15b](e40e15b))
* support python 3.14
([#3739](#3739))
([7e3be0c](7e3be0c))


### Bug Fixes

* Adapt for dataclasses._MISSING_TYPE replaced with sentinel in Python
3.15 ([#4211](#4211))
([b7fb8df](b7fb8df))
* ensure that storage is not actually retrieved with --touch
([#4212](#4212))
([2726cae](2726cae))
* symlink to directory "has older modification time" than target
([#3782](#3782))
([#3784](#3784))
([41903d8](41903d8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants