-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Feature] Make psycopg2-binary
a default dependency, add psycopg2
as an optional dependency
#6
Comments
cc: @dbeatty10 @jtcohen6 as they probably have some context This would be a departure for users' current install behavior as it will require people to have OS dependencies preinstalled (i.e. a C compiler, various libs etc) so we'll need to pair this with a docs update (something we'll need to do anyways as part of decoupling) |
My typical instinct is to preserve whatever the current behavior is. In this case, that would be keeping What would be the advantages of the proposed order of |
having given this some thought I think I agree, ultimately for production use cases users should install |
psycopg2-binary
as an optional build dependencypsycopg2-binary
a default dependency, add psycopg2
as an optional dependency
I've updated the ticket to reflect the proposal. Default to |
We'll want to add some kind of guidance in the v1.8 migration guide. We don't have the
So we could probably just say something like this: Some folks may be using the DBT_PSYCOPG2_NAME=psycopg2 pip install dbt This has been replaced with the following instead: pip install dbt-postgres[compile] |
I added the |
Closing for Colin |
Assuming #41 resolved this? If so, will there actually be a behavior change between versions of dbt-postgres that we need to add to a migration guide (requiring Or does #41 just preserve the behavior of dbt-postgres when it was in the dbt-core repo? |
Is this your first time submitting a feature request?
Describe the feature
In the
dbt-core
repo,dbt-postgres
has a conditional build dependency forpsycopg2
.dbt-postgres
defaults topsycopg2-binary
unless overridden by an environment variable. With the move topyproject.toml
, we'll need a different way to handle this.Proposal
Default to
psycopg2-binary
in the primary build dependencies. Offerpsycopg2
via an optional extra.pyproject.toml
would look like this:This would offer the following installation options:
pip install dbt-postgres
: usepsycopg2-binary
pip install dbt-postgres[no-binary]
: usepsycopg2
Who will this benefit?
This provides flexibility for folks installing
dbt-postgres
. Some users need the binary version ofpsycopg2
to avoid installing other build tooling. This is ideal for development. Others need the source version ofpsycopg2
so that it gets compiled to their machine. This is ideal for production.Tasks
The text was updated successfully, but these errors were encountered: