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: sqlalchemy: collect plugins and dialects via entry-points #8465

Merged
merged 1 commit into from
May 14, 2024

Conversation

rokm
Copy link
Member

@rokm rokm commented May 13, 2024

Have sqlalchemy hook collect all dialects and plugins that are registered via sqlalchemy.dialects and sqlalchemy.plugins entry-points. This ensures collection of 3rd party dialects and plugins that may be available in the build environment (e.g., ibm-db-sa).

Closes #3518.

Have `sqlalchemy` hook collect all dialects and plugins that are
registered via `sqlalchemy.dialects` and `sqlalchemy.plugins`
entry-points. This ensures collection of 3rd party dialects and plugins
that may be available in the build environment (e.g., `ibm-db-sa`).
@rokm rokm force-pushed the hook-sqlalchemy-entry-points branch from 7c663df to be149fd Compare May 13, 2024 12:08
@bwoodsend
Copy link
Member

I'm starting to wonder if perhaps we should try to scan for entrypoint iterating code like we do for importlib.metadata.distribution("xyz")? I originally dismissed the idea since it would make packages with entrypoints hoover up dependencies instead of encouraging users to pick only the providers they use but our go-to strategy has ended up being to just collect them all without thought.

@rokm
Copy link
Member Author

rokm commented May 14, 2024

I'm starting to wonder if perhaps we should try to scan for entrypoint iterating code like we do for importlib.metadata.distribution("xyz")? I originally dismissed the idea since it would make packages with entrypoints hoover up dependencies instead of encouraging users to pick only the providers they use but our go-to strategy has ended up being to just collect them all without thought.

Hmm, yeah, perhaps we should. While I don't particularly mind dealing with this via hooks on per-package basis, it is true that for the lack of better strategy being available, those hooks end up collecting all available entry-points, and we might as well automate that part.

@rokm rokm merged commit c5bf786 into pyinstaller:develop May 14, 2024
18 checks passed
@rokm rokm deleted the hook-sqlalchemy-entry-points branch May 14, 2024 13:43
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.

Failing to load sqlalchemy-plugin in pyinstaller'ed exe
2 participants