Skip to content

update: numpy, pandas, sdl2 #3164

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

T-Dynamos
Copy link
Contributor

@T-Dynamos T-Dynamos commented Jun 17, 2025

Closes #3163

Split #3136

@T-Dynamos T-Dynamos marked this pull request as draft June 17, 2025 12:55
@T-Dynamos T-Dynamos force-pushed the numpy-update branch 4 times, most recently from 40f08b6 to a09a2b3 Compare June 19, 2025 12:21
@T-Dynamos T-Dynamos changed the title numpy: update to 2.3.0 update: numpy, pandas, sdl2 Jun 19, 2025
@T-Dynamos T-Dynamos force-pushed the numpy-update branch 3 times, most recently from 1cd30ca to edea820 Compare June 19, 2025 13:28
@T-Dynamos T-Dynamos marked this pull request as ready for review June 19, 2025 13:46
@T-Dynamos
Copy link
Contributor Author

T-Dynamos commented Jun 19, 2025

Ready for review. Hope it can be merged soon!

(One action failed, probably due to an internet connection error)

@kuzeyron kuzeyron added recipe core-providers Core code that's not a recipe labels Jun 24, 2025
@T-Dynamos
Copy link
Contributor Author

@AndreMiras any updates on this?

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

Yeah thanks for addressing the site package exclude thingy in a different way, at least now it doesn't impact all the other recipes.
However, generally speaking I'm cautious with changes in the core code that introduce a bit more complexity specially if it's for some very rare cases, I hope you understand.

While the changes in download_if_necessary() are easy to grasp and could easily help for more than a couple of recipes, I still want to believe we could try a different approach for the site package exclude dir exception case.
Maybe addressing it from within the Numpy recipe wouldn't be the sexiest, but at least it would be more contained.
Would you mind giving this specific part an extra thought otherwise I can give it a try when I get a chance.
This might as well not be easy at all or would in fact introduce much more complexity and completely off balance the benefits. I haven't explored, but it might be worth thinking about it and giving it a try.
Edit: my naive thought on that one is to Recipe.get_recipe('python3', self.ctx) from numpy prebuild_arch() to then mutate site_packages_dir_blacklist there. It's definitely hacky, but much more contained.

Also if @misl6 thinks otherwise, I totally trust him to make the right call, he's much more active and knowledgeable that anyone else regarding this code base

@@ -48,7 +48,7 @@ def temp_directory():
temp_dir, Err_Fore.RESET)))


def walk_valid_filens(base_dir, invalid_dir_names, invalid_file_patterns):
def walk_valid_filens(base_dir, invalid_dir_names, invalid_file_patterns, excluded_dir_exceptions=[]):
Copy link
Member

Choose a reason for hiding this comment

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

I know this looks convenient, but could you update to excluded_dir_exceptions=None instead. And then in the function body you can excluded_dir_exceptions = [] if excluded_dir_exceptions is None else excluded_dir_exceptions.
There's a gotcha with mutable default arguments in Python that could lead to bugs painful to track.
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
I know we don't currently mutate it in your case, but I think it's a good rule of thumb to generally avoid using a mutable in default arguments at all so nothing weird happens if someone thinks about mutating this list later.

But more here than for the min_ndk_api_support change I would feel more comfortable to have this handled outside of the core code if possible. It's a very specific case from numpy, don't you think we could find a way to handle it from numpy directly in an acceptable way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-providers Core code that's not a recipe recipe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numpy recipe
3 participants