Dbt: Set upper bound on jsonschema dep

Created on 9 Oct 2019  路  4Comments  路  Source: fishtown-analytics/dbt

Describe the bug

With jsonschema==3.1.0 installed, users see the error:

\Z is not valid in Javascript regular expressions - use $ instead (pattern='^[^[0-9][^A-Za-z]][A-Za-z]*\\Z')

This error comes from this line of code:
https://github.com/fishtown-analytics/dbt/blob/dev/0.14.1/core/dbt/contracts/project.py#L43

It appears that jsonschema v3.1.0 does not support the \Z regex token, whereas version 3.0.2 did.

We should either update dbt to be compatible with the 3.1.0 release, or we should pin this dependency to a specific version (like 3.0.2).

bug

Most helpful comment

If you encounter this error, you can fix it by running

pip install jsonschema==3.0.2

All 4 comments

I'm adding this to the 0.14.3 release because new installs of dbt are currently bricked.

If you encounter this error, you can fix it by running

pip install jsonschema==3.0.2

The root issue here was resolved in jsonschema==3.1.1.

Kicking this out of the 0.14.3 milestone and into Louisa May Alcott for a more in-depth triage in the future.

I think we should fix this three ways:

1) Pin 0.14.3 to jsonschema==3.1.1, as it appears 3.1.2 will break this again (per this comment) and I don't really want to fix the regex at the last minute in a patch release.
2) Pin the version that hologram pulls in to something reasonable (<3.2?) and cut a 0.0.4 release there.
3) Fix our regex to be valid in JS in louisa-may-alcott. The library is technically doing the correct thing, though I do wish the author would have cut this as 4.x since it's a pretty-darn-breaking change. I guess the author only does major revisions for jsonschema draft updates, which is a bummer, but it means we should be pinning to minor releases, not major. That's easy enough to plan around, at least.

Was this page helpful?
0 / 5 - 0 ratings