Skip to content

Commit

Permalink
Merge pull request #1 from brooklyn-data/nw/support_python_39
Browse files Browse the repository at this point in the history
Support Python 3.9 with dbt >= 0.20.0
  • Loading branch information
sean-rose authored Jul 14, 2021
2 parents 911bfe5 + 416b1a2 commit fa45b8a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dbtenv Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/brooklyn-data/dbtenv/compare/v1.1.0...HEAD)

### Added

### Changed

## [1.1.0](https://github.com/brooklyn-data/dbtenv/compare/v1.0.0...v1.1.0) - 2021-07-14

### Added

- Support installation of dbt versions >= 0.20.0 in a Python 3.9 environment.

## [1.0.0](https://github.com/brooklyn-data/dbtenv/releases/tag/v1.0.0) - 2021-04-16

### Added

- Initial release
2 changes: 1 addition & 1 deletion dbtenv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import Any, List, Optional


__version__ = '1.0.0'
__version__ = '1.1.0'

VENVS_DIRECTORY = os.path.normpath('~/.dbt/versions')

Expand Down
4 changes: 2 additions & 2 deletions dbtenv/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def _check_python_compatibility(self, python: str) -> None:
python_major_version = int(python_version_match['major_version'])
python_minor_version = int(python_version_match['minor_version'])

if (python_major_version, python_minor_version) >= (3, 9):
if self.version < Version('0.20') and (python_major_version, python_minor_version) >= (3, 9):
raise DbtenvError(
f"Python {python_version} is being used, but dbt currently isn't compatible with Python 3.9 or above."
f"Python {python_version} is being used, but dbt versions before 0.20.0 aren't compatible with Python 3.9 or above."
)
elif self.version < Version('0.15') and (python_major_version, python_minor_version) >= (3, 8):
raise DbtenvError(
Expand Down

0 comments on commit fa45b8a

Please sign in to comment.