Skip to content

Support python 3.14#3299

Open
afeldman1 wants to merge 10 commits intoapache:mainfrom
afeldman1:main
Open

Support python 3.14#3299
afeldman1 wants to merge 10 commits intoapache:mainfrom
afeldman1:main

Conversation

@afeldman1
Copy link
Copy Markdown

@afeldman1 afeldman1 commented Apr 30, 2026

Rationale for this change

Adds prebuilt support for python 3.14
Free-threaded is still not supported for now
Closes #3123 for standard python

Are these changes tested?

test using:
PYTHON=3.14 make test
PYTHON=3.14 make test-integration

Python Build Release Candidate workflow was run: https://github.com/afeldman1/iceberg-python/actions/runs/25225067214

Are there any user-facing changes?

Just support of python 3.14

Copy link
Copy Markdown
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, a couple of suggestions

I tested this locally with

PYTHON=3.14 make test
PYTHON=3.14 RAY_ENABLE_UV_RUN_RUNTIME_ENV=0 make test-integration 

Comment thread .github/workflows/svn-build-artifacts.yml
Comment thread .github/workflows/python-ci.yml Outdated
Comment thread tests/conftest.py
@kevinjqliu
Copy link
Copy Markdown
Contributor

kevinjqliu commented May 1, 2026

Could you also test the python-release.yml workflow on your branch?
https://github.com/afeldman1/iceberg-python/actions/workflows/python-release.yml

Manual trigger with these parameters:
Branch: main (the PR branch)
Version: 0.11.0
Release Candidate: 1

and include the link in the PR

This will help test the changes in .github/workflows/pypi-build-artifacts.yml and .github/workflows/svn-build-artifacts.yml

Comment thread .github/workflows/svn-build-artifacts.yml Outdated
Comment thread Makefile Outdated
@kevinjqliu
Copy link
Copy Markdown
Contributor

i think we can use this

@pytest.fixture(scope="session")
def ray_session() -> Generator[Any, None, None]:
    """Fixture to manage Ray initialization and shutdown for tests."""
    import os

    import ray

    # Disable Ray's automatic uv environment propagation to workers.
    # When tests are invoked via `uv run`, Ray detects the wrapper and tries
    # to package the working directory for remote workers, which is unnecessary
    # and problematic in local single-node test mode.
    os.environ["RAY_ENABLE_UV_RUN_RUNTIME_ENV"] = "0"

    ray.init(
        ignore_reinit_error=True,
    )
    yield ray
    ray.shutdown()

And remove RAY_ENABLE_UV_RUN_RUNTIME_ENV from Makefile.

WDYT?

@afeldman1
Copy link
Copy Markdown
Author

@kevinjqliu That looks the same as what I had originally attempted in this commit, which failed on integration test due to not picking up the env variable, set at that point in the flow.
b50e909

@Fokko
Copy link
Copy Markdown
Contributor

Fokko commented May 2, 2026

Thanks for working on this @afeldman1. I think in general this looks good, but I think it would be good to document RAY_ENABLE_UV_RUN_RUNTIME_ENV , I had to look it up: https://docs.ray.io/en/latest/_modules/ray/_private/worker.html

@kevinjqliu
Copy link
Copy Markdown
Contributor

kevinjqliu commented May 2, 2026

That looks the same as what I had originally attempted in this commit, which failed on integration test due to not picking up the env variable, set at that point in the flow.

hm do you remember what the error was? this worked for me when i tested it locally

PYTHON=3.14 make install
PYTHON=3.14 make test
PYTHON=3.14 make test-integration

EDIT: nevermind, i didnt remove the env var declaration in Makefile

@kevinjqliu
Copy link
Copy Markdown
Contributor

kevinjqliu commented May 2, 2026

ok i tried this solution, we can override it using pytest hook.
https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.hookspec.pytest_configure

This hook is called for every plugin and initial conftest file after command line options have been parsed.

def pytest_configure(config: pytest.Config) -> None:
    os.environ["RAY_ENABLE_UV_RUN_RUNTIME_ENV"] = "0"

tested that it works with

uv run pytest -m integration tests/integration/test_reads.py::test_ray_nan

@afeldman1
Copy link
Copy Markdown
Author

@Fokko Where were you thinking the documentation should go?

Copy link
Copy Markdown
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this.

could you retrigger https://github.com/afeldman1/iceberg-python/actions/workflows/python-release.yml for a final check

Comment thread tests/conftest.py
Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
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.

FR: Support and provide prebuilt Python 3.14 and 3.14 free-threaded wheels

3 participants