Repository navigation
Conversation
Updates sqlalchemy_utils imports to point at specific packages and removes a few unused imports. This was done in hope of not initializing the whole of SA-Utils, but that requires a different approach.
This is a breaking change because classes copied from SQLAlchemy-Utils but exposed through this library will have a new parent module. Utility classes and methods from SQLAlchemy-Utils are all copied into `sa_utils.py` with no functional changes. Only code required by Continuum was ported. Subsequent commits will implement cleanup and other changes discussed in
Updates the `get_primary_keys` method to only return the primary key columns (without their values) in a list, since the values went unused. The method is thus renamed to `get_primary_key_columns`.
Quite a bit of the code migrated in from SQLAlchemy-Utils only gets used within the plugins module. There's no need for us to incur the initialization expense if those classes and methods aren't needed or used. This will only actually have an initialization benefit if the plugins module does not load every plugin upon import. However, having the code co-located anyway makes sense.
The function only gets used in one place, so we can move it there and mark it private.
The function only gets used in one place, so we can move it there and mark it private.
Using a relative import allows the library to be more-easily vendored without having to tweak the import line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Importing functions from slqalchemy_utils directly causes the entire library to get imported, even though many of the library's modules go unused. Porting only the necessary functions from that library into Continuum should provide improved initialization times.
Closes #357