iceberg-python icon indicating copy to clipboard operation
iceberg-python copied to clipboard

Add Python version 3.13 to test matrix.

Open JE-Chen opened this issue 1 year ago • 10 comments

Fixes #1372 Add Python version 3.13 to matrix.

JE-Chen avatar Nov 26 '24 01:11 JE-Chen

Python Rust binding maximum supported version (3.12)

error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)

JE-Chen avatar Nov 26 '24 12:11 JE-Chen

@JE-Chen Thanks for checking. It looks like Py3O is already at 3.13: https://github.com/PyO3/pyo3/issues/4636 I was hoping that maybe bumping the Poetry build might fix it https://github.com/apache/iceberg-python/pull/1379. Could you rebase? Otherwise we have to track which dependency is still locked at this older version of Py3O.

Fokko avatar Nov 26 '24 20:11 Fokko

Done

JE-Chen avatar Nov 27 '24 03:11 JE-Chen

Same error.

error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)

JE-Chen avatar Nov 27 '24 07:11 JE-Chen

Currently, we are using pyo3 v0.20.3. I think only versions of pyo3 v0.21 or newer support Python 3.13. Some dependencies require pyo3 v0.20.3, but I don't find pyo3 listed in the Poetry requirements.

JE-Chen avatar Nov 27 '24 14:11 JE-Chen

@JE-Chen I think it pulls pyo3 in when it can't find pre-build wheels for a combination of the Python version and architecture.

Fokko avatar Dec 20 '24 14:12 Fokko

  at ~/.local/lib/python3.10/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with cramjam (2.8.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "cramjam (==2.8.3)"'.

Looks like we're still pinning on an older version of cramjam, as 2.9.1 is out already: https://pypi.org/project/cramjam/

Fokko avatar Dec 20 '24 14:12 Fokko

Fixing conflicts to see where we are with 3.13 :)

Fokko avatar Jan 15 '25 15:01 Fokko

Blocked on Ray 3.13 https://github.com/ray-project/ray/issues/49738

We can run poetry update after

kevinjqliu avatar Jan 19 '25 20:01 kevinjqliu

It looks like there is some progress: https://github.com/ray-project/ray/issues/49738#issuecomment-2755842804

We should also bump the upper bounds when generating the wheels: https://github.com/search?q=repo%3Aapache%2Ficeberg-python%20%3C3.13&type=code

Fokko avatar Apr 02 '25 08:04 Fokko

@JE-Chen Could you do another attempt? We've bumped to Ray 2.45, but the issue is still open 🤔

Fokko avatar May 03 '25 18:05 Fokko

yep ray 2.45 has artifacts for python 3.13 https://pypi.org/project/ray/2.45.0/#files

kevinjqliu avatar May 04 '25 01:05 kevinjqliu

Do I need to update this list?

https://github.com/JE-Chen/iceberg-python/blob/7768850d932a700a774719d1f4613ed9dc13ddf3/poetry.lock#L4486C1-L4486C10

image

JE-Chen avatar May 04 '25 05:05 JE-Chen

You dont need to change the content of the poetry.lock file directly, its generated by running poetry lock after modifying the pyproject.toml file.

Take a look at https://github.com/apache/iceberg-python/pull/1068 as an example. This is how we added 3.12 to the project

kevinjqliu avatar May 04 '25 16:05 kevinjqliu

You dont need to change the content of the poetry.lock file directly, its generated by running poetry lock after modifying the pyproject.toml file.

Take a look at #1068 as an example. This is how we added 3.12 to the project

Thanks for the information. So, I think I need to modify pyproject.toml.

https://github.com/JE-Chen/iceberg-python/blob/7768850d932a700a774719d1f4613ed9dc13ddf3/pyproject.toml#L68

I will run pre-commit and poetry lock later.

JE-Chen avatar May 04 '25 16:05 JE-Chen

Looks like 3.13 gave us some extra warnings

ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7f72ddf1ae30> ==== 52 failed, 2802 passed, 1093 deselected, 12 errors in 80.29s (0:01:20) ====

https://alexwlchan.net/til/2025/python3-13-sqlite-warnings/ https://github.com/pallets-eco/flask-sqlalchemy/issues/1379 https://github.com/pola-rs/polars/issues/20296

kevinjqliu avatar May 05 '25 16:05 kevinjqliu