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

Add another patch for numpy 2.0 (v1.84.x branch) #211

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

bkpoon
Copy link
Member

@bkpoon bkpoon commented Jul 17, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

This fixes an issue that came up starting with numpy 1.21 (segmentation faults in certain cases where a C++ array was exposed to Python), but was patched in numpy. numpy 2 removed the fix so the solution is to fix Boost. More details are described in this issue (boostorg/python#376). The upstream PR in Boost is here (boostorg/python#443).

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@bkpoon bkpoon changed the title Add another patch for numpy 2.0 Add another patch for numpy 2.0 (v1.84.x branch) Jul 17, 2024
@bkpoon
Copy link
Member Author

bkpoon commented Jul 17, 2024

@conda-forge-admin please rerender

@bkpoon
Copy link
Member Author

bkpoon commented Jul 20, 2024

I tested the patched Boost libraries with the code that I maintain with numpy versions 1.19 to 2.0, and the tests pass with the patched libraries. We have numerical arrays exposed to Python using Boost and we get segmentation faults without the fix (numpy 2 migrator for cctbx-base package)

I ran the tests with GitHub Actions and tested linux, Windows, and macOS (Intel and Apple Silicon). The patched packages for Boost and cctbx-base are on my testing channel (https://anaconda.org/cctbx-dev).

numpy Python Test results
1.19 3.9 https://github.com/cctbx/cctbx/actions/runs/10015271694
1.20 3.9 https://github.com/cctbx/cctbx/actions/runs/10015685246
1.21 3.9, 3.10 https://github.com/cctbx/cctbx/actions/runs/10015783111
1.22 3.9, 3.10 https://github.com/cctbx/cctbx/actions/runs/10016155821
1.23 3.9, 3.10, 3.11 https://github.com/cctbx/cctbx/actions/runs/10016930571
1.24 3.9, 3.10, 3.11 https://github.com/cctbx/cctbx/actions/runs/10017112169
1.25 3.9, 3.10, 3.11 https://github.com/cctbx/cctbx/actions/runs/10020687839
1.26 3.9, 3.10, 3.11, 3.12 https://github.com/cctbx/cctbx/actions/runs/10021771130
2.0 3.9, 3.10, 3.11, 3.12 https://github.com/cctbx/cctbx/actions/runs/10023084470

There is a Test environment info step that lists the packages in the testing environment and a Run subset of tests step for the actual tests that are run.

My concern with run_constrained is that there is probably code that is wrapped with Boost.Python, but does not go through this particular code path. If they have numpy in their environment, it would be updated unnecessarily. Considering that there have not been any other issues raised about this seems to indicate that this code path is not too common.

I can add the run_constrained option if always updating numpy is okay. Thoughts? Thanks!

@jakirkham
Copy link
Member

What are the next steps here?

@h-vetinari
Copy link
Member

What are the next steps here?

Rebase, or at least fix the conflict.

I can add the run_constrained option if always updating numpy is okay. Thoughts?

Thanks for the extensive testing. IIUC, things work with numpy 1.19 (which is the absolute lowest bound that any package produced here would require anyway), so then we don't need to add anything else here.

@jakirkham
Copy link
Member

@conda-forge-admin , please re-render

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/boost-feedstock/actions/runs/10068564811.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@jakirkham
Copy link
Member

That should fix the conflict

recipe/meta.yaml Outdated Show resolved Hide resolved
Co-authored-by: h-vetinari <[email protected]>
@jakirkham
Copy link
Member

Anything else?

@bkpoon
Copy link
Member Author

bkpoon commented Jul 29, 2024

Checking in to see if anything else needs to be done. Thanks!

@h-vetinari h-vetinari merged commit 30f8a10 into conda-forge:v1.84.x Jul 29, 2024
8 checks passed
@h-vetinari
Copy link
Member

Thank you!

@bkpoon
Copy link
Member Author

bkpoon commented Jul 29, 2024

Thanks! Feel free to ping me if there are any issues.

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.

4 participants