diff --git a/CHANGELOG.md b/CHANGELOG.md index 72394c8c9cb..c2ba27d120b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Include vars provided to the cli method when running the actual method ([#2092](https://github.com/fishtown-analytics/dbt/issues/2092), [#2104](https://github.com/fishtown-analytics/dbt/pull/2104)) - Improved error messages with malformed packages.yml ([#2017](https://github.com/fishtown-analytics/dbt/issues/2017), [#2078](https://github.com/fishtown-analytics/dbt/pull/2078)) - Fix an issue where dbt rendered source test args, fix issue where dbt ran an extra compile pass over the wrapped SQL. ([#2114](https://github.com/fishtown-analytics/dbt/issues/2114), [#2150](https://github.com/fishtown-analytics/dbt/pull/2150)) +- Set more upper bounds for jinja2,requests, and idna dependencies, upgrade snowflake-connector-python ([#2147](https://github.com/fishtown-analytics/dbt/issues/2147), [#2151](https://github.com/fishtown-analytics/dbt/pull/2151)) Contributors: - [@bubbomb](https://github.com/bubbomb) ([#2080](https://github.com/fishtown-analytics/dbt/pull/2080)) diff --git a/core/dbt/clients/jinja.py b/core/dbt/clients/jinja.py index 0f1b3e5c684..39feb17104d 100644 --- a/core/dbt/clients/jinja.py +++ b/core/dbt/clients/jinja.py @@ -9,7 +9,6 @@ ) import jinja2 -import jinja2._compat import jinja2.ext import jinja2.nodes import jinja2.parser @@ -47,8 +46,6 @@ def _linecache_inject(source, write): rnd = codecs.encode(os.urandom(12), 'hex') # type: ignore filename = rnd.decode('ascii') - # encode, though I don't think this matters - filename = jinja2._compat.encode_filename(filename) # put ourselves in the cache cache_entry = ( len(source), @@ -79,10 +76,7 @@ def parse_macro(self): class MacroFuzzEnvironment(jinja2.sandbox.SandboxedEnvironment): def _parse(self, source, name, filename): - return MacroFuzzParser( - self, source, name, - jinja2._compat.encode_filename(filename) - ).parse() + return MacroFuzzParser(self, source, name, filename).parse() def _compile(self, source, filename): """Override jinja's compilation to stash the rendered source inside diff --git a/core/setup.py b/core/setup.py index 47664e834f7..e3215979b3f 100644 --- a/core/setup.py +++ b/core/setup.py @@ -53,12 +53,14 @@ def read(fname): 'scripts/dbt', ], install_requires=[ - 'Jinja2>=2.10', + 'Jinja2>=2.10,<3', 'PyYAML>=3.11', 'sqlparse>=0.2.3,<0.4', 'networkx>=2.3,<3', 'minimal-snowplow-tracker==0.0.2', - 'requests>=2.18.0,<3', + # match snowflake-connector-python + 'requests>=2.18.0,<2.23.0', + 'idna<2.9', 'colorama>=0.3.9,<0.5', 'agate>=1.6,<2', 'isodate>=0.6,<0.7', diff --git a/plugins/snowflake/setup.py b/plugins/snowflake/setup.py index 66c73cb1ce0..f17ec10aba6 100644 --- a/plugins/snowflake/setup.py +++ b/plugins/snowflake/setup.py @@ -40,7 +40,7 @@ }, install_requires=[ 'dbt-core=={}'.format(package_version), - 'snowflake-connector-python==2.2.0', + 'snowflake-connector-python==2.2.1', 'azure-common<2.0.0', 'azure-storage-blob<12.0.0', 'urllib3>=1.20,<1.26.0',