Skip to content

GH-37880: [CI][Python][Packaging] Add support for Python 3.12 - #37901

Merged
raulcd merged 30 commits into
apache:mainfrom
raulcd:GH-37880
Oct 11, 2023
Merged

GH-37880: [CI][Python][Packaging] Add support for Python 3.12#37901
raulcd merged 30 commits into
apache:mainfrom
raulcd:GH-37880

Conversation

@raulcd

@raulcdraulcd commented Sep 27, 2023

Copy link
Copy Markdown
Member

Rationale for this change

Python 3.12 will be released in the next couple of weeks. We should add the wheels for pyarrow on our 14.0.0 release.

What changes are included in this PR?

This PR adds jobs to build pyarrow wheels for Python 3.12.

Are these changes tested?

They will be tested via archery tasks

Are there any user-facing changes?

No but users will be able to use pyarrow with Python 3.12

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit cp312

@github-actions

Copy link
Copy Markdown

Revision: 907f66d

Submitted crossbow builds: ursacomputing/crossbow @ actions-6d09e69209

TaskStatus
wheel-macos-big-sur-cp312-arm64Github Actions
wheel-macos-mojave-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-arm64Github Actions
wheel-manylinux-2014-cp312-amd64Github Actions
wheel-manylinux-2014-cp312-arm64Github Actions
wheel-windows-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp312-amd64

@github-actions

Copy link
Copy Markdown

Revision: 5cee4a8

Submitted crossbow builds: ursacomputing/crossbow @ actions-2decf3cc0d

TaskStatus
wheel-macos-mojave-cp312-amd64Github Actions

@raulcd

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@raulcd

Copy link
Copy Markdown
MemberAuthor

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

@github-actions

Copy link
Copy Markdown

Revision: 54d5d34

Submitted crossbow builds: ursacomputing/crossbow @ actions-ca5ce95faa

TaskStatus
wheel-manylinux-2-28-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

The macOS issue seems to fail due to this (https://github.com/ursacomputing/crossbow/actions/runs/6326301003/job/17179575146#step:13:173):
pypa/setuptools#3661
I'll investigate further, here the error log:

 File "/Users/runner/work/crossbow/crossbow/test-amd64-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-bw0gv97b/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 10, in <module>
import distutils.core
ModuleNotFoundError: No module named 'distutils'

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp312-amd64

@github-actions

Copy link
Copy Markdown

Revision: 349f362

Submitted crossbow builds: ursacomputing/crossbow @ actions-f607b07df1

TaskStatus
wheel-macos-mojave-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

I am facing some issues when updating setuptools with numpy:

 File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-2rp89sp0/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-2rp89sp0/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-2rp89sp0/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]

This seems related to: pypa/pip#12179

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp312-amd64

@github-actions

Copy link
Copy Markdown

Revision: 3e3046c

Submitted crossbow builds: ursacomputing/crossbow @ actions-635103f8ad

TaskStatus
wheel-macos-mojave-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

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

@github-actions

Copy link
Copy Markdown

Revision: 125ac34

Submitted crossbow builds: ursacomputing/crossbow @ actions-70da4f8be9

TaskStatus
wheel-manylinux-2-28-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp312-amd64

@github-actions

Copy link
Copy Markdown

Revision: dbd90cc

Submitted crossbow builds: ursacomputing/crossbow @ actions-93131c2a12

TaskStatus
wheel-macos-mojave-cp312-amd64Github Actions

@raulcd

raulcd commented Sep 27, 2023

Copy link
Copy Markdown
MemberAuthor

There seems to be an issue compiling grpcio with Python 3.12:
grpc/grpc#33063
It seems it will be released soon as v1.59.0-pre1 seems to contain a fix for it: https://github.com/grpc/grpc/releases/tag/v1.59.0-pre1
I am facing the same issue on the macos wheels here: https://github.com/ursacomputing/crossbow/actions/runs/6328784518/job/17187734569#step:13:10233
and the manylinux one here: https://github.com/ursacomputing/crossbow/actions/runs/6328121689/job/17185543580#step:10:12731
I might disable google testbench temporarily to run the rest of the tests.

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp312-amd64

@github-actions

Copy link
Copy Markdown

Revision: e92c96b

Submitted crossbow builds: ursacomputing/crossbow @ actions-b8b091adfb

TaskStatus
wheel-macos-mojave-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit cp312

@github-actions

Copy link
Copy Markdown

Revision: e92c96b

Submitted crossbow builds: ursacomputing/crossbow @ actions-fa45089ccb

TaskStatus
wheel-macos-big-sur-cp312-arm64Github Actions
wheel-macos-mojave-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-arm64Github Actions
wheel-manylinux-2014-cp312-amd64Github Actions
wheel-manylinux-2014-cp312-arm64Github Actions
wheel-windows-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit cp312

@github-actions

Copy link
Copy Markdown

Revision: b1d98ea5109ace814c0baa62cce326ea9c6e0e7b

Submitted crossbow builds: ursacomputing/crossbow @ actions-817b67d67c

TaskStatus
wheel-macos-big-sur-cp312-arm64Github Actions
wheel-macos-mojave-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-arm64Github Actions
wheel-manylinux-2014-cp312-amd64Github Actions
wheel-manylinux-2014-cp312-arm64Github Actions
wheel-windows-cp312-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-big-sur-cp312-arm64

@raulcd

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit wheel-macos-mojave-cp310-amd64

@github-actions

Copy link
Copy Markdown

Revision: 27a979c

Submitted crossbow builds: ursacomputing/crossbow @ actions-1822e92828

TaskStatus
wheel-macos-mojave-cp310-amd64Github Actions

@raulcd

Copy link
Copy Markdown
MemberAuthor

@pitrou@jorisvandenbossche any other concern here? I would like to merge it.

@pitrou

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g wheel -g python

@pitrou

Copy link
Copy Markdown
Member

Let's make sure the 3.10 version change didn't break anything else?

@github-actions

Copy link
Copy Markdown

Revision: 27a979c

Submitted crossbow builds: ursacomputing/crossbow @ actions-1c7e96dd5f

TaskStatus
test-conda-python-3.10Github Actions
test-conda-python-3.10-cython2Github Actions
test-conda-python-3.10-hdfs-2.9.2Github Actions
test-conda-python-3.10-hdfs-3.2.1Github Actions
test-conda-python-3.10-pandas-latestGithub Actions
test-conda-python-3.10-pandas-nightlyGithub Actions
test-conda-python-3.10-spark-v3.5.0Github Actions
test-conda-python-3.10-substraitGithub Actions
test-conda-python-3.11Github Actions
test-conda-python-3.11-dask-latestGithub Actions
test-conda-python-3.11-dask-upstream_develGithub Actions
test-conda-python-3.11-hypothesisGithub Actions
test-conda-python-3.11-pandas-upstream_develGithub Actions
test-conda-python-3.11-spark-masterGithub Actions
test-conda-python-3.12Github Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-pandas-1.0Github Actions
test-conda-python-3.8-spark-v3.5.0Github Actions
test-conda-python-3.9Github Actions
test-conda-python-3.9-pandas-latestGithub Actions
test-cuda-pythonGithub Actions
test-debian-11-python-3Azure
test-fedora-35-python-3Azure
test-ubuntu-20.04-python-3Azure
test-ubuntu-22.04-python-3Github Actions
wheel-cleanGithub Actions
wheel-macos-big-sur-cp310-arm64Github Actions
wheel-macos-big-sur-cp311-arm64Github Actions
wheel-macos-big-sur-cp312-arm64Github Actions
wheel-macos-big-sur-cp38-arm64Github Actions
wheel-macos-big-sur-cp39-arm64Github Actions
wheel-macos-mojave-cp310-amd64Github Actions
wheel-macos-mojave-cp311-amd64Github Actions
wheel-macos-mojave-cp312-amd64Github Actions
wheel-macos-mojave-cp38-amd64Github Actions
wheel-macos-mojave-cp39-amd64Github Actions
wheel-manylinux-2-28-cp310-amd64Github Actions
wheel-manylinux-2-28-cp310-arm64Github Actions
wheel-manylinux-2-28-cp311-amd64Github Actions
wheel-manylinux-2-28-cp311-arm64Github Actions
wheel-manylinux-2-28-cp312-amd64Github Actions
wheel-manylinux-2-28-cp312-arm64Github Actions
wheel-manylinux-2-28-cp38-amd64Github Actions
wheel-manylinux-2-28-cp38-arm64Github Actions
wheel-manylinux-2-28-cp39-amd64Github Actions
wheel-manylinux-2-28-cp39-arm64Github Actions
wheel-manylinux-2014-cp310-amd64Github Actions
wheel-manylinux-2014-cp310-arm64Github Actions
wheel-manylinux-2014-cp311-amd64Github Actions
wheel-manylinux-2014-cp311-arm64Github Actions
wheel-manylinux-2014-cp312-amd64Github Actions
wheel-manylinux-2014-cp312-arm64Github Actions
wheel-manylinux-2014-cp38-amd64Github Actions
wheel-manylinux-2014-cp38-arm64Github Actions
wheel-manylinux-2014-cp39-amd64Github Actions
wheel-manylinux-2014-cp39-arm64Github Actions
wheel-windows-cp310-amd64Github Actions
wheel-windows-cp311-amd64Github Actions
wheel-windows-cp312-amd64Github Actions
wheel-windows-cp38-amd64Github Actions
wheel-windows-cp39-amd64Github Actions

@pitrou

Copy link
Copy Markdown
Member

There are a lot of fsspec/s3fs errors that are unrelated to this PR.

test-conda-python-3.12 also fails installing dependencies from conda-forge, because gdb seems incompatible with Python 3.12. This can probably be fixed later.

@pitrou

Copy link
Copy Markdown
Member

I think the CI results are ok otherwise, so we can merge.

@github-actionsgithub-actionsBot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Oct 11, 2023
@jorisvandenbossche

Copy link
Copy Markdown
Member

A merge with main might be sufficient to get rid of the failures? We saw the same yesterday in the encryption PR, and after a merge they went away.
But indeed, if the triggered wheels builds are passing, that's probably also good enough to merge this directly.

@jorisvandenbossche

Copy link
Copy Markdown
Member

Restarted one of the failing wheel builds, as that seemed a temporary download failure.

@raulcdraulcd left a comment

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

👍 I am merging this! Thanks

@raulcd
raulcd merged commit 7695935 into apache:mainOct 11, 2023
@raulcdraulcd removed the awaiting changes Awaiting changes label Oct 11, 2023
@github-actionsgithub-actionsBot added the awaiting changes Awaiting changes label Oct 11, 2023
raulcd added a commit that referenced this pull request Oct 11, 2023
### Rationale for this change
Python 3.12 will be released in the next couple of weeks. We should add the wheels for pyarrow on our 14.0.0 release.
### What changes are included in this PR?
This PR adds jobs to build pyarrow wheels for Python 3.12.
### Are these changes tested?
They will be tested via archery tasks
### Are there any user-facing changes?
No but users will be able to use pyarrow with Python 3.12
* Closes: #37880
Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@conbench-apache-arrow

Copy link
Copy Markdown

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

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.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…pache#37901)
### Rationale for this change
Python 3.12 will be released in the next couple of weeks. We should add the wheels for pyarrow on our 14.0.0 release.
### What changes are included in this PR?
This PR adds jobs to build pyarrow wheels for Python 3.12.
### Are these changes tested?
They will be tested via archery tasks
### Are there any user-facing changes?
No but users will be able to use pyarrow with Python 3.12
* Closes: apache#37880
Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…pache#37901)
### Rationale for this change
Python 3.12 will be released in the next couple of weeks. We should add the wheels for pyarrow on our 14.0.0 release.
### What changes are included in this PR?
This PR adds jobs to build pyarrow wheels for Python 3.12.
### Are these changes tested?
They will be tested via archery tasks
### Are there any user-facing changes?
No but users will be able to use pyarrow with Python 3.12
* Closes: apache#37880
Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
jorisvandenbossche added a commit that referenced this pull request Aug 22, 2024
### Rationale for this change
Like #43519 mentionies, now that the first `rc` is out, it's probably time to add CI coverage for Python 3.13 (and also start building wheels).
### What changes are included in this PR?
I'm fairly new to the build/CI processes of the project, but I tried to follow the same template as #37901. I'll follow up afterwards with adding CI coverage for the free-threaded build as well.
* GitHub Issue: #43519
Lead-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changesAwaiting changesComponent: PythonPriority: BlockerMarks a blocker for the release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python][Packaging] Support Python 3.12 and upload wheels to PyPI

5 participants

@raulcd@terencehonles@pitrou@jorisvandenbossche@filmor