SIGN IN SIGN UP

fix(fal): unpin cloudpickle to support Python 3.14 (#1004)

* fix(fal): unpin cloudpickle to support Python 3.14

cloudpickle 3.0.0 hits infinite recursion in `_extract_code_globals`
on Python 3.14, causing `fal run` to fail with a stack overflow when
serializing any function. Bumping the floor to 3.1.0 picks up the
upstream Python 3.14 compatibility fixes; the cloudpickle internals
fal monkey-patches in `_serialization.py` (`_PICKLE_BY_VALUE_MODULES`,
`_extract_class_dict`, `_dynamic_class_reduce`, `_class_setstate`,
`Pickler.dispatch`) all still exist in 3.1.x.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(fal): pin cloudpickle to 3.1.2

cloudpickle does not guarantee wire-format compatibility across
versions, and fal's whole flow depends on the local pickler matching
the remote runner's unpickler. Keep the strict-pin philosophy of the
previous `==3.0.0` and just move it to the version that supports
Python 3.14.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(fal): widen cloudpickle range to >=3.0.0,<3.2

cloudpickle is pinned to 3.0.0 in other places, so use a range that
keeps existing 3.0.0 environments compatible while letting Python 3.14
installs resolve to 3.1.x (which is needed to avoid the
`_extract_code_globals` recursion on 3.14). Cap below 3.2 so we don't
silently pick up a future minor with format changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: add Python 3.14 to test matrix

Adds 3.14 to fal unit/integration/e2e and fal_client/isolate_proto
test workflows. The pydantic 1.x leg is excluded for 3.14 just like
3.9-3.13, since pydantic 1.10.18 doesn't support new Python versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: bump pydantic to 2.13.3 so 3.14 matrix can install

pydantic 2.11.7 pulls pydantic-core built with pyo3 0.24.1, which
caps support at Python 3.13 and fails to build on 3.14. pydantic
2.13.3 (pydantic-core 2.46.3) ships cp314 wheels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
R
Ruslan Kuprieiev committed
fa8877cf42ed52addbdf4ef5e03565f4ea7dc2e2
Parent: 85d4abe
Committed by GitHub <noreply@github.com> on 5/7/2026, 10:25:55 AM