Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported Python versions to include 3.13, remove 3.8 #1023

Open
JasonWeill opened this issue Oct 9, 2024 · 7 comments
Open

Update supported Python versions to include 3.13, remove 3.8 #1023

JasonWeill opened this issue Oct 9, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@JasonWeill
Copy link
Collaborator

Problem

Per https://devguide.python.org/versions/, on 2024-10-07, Python 3.13 was officially released, and Python 3.8 is now end of life (EOL). The documentation mentions 3.8 but does not mention 3.12.

Proposed Solution

Test this extension with Python 3.13. Add support for 3.13 and remove 3.8 as a supported Python version.

@krassowski
Copy link
Member

I've tried bumping the version on CI to 3.13 in #1029 but it looks like the dependencies are not ready:

@jupyter-ai/magics: Building wheels for collected packages: jupyter_ai_magics, jsonpath-ng, numpy, pyarrow, tokenizers, fastavro, sentencepiece
@jupyter-ai/magics:   Building editable for jupyter_ai_magics (pyproject.toml): started
@jupyter-ai/magics:   Building editable for jupyter_ai_magics (pyproject.toml): finished with status 'done'
@jupyter-ai/magics:   Created wheel for jupyter_ai_magics: filename=jupyter_ai_magics-2.25.0-py3-none-any.whl size=4192 sha256=fefeb6e4a7611aad581f112533849048ba27cfbf13e3c088611dd1f67d0713ee
@jupyter-ai/magics:   Stored in directory: /tmp/pip-ephem-wheel-cache-w0mjej1b/wheels/31/1c/38/c11594954714690c0c46346d59bc385ef752ef76903e01896c
@jupyter-ai/magics:   Building wheel for jsonpath-ng (pyproject.toml): started
@jupyter-ai/magics:   Building wheel for jsonpath-ng (pyproject.toml): finished with status 'done'
@jupyter-ai/magics:   Created wheel for jsonpath-ng: filename=jsonpath_ng-1.7.0-py3-none-any.whl size=30100 sha256=f6d7687a64b09213fa71b546d62e1c9ab5db7107f1e441e90111e899947adc6a
@jupyter-ai/magics:   Stored in directory: /home/runner/.cache/pip/wheels/e9/25/cb/994c9e117083ff481c85008cdbc9f3abf5027a8645ca6b6b51
@jupyter-ai/magics:   Building wheel for numpy (pyproject.toml): started
@jupyter-ai/magics:   Building wheel for numpy (pyproject.toml): finished with status 'done'
@jupyter-ai/magics:   Created wheel for numpy: filename=numpy-1.26.4-cp313-cp313-linux_x86_64.whl size=6917291 sha256=35bba69d126b4acc4d4649652463d17a8b189a415174f88a70ce22fd78b3b15b
@jupyter-ai/magics:   Stored in directory: /home/runner/.cache/pip/wheels/8b/2d/9f/b6b46373f328e2ef50388915d351ccacbedac929459b5459bf
@jupyter-ai/magics:   Building wheel for pyarrow (pyproject.toml): started
@jupyter-ai/magics:   Building wheel for pyarrow (pyproject.toml): finished with status 'error'
@jupyter-ai/magics:   error: subprocess-exited-with-error
@jupyter-ai/magics:   
@jupyter-ai/magics:   × Building wheel for pyarrow (pyproject.toml) did not run successfully.
@jupyter-ai/magics:   │ exit code: 1
@jupyter-ai/magics:   ╰─> [395 lines of output]
@jupyter-ai/magics:       <string>:34: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
@jupyter-ai/magics:       running bdist_wheel
@jupyter-ai/magics:       running build
@jupyter-ai/magics:       running build_py
@jupyter-ai/magics:       creating build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/flight.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/benchmark.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/_compute_docstrings.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/acero.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/json.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/feather.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/compute.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/jvm.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/util.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/conftest.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/__init__.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/substrait.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/csv.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/types.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/ipc.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/_generated_version.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/cffi.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/dataset.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/fs.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/orc.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/pandas_compat.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       copying pyarrow/cuda.py -> build/lib.linux-x86_64-cpython-313/pyarrow
@jupyter-ai/magics:       creating build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/convert_pandas.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/array_ops.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/streaming.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/parquet.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/io.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/common.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/__init__.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:       copying benchmarks/microbenchmarks.py -> build/lib.linux-x86_64-cpython-313/benchmarks
@jupyter-ai/magics:          Compiling regex-syntax v0.8.5
@jupyter-ai/magics:          Compiling byteorder v1.5.0
@jupyter-ai/magics:          Compiling pkg-config v0.3.31
@jupyter-ai/magics:          Compiling rayon-core v1.12.1
@jupyter-ai/magics:          Compiling darling_core v0.20.10
@jupyter-ai/magics:          Compiling serde_derive v1.0.210
@jupyter-ai/magics:          Compiling darling_macro v0.20.10
@jupyter-ai/magics:          Compiling zerocopy-derive v0.7.35
@jupyter-ai/magics:          Compiling either v1.13.0
@jupyter-ai/magics:          Compiling parking_lot_core v0.9.10
@jupyter-ai/magics:          Compiling zerocopy v0.7.35
@jupyter-ai/magics:          Compiling darling v0.20.10
@jupyter-ai/magics:          Compiling regex-automata v0.4.8
@jupyter-ai/magics:          Compiling onig_sys v69.8.1
@jupyter-ai/magics:       error: failed to run custom build command for `pyo3-ffi v0.21.2`
@jupyter-ai/magics:       
@jupyter-ai/magics:       Caused by:
@jupyter-ai/magics:         process didn't exit successfully: `/tmp/pip-install-9s6smof8/tokenizers_c63090b8c4fe4e4db2bf4856b6fb172a/bindings/python/target/release/build/pyo3-ffi-a4e2687e45f3d2c6/build-script-build` (exit status: 1)
@jupyter-ai/magics:         --- stdout
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_CROSS
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
@jupyter-ai/magics:         cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
@jupyter-ai/magics:       
@jupyter-ai/magics:         --- stderr
@jupyter-ai/magics:         error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
@jupyter-ai/magics:         = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
@jupyter-ai/magics:         = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
@jupyter-ai/magics:       warning: build failed, waiting for other jobs to finish...
@jupyter-ai/magics:       💥 maturin failed
@jupyter-ai/magics:         Caused by: Failed to build a native library through cargo
@jupyter-ai/magics:         Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/opt/hostedtoolcache/Python/3.13.0/x64/bin/python" PYTHON_SYS_EXECUTABLE="/opt/hostedtoolcache/Python/3.13.0/x64/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-9s6smof8/tokenizers_c63090b8c4fe4e4db2bf4856b6fb172a/bindings/python/Cargo.toml" "--release" "--lib"`
@jupyter-ai/magics:       Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/opt/hostedtoolcache/Python/3.13.0/x64/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
@jupyter-ai/magics:       [end of output]
@jupyter-ai/magics:   
@jupyter-ai/magics:   note: This error originates from a subprocess, and is likely not a problem with pip.
@jupyter-ai/magics:   ERROR: Failed building wheel for tokenizers
@jupyter-ai/magics:   Building wheel for fastavro (pyproject.toml): started
@jupyter-ai/magics:   Building wheel for fastavro (pyproject.toml): finished with status 'done'
@jupyter-ai/magics:   Created wheel for fastavro: filename=fastavro-1.9.7-cp313-cp313-linux_x86_64.whl size=3286831 sha256=74a36638f5721809cc59b7b8f14136c882d96613ac8be48219cb2699e4727849
@jupyter-ai/magics:   Stored in directory: /home/runner/.cache/pip/wheels/9e/fe/0b/429cdc095e0d5ded719efce8d3147f639b9f8ae7e7d9a89d96
@jupyter-ai/magics:   Building wheel for sentencepiece (pyproject.toml): started
@jupyter-ai/magics:   Building wheel for sentencepiece (pyproject.toml): finished with status 'done'
@jupyter-ai/magics:   Created wheel for sentencepiece: filename=sentencepiece-0.2.0-cp313-cp313-linux_x86_64.whl size=1291226 sha256=30d6d6eaae02e49d2a4f9a7f8f92fa1d0c95edc0654143f02799f38e63af7e83
@jupyter-ai/magics:   Stored in directory: /home/runner/.cache/pip/wheels/02/3d/f0/8dbb11925fbd58340b128ae9334ae7028332d7a5751738f616
@jupyter-ai/magics: Successfully built jupyter_ai_magics jsonpath-ng numpy fastavro sentencepiece
@jupyter-ai/magics: Failed to build pyarrow tokenizers
@jupyter-ai/magics: ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyarrow, tokenizers)

@dlqqq
Copy link
Member

dlqqq commented Oct 14, 2024

@krassowski Thank you for documenting your research here! In summary, we need to wait for pyarrow and tokenizers to have Python 3.13 distributions before we can declare Python 3.13 support.

@krassowski
Copy link
Member

Yes, though I would personally also wait until the CI passes with tests running on Python 3.13 before declaring support.

@cecilyen
Copy link

cecilyen commented Nov 1, 2024

pyarrow has added support for Python 3.13. https://arrow.apache.org/docs/python/install.html#:~:text=3.13

@cecilyen
Copy link

cecilyen commented Nov 1, 2024

tokenizers just added Python 3.13 support today. huggingface/tokenizers#1665

@krassowski
Copy link
Member

tokenizers just added Python 3.13 support today. huggingface/tokenizers#1665

It looks like PR was merged but there has not been a new release yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants