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 removes deprecated soft_unicode in v2.1.0 #541

Closed
jmuchovej opened this issue Feb 21, 2022 · 3 comments · May be fixed by #543
Closed

MarkupSafe removes deprecated soft_unicode in v2.1.0 #541

jmuchovej opened this issue Feb 21, 2022 · 3 comments · May be fixed by #543

Comments

@jmuchovej
Copy link
Contributor

https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-0

Error, if you need it: ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/markupsafe/__init__.py)

I can open/submit a PR in a few hours fixing this, just now right now. This will break any installations past 17 Feb 2022, so it seems rather high-priority.

@jacob-lee
Copy link
Collaborator

jacob-lee commented Feb 22, 2022 via email

@jmuchovej
Copy link
Contributor Author

So, this is coming from Flask. Here's the full traceback.

Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/bin/psiturk", line 8, in <module>
    sys.exit(process())
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/psiturk/command_line.py", line 14, in process
    launch_shell()
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/psiturk/command_line.py", line 94, in launch_shell
    import psiturk.psiturk_shell as ps
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/psiturk/psiturk_shell.py", line 17, in <module>
    from psiturk.amt_services_wrapper import MTurkServicesWrapper
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/psiturk/amt_services_wrapper.py", line 13, in <module>
    from .amt_services import MTurkServices
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/psiturk/amt_services.py", line 9, in <module>
    from flask import jsonify
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/markupsafe/__init__.py)

@deargle
Copy link
Collaborator

deargle commented Feb 28, 2022

I'm seeing recommendations that we pin markupsafe to 2.0.1: aws/aws-sam-cli#3661 (comment)

I didn't do a full pip freeze to make the requirements list, which I think had some benefit or other, but this soft_unicode thing is a downside.

edit: actually, since we're on an old flask, we should pin to a lower markupsafe, and also pin itsdangerous. We should probably bump Flask, but not yet. pallets/flask#4455

deargle added a commit that referenced this issue Feb 28, 2022
evankirkiles pushed a commit to evankirkiles/psiTurk that referenced this issue Dec 16, 2022
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