Skip to content

Conversation

@neverinfamous
Copy link
Owner

@neverinfamous neverinfamous commented Oct 27, 2025

Purpose

Test Python 3.14 upgrade with the proper sophisticated Dockerfile (not the simplified version from earlier attempts).

Changes

  • ✅ Builder stage: ghcr.io/astral-sh/uv:python3.14-alpine
  • ✅ Runtime stage: python:3.14-alpine
  • ✅ Updated Python symlink: python3.13python3.14
  • ⚙️ Added Rust/Cargo to builder stage for wheel compilation

What We Learned

Original issue was CORRECT: "The wheels aren't ready on Docker for it."

The first build attempt failed with:

subprocess.CalledProcessError: Command '['cargo', '--version']' returned non-zero exit status 127.
help: `pydantic-core` (v2.33.2) was included because...

Root cause: pydantic-core (and likely other packages) don't have pre-built wheels for Python 3.14 yet, requiring compilation from source with Rust.

Tradeoffs of Python 3.14 Right Now

❌ Downsides

  • Slower builds: Rust compilation adds significant build time
  • Larger images: Rust toolchain increases builder stage size
  • Limited ecosystem: Only 28.6% of top packages confirmed compatible
  • Potential runtime issues: Untested compatibility with some dependencies

✅ Upsides

  • Performance: Python 3.14 JIT improvements
  • New features: Latest Python capabilities
  • Future-proofing: Get ahead of the curve

Recommendation

Wait 2-4 months for the ecosystem to mature:

  • Pre-built wheels for Python 3.14 will become available
  • Build times will return to normal
  • More packages will confirm compatibility
  • Production stability will improve

Testing

This PR will test if Python 3.14 works with Rust compilation. If it succeeds, we can merge it, but the build performance penalty may not be worth it yet.

Rollback Plan

If this fails or if we decide the tradeoffs aren't worth it, simply close this PR. Master remains on Python 3.13 and is unaffected.


Verdict: You were right about the wheels! 🎯

Test upgrade from Python 3.13 to 3.14 in both stages:
- Builder stage: ghcr.io/astral-sh/uv:python3.14-alpine
- Runtime stage: python:3.14-alpine
- Updated symlink from python3.13 to python3.14

This will test if Python 3.14 works with the proper uv-based Dockerfile.
Python 3.14 doesn't have pre-built wheels for pydantic-core yet.
Added Rust and Cargo to the builder stage to compile from source.

This confirms the original issue: "The wheels aren't ready on Docker for it."

The build will be slower and the image larger due to Rust compilation,
which is why staying on Python 3.13 may be preferable until wheels are available.
@neverinfamous neverinfamous deleted the test/python-3.14-upgrade branch November 17, 2025 02:54
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.

2 participants