Skip to content

GH Issue: Set Numpy < 2.0.0 as a requirement since it breaks our package #1681

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

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Jun 17, 2024

Description

  • From the linked issue, if someone has numpy >2.0, it breaks our package. This is due to Numpy >2,0 supporting Python 3.9 and above and 2.0 being a major release (first major release since 2006), i.e., changing a lot of how Numpy functions. Specified version 2.0 or below with rye to avoid confusion. Also cleaned up whitespace in pyproject file. See linked issue for more information

  • Numpy just released this version on the 6/13. Provided a comment to pyproject for information we can remove this once we removed support for 3.8 in Oct due to EOL of 3.8

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

@Gabefire Gabefire linked an issue Jun 17, 2024 that may be closed by this pull request
@Gabefire Gabefire marked this pull request as ready for review June 17, 2024 13:57
@Gabefire Gabefire requested a review from a team as a code owner June 17, 2024 13:57
@Gabefire Gabefire changed the title specified numpy version GH Issue: Set Numpy < 2.0.0 as a requirement since it breaks our package Jun 17, 2024
@Gabefire Gabefire changed the title GH Issue: Set Numpy < 2.0.0 as a requirement since it breaks our package GH Issue (#1680): Set Numpy < 2.0.0 as a requirement since it breaks our package Jun 17, 2024
@Gabefire Gabefire changed the title GH Issue (#1680): Set Numpy < 2.0.0 as a requirement since it breaks our package GH Issue: Set Numpy < 2.0.0 as a requirement since it breaks our package Jun 17, 2024
@Gabefire Gabefire added the dependencies Pull requests that update a dependency file label Jun 17, 2024
Copy link
Contributor

@adrian-chang adrian-chang left a comment

Choose a reason for hiding this comment

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

Need to rebuild requirements.lock

eg rye sync or rye sync --update-all -f if you want to try and update all deps

@Gabefire Gabefire force-pushed the gu/updated_numpy_version branch from 9e88215 to 8142414 Compare June 17, 2024 19:01
@Gabefire
Copy link
Collaborator Author

Gabefire commented Jun 17, 2024

Need to rebuild requirements.lock

eg rye sync or rye sync --update-all -f if you want to try and update all deps

@adrian-chang So I did a ton of research once you mentioned this. Here is a quick loom
I did rye sync, but it did not change anything because I think it is due to these being an optional dependency. The current requirement don't have the optional dependencies. This loom also highlights the Pillow clean up fix I did. Please let me know what you think!

TLDR: essentially the optional dependencies don't get included on the requirements.lock. When install "labelbox[data]" it gives a pillow install error (pinned this version) and numpy 2.0.0 that was just released breaks the packageing, so pinned this version

Edit: disregard pillow change this is a Colab itself issue thus it is not a concern for us and should support the highest bug fix release

rye lock --all-features would include all the extra dependencies to the requirement.lock file if you want that

@Gabefire Gabefire requested a review from adrian-chang June 17, 2024 19:47
@adrian-chang adrian-chang requested a review from vbrodsky June 20, 2024 22:43
@Gabefire Gabefire merged commit e842cbf into develop Jun 20, 2024
10 of 20 checks passed
@Gabefire Gabefire deleted the gu/updated_numpy_version branch June 20, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: numpy.core.multiarray failed to import
3 participants