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

chore: try to reintroduce Python 3.12, now that NumPy has released a beta. #2644

Merged
merged 18 commits into from
Sep 12, 2023

Conversation

jpivarski
Copy link
Member

@jpivarski jpivarski commented Aug 14, 2023

Here's the first test (on this branch, not deploying to PyPI):

https://github.com/scikit-hep/awkward/actions/runs/5857811221

@jpivarski jpivarski temporarily deployed to docs-preview August 14, 2023 16:09 — with GitHub Actions Inactive
@henryiii henryiii temporarily deployed to docs-preview August 14, 2023 16:50 — with GitHub Actions Inactive
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the jpivarski/test-NumPy-in-awkward_cpp branch from b0a0485 to c565f8f Compare August 14, 2023 18:20
@henryiii henryiii temporarily deployed to docs-preview August 14, 2023 18:31 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to docs-preview August 14, 2023 19:05 Inactive
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

style: pre-commit fixes
@henryiii henryiii force-pushed the jpivarski/test-NumPy-in-awkward_cpp branch from be1d5fa to 714f864 Compare August 14, 2023 19:14
@henryiii henryiii temporarily deployed to docs-preview August 14, 2023 19:25 — with GitHub Actions Inactive
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the jpivarski/test-NumPy-in-awkward_cpp branch from 714f864 to d6e59d3 Compare August 14, 2023 19:31
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #2644 (5ef5c77) into main (2825fad) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 21.42%.

❗ Current head 5ef5c77 differs from pull request most recent head 4f50eb3. Consider uploading reports for the commit 4f50eb3 to get more accurate results

Additional details and impacted files
Files Changed Coverage Δ
src/awkward/_connect/numba/layout.py 83.68% <10.00%> (ø)
src/awkward/_connect/numba/arrayview.py 93.37% <50.00%> (ø)
src/awkward/_connect/numba/builder.py 84.95% <50.00%> (ø)

@henryiii henryiii temporarily deployed to docs-preview August 14, 2023 19:44 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview August 18, 2023 08:15 — with GitHub Actions Inactive
@jpivarski
Copy link
Member Author

Currently, the error is due to the cmake package on PyPI. The Linux Python 3.12 test fails because

... (lots of output, ending with) ...
  pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.12.0-rc.1/x64/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 "/opt/hostedtoolcache/Python/3.12.0-rc.1/x64/lib/python3.12/importlib/__init__.py", line 90, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1216, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 994, in exec_module
    File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
    File "/tmp/pip-build-env-1e13_weg/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 10, in <module>
      import distutils.core
  ModuleNotFoundError: No module named 'distutils'

  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /opt/hostedtoolcache/Python/3.12.0-rc.1/x64/bin/python /opt/hostedtoolcache/Python/3.12.0-rc.1/x64/lib/python3.12/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-opv7ul0k/overlay --no-warn-script-location --no-binary :none: --only-binary cmake -i https://pypi.org/simple -- 'cython >= 0.29.31' 'oldest-supported-numpy>=0.14' setuptools_scm 'setuptools >= 40.1.0' wheel
  cwd: [inherit]
  Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2

That's a long pip-install command, but I see cmake as the only package mentioned among all of the installation flags.

In the cmake pip package's setup.py file, I see

https://github.com/scikit-build/cmake-python-distributions/blob/0acab486a2d7b4ae06b9c39a5d178402ee5b0afe/setup.py#L6

trying to import distutils. I also looked at the source package for the most recent release of the cmake package on PyPI and the

from distutils.text_file import TextFile

line is in that setup.py, too.

I don't see any open issues on the cmake repository about "3.12" or "distutils", so I'll report this there unless @henryiii thinks this couldn't be related for some reason. (We are, after all, trying to get a binary-only cmake package, and the setup.py file is not in the binary wheels.)

@agoose77
Copy link
Collaborator

I don't think this is CMake. When I was digging, it looked like maybe oldest-supported-numpy was pulling in a NumPy sdist. I was unsure as to why this happens, as we also pull in the pre-release. I wondered if the sdist needed to be build in order for pip to find the metadata, but that seems unlikely.

@agoose77 agoose77 temporarily deployed to docs-preview August 25, 2023 11:42 — with GitHub Actions Inactive
@jpivarski
Copy link
Member Author

Awkward 2.4.0 will not support Python 3.12, but the next one probably will.

@agoose77 agoose77 temporarily deployed to docs-preview September 8, 2023 20:01 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview September 11, 2023 20:53 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview September 11, 2023 21:25 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview September 12, 2023 08:21 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview September 12, 2023 11:35 — with GitHub Actions Inactive
pyarrow-package: "pyarrow==7.0.0"
- python-version: '3.12'
numpy-package: "numpy>=1.26.0b1"
pyarrow-package: "pyarrow;python_version<'3.12'"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Disable pyarrow for 3.12 without breaking shell

@agoose77 agoose77 marked this pull request as ready for review September 12, 2023 13:04
@agoose77
Copy link
Collaborator

@jpivarski can you give this a once-over? I'm happy to merge now.

@agoose77 agoose77 temporarily deployed to docs-preview September 12, 2023 13:16 — with GitHub Actions Inactive
Copy link
Member Author

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

I think it looks good and can go ahead before we hear back from @henryiii on Slack about NumPy's thin wheels.

I apparently can't press the "approve" button on my phone, but I approve this.

The two tests that haven't run are the ones with minimal NumPy and minimal pyarrow. The fact that this was merged with main and they're not running could be a sign that they were accidentally dropped in a merger (since you're touching the same files). Could you check on that, to make sure they don't get lost when you merge this into main?

@henryiii
Copy link
Member

You can approve from a phone as long as you are it the code view part (on web or GitHub's App).

@agoose77
Copy link
Collaborator

@jpivarski this PR fuses the two separate NumPy and pyarrow lower-bound tests to run them at the same time. I don't think this is essential, so I'll revert it such that we don't need to change our required tests.

@agoose77 agoose77 merged commit bb03130 into main Sep 12, 2023
32 checks passed
@agoose77 agoose77 deleted the jpivarski/test-NumPy-in-awkward_cpp branch September 12, 2023 15:10
@agoose77 agoose77 temporarily deployed to docs-preview September 12, 2023 15:22 — with GitHub Actions Inactive
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.

3 participants