Skip to content

Commit

Permalink
task init: support older click v7.0 (#4681) (#4817)
Browse files Browse the repository at this point in the history
* task init: support older click v7.0

`dbt init` uses click for interactively setting up a project. The
version constraints currently ask for click >= 8 but v7.0 has nearly the
same prompt/confirm/echo API. prompt added a feature that isn't used.
confirm has a behavior change if the default is None, but
confirm(..., default=None) is not used. Long story short, we can relax
the version constraint to allow installing with an older click library.

Ref: Issue #4566

* Update CHANGELOG.md

Co-authored-by: Chenyu Li <[email protected]>

Co-authored-by: Chenyu Li <[email protected]>

Co-authored-by: Tristan Willy <[email protected]>
Co-authored-by: Chenyu Li <[email protected]>
  • Loading branch information
3 people authored Mar 9, 2022
1 parent 33d08f8 commit 5218438
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
### Fixes
- Fix bug causing empty node level meta, snapshot config errors ([#4459](https:/dbt-labs/dbt-core/issues/4459), [#4726](https:/dbt-labs/dbt-core/pull/4726))
- Fixed a bug where nodes that depend on multiple macros couldn't be selected using `-s state:modified` ([#4678](https:/dbt-labs/dbt-core/issues/4678))
- Support click versions in the v7.x series ([#4681](https:/dbt-labs/dbt-core/pull/4681))

### Docs
- Resolve errors related to operations preventing DAG from generating in the docs. Also patch a spark issue to allow search to filter accurately past the missing columns. ([#4578](https:/dbt-labs/dbt-core/issues/4578), [#4763](https:/dbt-labs/dbt-core/pull/4763))

Contributors:
* [@twilly](https:/twilly) ([#4681](https:/dbt-labs/dbt-core/pull/4681))

## dbt-core 1.0.3 (February 21, 2022)

### Fixes
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/task/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
Happy modeling!
"""

# https://click.palletsprojects.com/en/8.0.x/api/?highlight=float#types
# https://click.palletsprojects.com/en/8.0.x/api/#types
# click v7.0 has UNPROCESSED, STRING, INT, FLOAT, BOOL, and UUID available.
click_type_mapping = {
"string": click.STRING,
"int": click.INT,
Expand Down
2 changes: 1 addition & 1 deletion core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'Jinja2==2.11.3',
'MarkupSafe==2.0.1',
'agate>=1.6,<1.6.4',
'click>=8,<9',
'click>=7.0,<9',
'colorama>=0.3.9,<0.4.5',
'hologram==0.0.14',
'isodate>=0.6,<0.7',
Expand Down

0 comments on commit 5218438

Please sign in to comment.