chore: add experimental python 314 support#129
Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds experimental Python 3.14 support, gated behind an experimental compat flag.
Issues
-
Missing negative test for experimental gating — The new test covers the case where
experimentalis present, but there is no test verifying thatpythonWorkers20260610is ignored whenexperimentalis absent. This is the most important behavior to validate for the gating logic. -
Placeholder Pyodide index version
314.0.0—get_pyodide_index()maps 3.14 to version314.0.0, which is clearly a placeholder. If someone enables the experimental flag today, they'll get a broken index URL with no clear error message. Consider adding a comment explaining this is a placeholder, or raising an error until the real version is known. -
Compat flag naming convention — The new flag
pythonWorkers20260610uses camelCase, while existing flags (python_workers,python_workers_20250116) use snake_case. This may be intentional to match the workerd side, but it's worth a note if so.
|
Review posted successfully on PR #129. Here's a summary of what I flagged:
|
|
|
||
| MIN_UV_VERSION = (0, 8, 10) | ||
| MIN_WRANGLER_VERSION = (4, 42, 1) | ||
| MIN_WRANGLER_VERSION = (4, 108, 0) |
There was a problem hiding this comment.
This wrangler version includes python 314 support.
| class Default(WorkerEntrypoint): | ||
| async def test(self): | ||
| if sys.version_info >= (3, 14): | ||
| # FIXME(soon): fix entropy patches for newer packages |
There was a problem hiding this comment.
pydantic-core issue. We need to fix this, but it should be done in a separate PR.
| def fetch_check(url, opts): | ||
| assert opts.foobarbaz == 42 | ||
|
|
||
| async with mock_fetch(fetch_check): |
There was a problem hiding this comment.
I removed this one in our internal workerd tests as well. It mocks pyfetch internal which is easy to break + does not add much value for testing.
Adds python 3.14 support on pywrangler. This compat flag is not enabled by date yet, so we are setting the explicit compat flag on our test.