Skip to content
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

Markupsafe dependency problem #113

Closed
alexandration opened this issue Feb 18, 2022 · 3 comments · Fixed by #114
Closed

Markupsafe dependency problem #113

alexandration opened this issue Feb 18, 2022 · 3 comments · Fixed by #114

Comments

@alexandration
Copy link

Hi
Markupsafe package updated to version 2.1.0 and auto-changelog was broken.
I use auto-changelog in CI/CD and the job failed today.

Traceback (most recent call last):
67  File "/builds/env/bin/auto-changelog", line 5, in <module>
68    from auto_changelog.__main__ import main
69  File "/builds/env/lib/python3.10/site-packages/auto_changelog/__main__.py", line 9, in <module>
70    from auto_changelog.presenter import MarkdownPresenter, default_template
71  File "/builds/env/lib/python3.10/site-packages/auto_changelog/presenter.py", line 4, in <module>
72    from jinja2 import FileSystemLoader, Environment
73  File "/builds/env/lib/python3.10/site-packages/jinja2/__init__.py", line 12, in <module>
74    from .environment import Environment
75  File "/builds/env/lib/python3.10/site-packages/jinja2/environment.py", line 25, in <module>
76    from .defaults import BLOCK_END_STRING
77  File "/builds/env/lib/python3.10/site-packages/jinja2/defaults.py", line 3, in <module>
78    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
79  File "/builds/env/lib/python3.10/site-packages/jinja2/filters.py", line 13, in <module>
80    from markupsafe import soft_unicode
81ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/builds/env/lib/python3.10/site-packages/markupsafe/__init__.py)

But if I manually downgrade the markupsafe version then it works.

  before_script:
    - python3 -m venv env
    - . ./env/bin/activate
    - python3 -m pip install --upgrade pip
    - pip install auto-changelog
    - pip uninstall markupsafe -y
    - pip install markupsafe==2.0.1
  script:
    - auto-changelog --starting-commit $(git describe --abbrev=0 --tags) --stdout >> RELEASENOTES.md
@kapsner
Copy link
Contributor

kapsner commented Mar 10, 2022

+1
However, I think it seems to be related to the "jinja2"-dependency. There is also an issue: pallets/jinja#1585

They state, that the jinja-verison used is unsupported: pallets/jinja#1585 (comment)

@kapsner
Copy link
Contributor

kapsner commented Mar 10, 2022

I have just created PR #114 which fixes the error for me.

@alexandration to test, you could run

pip uninstall auto-changelog
pip install git+https://github.com/kapsner/auto-changelog.git

and then testyour CI-Pipeline again

@KunalGehlot
Copy link

#114 Fixed my issue!

KeNaCo added a commit that referenced this issue Oct 19, 2022
fix: error with markupsafe - updated jinja2 / click deps #113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants