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

Deprecated-hook #862

Closed
wants to merge 3 commits into from
Closed

Deprecated-hook #862

wants to merge 3 commits into from

Conversation

mo-dkrz
Copy link
Contributor

@mo-dkrz mo-dkrz commented Jan 31, 2025

Add hook for deprecated to ensure that submodules of the lib are collected.

@bwoodsend
Copy link
Member

What makes you think this is needed? I can't see any signs of deprecated doing anything that PyInstaller wouldn't be able to detect.

@mo-dkrz
Copy link
Contributor Author

mo-dkrz commented Jan 31, 2025

What makes you think this is needed? I can't see any signs of deprecated doing anything that PyInstaller wouldn't be able to detect.

@bwoodsend Thanks for the response. I was bundling a library which was zarr-included, so it was complaining about the deprecated modules, so by adding deprecated as hidden-import it was fixed. I thought it would be nice to fix it fundamentally that might fix the issue of others as well. Or another solution would be updating the zarr-hook and collect the modules there!

  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "zarr/__init__.py", line 2, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "zarr/codecs.py", line 2, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "numcodecs/__init__.py", line 43, in <module>
  File "numcodecs/blosc.pyx", line 9, in init numcodecs.blosc
ModuleNotFoundError: No module named 'deprecated'

@rokm
Copy link
Member

rokm commented Jan 31, 2025

Adding a hook for deprecated won't help you in any way in this case; you need a hook for the module that has this hidden import (in this case, numcodecs.blosc cythonized extension).

This should be already fixed by #858, but we should probably release a new version that contains that change.

@mo-dkrz
Copy link
Contributor Author

mo-dkrz commented Jan 31, 2025

@rokm it was really on-time and fast :) Thanks a lot. Since its released now, I think we can close this PR

@mo-dkrz mo-dkrz closed this Jan 31, 2025
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