-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-255] [Bug] ImportError: cannot import name soft_unicode from markupsafe #4745
Comments
If someone is facing this error and need an urgent fix for your CI/CD or job in production, you can downgrade your MarkupSafe into version 2.0.1 manually. If you installed dbt-core with pip then you can run |
If building from source( |
Steps to reproduceBuilding this Dockerfile reproduces the error
|
MEMO: pallets/jinja#1587 |
Thanks, had this issue in our CI/CD and it worked liked a charm! |
Thanks for opening @mailtosumitrai, and for weighing in everyone! I think our approach here will need to look like:
|
Signed-off-by: Robert Astel <[email protected]>
* Use all supported_resource_types by default Signed-off-by: Robert Astel <[email protected]> * Handle mutual exclusivity between resource_type and model arguments Signed-off-by: Robert Astel <[email protected]> * Pin MarkupSafe==2.0.1 for dbt-core<1.0.0 due to dbt-labs/dbt-core#4745 Signed-off-by: Robert Astel <[email protected]>
The current `MarkupSafe` pinned version has been added in dbt-labs#4746 as a temporary fix for dbt-labs#4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53 Co-authored-by: Michael Manganiello <[email protected]>
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in #4746 as a temporary fix for #4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53 Co-authored-by: Michael Manganiello <[email protected]>
* Flexibilize MarkupSafe pinned version The current `MarkupSafe` pinned version has been added in dbt-labs#4746 as a temporary fix for dbt-labs#4745. However, the current restrictive approach isn't compatible with other libraries that could require an even older version of `MarkupSafe`, like Airflow `2.2.2` [0], which requires `markupsafe>=1.1.1, <2.0`. To avoid that issue, we can allow a greater range of supported `MarkupSafe` versions. Considering the direct dependency `dbt-core` has is `Jinja2==2.11.3`, we can use its pinning as the lower bound, which is `MarkupSafe>=0.23` [1]. This fix should be also backported this to `1.0.latest` for inclusion in the next v1.0 patch. [0] https://github.com/adamantike/airflow/blob/2.2.2/setup.cfg#L125 [1] https://github.com/pallets/jinja/blob/2.11.3/setup.py#L53
Is there an existing issue for this?
Current Behavior
Markup recently released its new version 2.1.0 which is essential for Jinja2 package. Jinja has already released version 3.x.x and dbt still uses version 2.x.x and their developers won't support 2.x.x for some time. Now the command
dbt deps
throws an error.Expected Behavior
While running
dbt deps
the packages should install instead of throwing errors.Steps To Reproduce
No response
Relevant log output
Environment
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: