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

hooks: update bokeh hook for bokeh >= 3.0.0 #588

Merged
merged 1 commit into from
May 24, 2023

Conversation

rokm
Copy link
Member

@rokm rokm commented May 23, 2023

Starting with bokeh 3.0.0, the package sets its __version__ from metadata, so we need to collect it.

Oneshot before and after.

This one flew under our radar because although we have a hook for bokeh, we do not have an active test. And the panel test failing in the yesterday's weekly update PR is probably due to panel re-pinning required version of bokeh.

Starting with `bokeh` 3.0.0, the package sets its `__version__`
from metadata, so we need to collect it.
@bwoodsend
Copy link
Member

I've been looking at why this one wasn't detected automatically by PyInstaller's bytecode scanning. Turns out that import importlib.metadata as importlib_metadata breaks it because _metadata_from() only searches for importlib.metadata.version when scanning modules importing importlib.metadata and for importlib_metadata.version when scanning modules importing importlib_metadata. It would have needed to search for importlib_metadata.version when a module imports importlib.metadata. I guess this is probably more fiddly to fix in PyInstaller.

@rokm
Copy link
Member Author

rokm commented May 24, 2023

I always forget that metadata should be picked up automatically...

One general limitation of the bytecode scanning is that we have no deal of tracking aliases back to their original names. In addition to importlib.metadata being imported as importlib_metadata, we currently also have no means of tracking version back to from importlib.metadata import version - which is annoying, because version could hypothetically as well be a local function with single string argument, so having _metadata_from pick up on just version might result in false positives...

@rokm rokm merged commit 265ec75 into pyinstaller:master May 24, 2023
17 checks passed
@rokm rokm deleted the hook-bokeh branch May 24, 2023 11:32
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.

None yet

2 participants