-
Notifications
You must be signed in to change notification settings - Fork 431
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
Pin markupsafe for Jinja2 workaround #1804
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kgeller
approved these changes
Mar 1, 2022
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # scripts/requirements.txt
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md # scripts/requirements.txt
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # scripts/requirements.txt
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # CHANGELOG.next.md
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b)
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # scripts/requirements.txt
ebeahan
added a commit
to ebeahan/ecs
that referenced
this pull request
Mar 1, 2022
* pin markupsafe version * add changelog (cherry picked from commit 8a2318b) # Conflicts: # scripts/requirements.txt
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
ebeahan
added a commit
that referenced
this pull request
Mar 1, 2022
chosak
added a commit
to chosak/wagtail
that referenced
this pull request
Apr 4, 2022
MarkupSafe release 2.10 [0] removed method `soft_unicode`. Jinja2 version 2.11.3 doesn't put an upper bound on its MarkupSafe dependency [1], so pulls in this changed version of MarkupSafe. The Wagtail tests specify a Jinja2 version >=2.11,<3.0, so they try to import Jinja2 2.11.3 and MarkupSafe 2.1.1. These versions are incompatible due to the removal of `soft_unicode`, producing this error: > ImportError: cannot import name 'soft_unicode' from 'markupsafe' This fails CI, for example [2]. This change adds an upper bound to Wagtail's import of MarkupSafe, which allows the tests to pass. Relevant MarkupSafe issue discussing the deprecation: [3] Comparable project choosing to similarly pin MarkupSafe: [4] [0] https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-0 [1] https://github.com/pallets/jinja/blob/cf215390d4a4d6f0a4de27e2687eed176878f13d/setup.py#L53 [2] https://github.com/wagtail/wagtail/runs/5793338719?check_suite_focus=true [3] pallets/markupsafe#286 [4] elastic/ecs#1804
chosak
added a commit
to chosak/wagtail
that referenced
this pull request
Apr 4, 2022
MarkupSafe release 2.1.0 [0] removed method `soft_unicode`. Jinja2 version 2.11.3 doesn't put an upper bound on its MarkupSafe dependency [1], so pulls in this changed version of MarkupSafe. The Wagtail tests specify a Jinja2 version >=2.11,<3.0, so they try to import Jinja2 2.11.3 and MarkupSafe 2.1.1. These versions are incompatible due to the removal of `soft_unicode`, producing this error: > ImportError: cannot import name 'soft_unicode' from 'markupsafe' This fails CI, for example [2]. This change adds an upper bound to Wagtail's import of MarkupSafe, which allows the tests to pass. Relevant MarkupSafe issue discussing the deprecation: [3] Comparable project choosing to similarly pin MarkupSafe: [4] [0] https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-0 [1] https://github.com/pallets/jinja/blob/cf215390d4a4d6f0a4de27e2687eed176878f13d/setup.py#L53 [2] https://github.com/wagtail/wagtail/runs/5793338719?check_suite_focus=true [3] pallets/markupsafe#286 [4] elastic/ecs#1804
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recently, Markupsafe released version
2.1.0
, and the change now causes versions of Jinja2 2.x to throw an exception when running the generator script:A more recent version of Jinja2 resolves the issue: #1782.
Bumping a dependency to the next major for previous ECS releases feels excessive. However, new installs and CI for any backport to an older branch will fail without a fix.
The following branches will have
markupsafe==2.0.1
pinned in their requirements files:8.0
->8.0.1
will be released including the fix.1.12
1.11
1.10
1.9
1.8
1.7
1.6
Branches pre-
1.6.
did not useJinja2
as a dependency, so they are not affected.