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

fix(requirements-asynqp): Update flask to latest stable #347

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

Ferenc-
Copy link
Collaborator

@Ferenc- Ferenc- commented Feb 21, 2022

Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/clients/test_asynqp.py:16: in <module>
    import tests.apps.flask_app
tests/apps/flask_app/__init__.py:5: in <module>
    from .app import flask_server as server
tests/apps/flask_app/app.py:10: in <module>
    from flask import jsonify, Response
venv/lib/python3.7/site-packages/flask/__init__.py:14: in <module>
    from jinja2 import escape
venv/lib/python3.7/site-packages/jinja2/__init__.py:12: in <module>
    from .environment import Environment
venv/lib/python3.7/site-packages/jinja2/environment.py:25: in <module>
    from .defaults import BLOCK_END_STRING
venv/lib/python3.7/site-packages/jinja2/defaults.py:3: in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
venv/lib/python3.7/site-packages/jinja2/filters.py:13: in <module>
    from markupsafe import soft_unicode
E   ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/circleci/repo/venv/lib/python3.7/site-packages/markupsafe/__init__.py)

* This issue is described in
  pallets/markupsafe#284

* The recommended action is to upgrade Jinja2,
  pallets/markupsafe#284 (comment)
  but that only works with newer flask, so hence the flask upgrade.

* The exact backtrace in our case, that we are trying to avoid here is this:
```
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/clients/test_asynqp.py:16: in <module>
    import tests.apps.flask_app
tests/apps/flask_app/__init__.py:5: in <module>
    from .app import flask_server as server
tests/apps/flask_app/app.py:10: in <module>
    from flask import jsonify, Response
venv/lib/python3.7/site-packages/flask/__init__.py:14: in <module>
    from jinja2 import escape
venv/lib/python3.7/site-packages/jinja2/__init__.py:12: in <module>
    from .environment import Environment
venv/lib/python3.7/site-packages/jinja2/environment.py:25: in <module>
    from .defaults import BLOCK_END_STRING
venv/lib/python3.7/site-packages/jinja2/defaults.py:3: in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
venv/lib/python3.7/site-packages/jinja2/filters.py:13: in <module>
    from markupsafe import soft_unicode
E   ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/circleci/repo/venv/lib/python3.7/site-packages/markupsafe/__init__.py)
```
@Ferenc- Ferenc- merged commit e655099 into master Feb 21, 2022
@Ferenc- Ferenc- deleted the fix/import-error-on-deprecated-flask-dependencies branch February 21, 2022 14:55
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 this pull request may close these issues.

2 participants