Skip to content

GH-48172: [Python] Add cp315 to build - #48191

Merged
raulcd merged 22 commits into
apache:mainfrom
paultiq:cp315_nightly
Aug 21, 2026
Merged

GH-48172: [Python] Add cp315 to build#48191
raulcd merged 22 commits into
apache:mainfrom
paultiq:cp315_nightly

Conversation

@paultiq

@paultiq paultiq commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

Add Python 3.15 to the pyarrow nightly builds, so that issues can be detected early in the development cycles of both cpython & pyarrow.

Note:

  • CFFI and Pandas doesn't have nightly 3.15 wheels, and are accordingly excluded.
  • Numpy shipped 3.15rc1 in 2.5.2 doesn't ship a 3.15 wheel, but is needed to build. It is building from source.
  • 3.15 Schedule This PR targets 3.15.0rc1. rc2 is expected 2026-09-01 and final 2026-10-01.

What changes are included in this PR?

  • Adding cp315/cp315t to the build matrix
  • Excluding cffi/ pandas for 3.15, as the wheels aren't yet available.

2026-08-13 edit

  • Bump libcst to 1.9.0
  • Update manylinux image to 2026.08.08-1 (for 3.15rc1)
  • Add -rc to PYTHON_IMAGE_TAG
  • Disable pandas tests if Pandas isn't installed:

Are these changes tested?

  • Yes, tested on a local Linux build using the ninja-release-python preset (not maximal)

Are there any user-facing changes?

No functional changes, other than allowing the user to use Python 3.15.

Progress Notes (2026-08-15)

Each platform uses different sources for Python builds, each with different release schedules and paths:

  • manylinux is prebuilt with latest Python builds in /opt/python, so using the latest manylinux build is sufficient. 3.15 wasn't available until beta 1.
  • musllinux: Uses Alpine system python built from Add Alpine 3.24 and drop 3.22 docker-library/python#1123. Might need to bump ALPINE_LINUX version in arrow/dev/tasks/python-wheels/github.linux.yml.
  • musllinux free-threaded: uses astral's builds. Edit python-free-threaded-wheel-musllinux-test-imports.dockerfile + -test-unittests.dockerfile: set the python_patch_version, and set build_date in compose.yaml.
  • macos: Downloads official build from python.org, see ci/scripts/install_python.sh. For early builds, needed to disable --only-binary since at least one dependency needed to be built (no 3.15 wheels available yet)... only macos uses --only-binary
  • Windows: installs builds using choco, see python-wheel-windows-test-vs2022.dockerfile and python-free-threaded-wheel-windows-test-vs2022.dockerfile

For 3.15.0rc1 builds, some care was needed because certain paths needed 3.15.0 and others needed the full 3.15.0rc1.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #48172 has been automatically assigned in GitHub to PR creator.

@raulcd

raulcd commented Nov 21, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-manylinux-2-28-cp315-cp315-amd64

@github-actions

Copy link
Copy Markdown

Revision: 2d2a557

Submitted crossbow builds: ursacomputing/crossbow @ actions-c8d038a747

Task Status
wheel-manylinux-2-28-cp315-cp315-amd64 GitHub Actions

@paultiq

paultiq commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

The build was destined for failure, because cp315 is not yet in the manylinux build. I'll reproduce locally and see if there's a graceful way to resolve, along with a clearer failure when PYTHON_ROOT is not found.

The build failed oddly, but the earlier issue was that the detection of PYTHON_ROOT failed quietly:

2025-11-21T08:07:23.9363828Z #20 [stage-0 13/16] RUN PYTHON_ROOT=$(find /opt/python -name cp315-cp315) && echo "export PATH=$PYTHON_ROOT/bin:$PATH" >> /etc/profile.d/python.sh
...
2025-11-21T08:08:01.3779653Z -- Found Python3: /bin/python3.11 (found version "3.11.11") found components: Interpreter

A test should be added to verify PYTHON_ROOT is set / not empty and fail fast:

RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-${PYTHON_ABI_TAG}) && \
echo "export PATH=$PYTHON_ROOT/bin:\$PATH" >> /etc/profile.d/python.sh

Build Failure

Crossbow failed due to

lto1: fatal error: bytecode stream in file ‘src/arrow/CMakeFiles/arrow_vendored.dir/Unity/unity_1_c.c.o’ generated with GCC compiler older than 10.0

caused by

2025-11-21T08:08:00.9596950Z -- The C compiler identification is GNU 8.5.0
. 2025-11-21T08:08:01.0402969Z -- The CXX compiler identification is GNU 14.2.1

@paultiq

paultiq commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

Looking more closely, and considering the history of 3.13 and 3.14:

This (nightlys) needs to wait manylinux adds cp315. The alternative is to add a cpython build step or use one of the other pre-built images, but this seems like more work than other projects are investing at this stage.

Based on history of 3.13/3.14, this would be after b1 / 2026-05-05.

@paultiq

paultiq commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit wheel-manylinux-2-28-cp315-cp315-amd64

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/27309459895

@paultiq

paultiq commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Retrying/restarting this, now that 3.15b2 is out and available on ManyLinux.

@kou

kou commented Jun 11, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-manylinux-2-28-cp315-cp315-amd64

@github-actions

Copy link
Copy Markdown

Revision: 6979e8c

Submitted crossbow builds: ursacomputing/crossbow @ actions-60ca234412

Task Status
wheel-manylinux-2-28-cp315-cp315-amd64 GitHub Actions

@raulcd

raulcd commented Jun 11, 2026

Copy link
Copy Markdown
Member

I forgot this issue existed. I took a stab last week as seen here (only local testing):

I added rustc and cargo to the images but libcst wasn't able to be built for Py3.15 due to PyO3 failures (no 3.15 support). Removing temporarily building libcst and the stubs build I had a green pass for tests.

@paultiq

paultiq commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Yup, I see same libcst blocker, cleared by this PR: Instagram/LibCST#1454 (status update/edit: it's now merged, waiting on release, a local test of 1.8.7.dev built successfully)

I got a good build against that PR:

# requirements-wheel-build.txt
libcst @ git+https://github.com/AlexWaygood/LibCST.git@add-315; python_version >= "3.15"
# pyproject.toml
    "libcst>=1.8.6; python_version < '3.15'",
    "libcst; python_version >= '3.15'",  # fork doesn't build with the version

Happy to close in favor of your PR, but otherwise will just wait for that libcst PR to land, then update this to build against libcst main for 3.15 testing

@hugovk

hugovk commented Aug 10, 2026

Copy link
Copy Markdown

The Python 3.15 release candidate is now out, and Instagram/LibCST#1454 has been merged and released in LibCST v1.9.0: https://github.com/Instagram/LibCST/releases/tag/v1.9.0.

And PyO3 should be ready for 3.15 as well now: https://github.com/PyO3/pyo3/releases/tag/v0.29.0.

@paultiq

paultiq commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Could someone run this build? I bumped the libcst dependency, and it built locally. Thx: @github-actions crossbow submit wheel-manylinux-2-28-cp315-cp315-amd64

@rok

rok commented Aug 13, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-manylinux-2-28-cp315-cp315-amd64

@github-actions

Copy link
Copy Markdown

Revision: 9ed3dc3

Submitted crossbow builds: ursacomputing/crossbow @ actions-c6a3c83c52

Task Status
wheel-manylinux-2-28-cp315-cp315-amd64 GitHub Actions

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Aug 18, 2026

@rok rok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me, but given my lack of knowledge here I defer to @raulcd.
I will only kick off the 3.14 jobs as this PR touches them a little.

@rok

rok commented Aug 18, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit cp314

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Revision: 1b9702d

Submitted crossbow builds: ursacomputing/crossbow @ actions-c6ec9a86bf

Task Status
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

@raulcd

raulcd commented Aug 18, 2026

Copy link
Copy Markdown
Member

Thanks @rok for kicking off the 3.14 wheels, the failures are related:

ERROR: Could not find a version that satisfies the requirement libcst>=1.9.0 (from versions: 0.1, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.21, 0.3.22, 0.3.23, 1.8.4, 1.8.5, 1.8.6)
ERROR: No matching distribution found for libcst>=1.9.0

@paultiq

paultiq commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

re: macos errors on amd64: as of libcst 1.9.0, libcst is no longer building a wheel for the only intel builder (macos-13): Instagram/LibCST#1433

The reason macos worked on cp315 and failed on cp314 is:

  • macos is the only platform where --only-binary is passed, which prevents source builds.
  • For cp315, I selectively bypassed this because another dependency (pyyaml, used by libcst) didn't yet have cp315 builds
  • Note: On intel, libcst + pyyaml must be built. On arm, only pyyaml is built.

Options:

  • Pin libcst to 1.8.6 for cp314 and below
  • Remove libcst dependency
  • ?

@rok

rok commented Aug 18, 2026

Copy link
Copy Markdown
Member

Pinning libcst is fine imo

@paultiq

paultiq commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Will do. I committed, but am running a test (on a crossbow fork) first. I'll ping when it's ready to run.

This will unlock this PR, but does punt the question of what to do about the --only-binary longer term on macos amd64. As it stands, arrow will need to always build libcst from source for the amd64 3.15 builds and above.

@paultiq

paultiq commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Could you run wheel-macos-monterey-cp314-cp314-amd64 and wheel-macos-monterey-cp315-cp315-amd64 again?

Thank you

@raulcd

raulcd commented Aug 19, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-macos-monterey-cp314-cp314-amd64 wheel-macos-monterey-cp315-cp315-amd64

@github-actions

Copy link
Copy Markdown

Revision: 189a10e

Submitted crossbow builds: ursacomputing/crossbow @ actions-abd5189d00

Task Status
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp315-cp315-amd64 GitHub Actions

@raulcd

raulcd commented Aug 19, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g wheel

@github-actions

Copy link
Copy Markdown

Revision: 189a10e

Submitted crossbow builds: ursacomputing/crossbow @ actions-a260277f36

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64 GitHub Actions
wheel-macos-monterey-cp315-cp315-amd64 GitHub Actions
wheel-macos-monterey-cp315-cp315-arm64 GitHub Actions
wheel-macos-monterey-cp315-cp315t-amd64 GitHub Actions
wheel-macos-monterey-cp315-cp315t-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64 GitHub Actions
wheel-manylinux-2-28-cp315-cp315-amd64 GitHub Actions
wheel-manylinux-2-28-cp315-cp315-arm64 GitHub Actions
wheel-manylinux-2-28-cp315-cp315t-amd64 GitHub Actions
wheel-manylinux-2-28-cp315-cp315t-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64 GitHub Actions
wheel-musllinux-1-2-cp315-cp315-amd64 GitHub Actions
wheel-musllinux-1-2-cp315-cp315-arm64 GitHub Actions
wheel-musllinux-1-2-cp315-cp315t-amd64 GitHub Actions
wheel-musllinux-1-2-cp315-cp315t-arm64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions
wheel-windows-cp315-cp315-amd64 GitHub Actions
wheel-windows-cp315-cp315t-amd64 GitHub Actions

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If no more comments, I'll merge this tomorrow. I will create an issue so we update to RC2 and the final release probably in time for 26.0.0.

@jorisvandenbossche

Copy link
Copy Markdown
Member

FWIW, pandas should now have nightly wheels for python 3.15, so that might avoid having to skip that

@paultiq

paultiq commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Sure, that'd be straightforward, something like this in requirements-test.txt and requirements-wheel-test.txt, and removing the PYARROW_TEST_PANDAS check.

+ --find-links https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/pandas/ # TODO: Remove after cp315 release
+ pandas; python_version < "3.15"
+ pandas>=3.1.0.dev0; python_version >= "3.15" # TODO: Remove after cp315 release

This PR or follow-on PR or rc2?

@paultiq

paultiq commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@raulcd I can reenable pandas here or in a separate pr as a followup, whichever you prefer. I tested it locally on manylinux and it passed.

@raulcd

raulcd commented Aug 21, 2026

Copy link
Copy Markdown
Member

Can you create an issue to follow it up? I'm happy doing it as a follow up

@raulcd
raulcd merged commit ba5ca20 into apache:main Aug 21, 2026
69 of 74 checks passed
@raulcd raulcd removed the awaiting merge Awaiting merge label Aug 21, 2026
@raulcd

raulcd commented Aug 21, 2026

Copy link
Copy Markdown
Member

Thanks for working on this @paultiq

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit ba5ca20.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants