Skip to content

Commit

Permalink
Dependency revs/bounding
Browse files Browse the repository at this point in the history
remove jinja._compat calls
set an upper bound on jinja anyway
set bound on idna/requests to match snowlfake
update snowflake-connector-python
  • Loading branch information
Jacob Beck committed Feb 24, 2020
1 parent e571cba commit ba2f9d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,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))
Expand Down
8 changes: 1 addition & 7 deletions core/dbt/clients/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
)

import jinja2
import jinja2._compat
import jinja2.ext
import jinja2.nodes
import jinja2.parser
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion plugins/snowflake/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ba2f9d5

Please sign in to comment.