Skip to content

Upgrade Flask to 2.0.0 #848

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

Closed
krivard opened this issue Feb 18, 2022 · 3 comments · Fixed by #1131
Closed

Upgrade Flask to 2.0.0 #848

krivard opened this issue Feb 18, 2022 · 3 comments · Fixed by #1131
Assignees
Milestone

Comments

@krivard
Copy link
Contributor

krivard commented Feb 18, 2022

I think we finally fell off the itsdangerous deprecation cliff. As late as yesterday we were seeing these warnings during unit testing:

  /usr/local/lib/python3.8/site-packages/flask/json/__init__.py:31: DeprecationWarning: Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1. Use Python's 'json' module instead.

Today they flipped to ImportErrors (example):

_ ERROR collecting repos/delphi/delphi-epidata/tests/server/test_exceptions.py _
ImportError while importing test module '/usr/src/app/repos/delphi/delphi-epidata/tests/server/test_exceptions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
repos/delphi/delphi-epidata/tests/server/test_exceptions.py:[7](https://github.com/cmu-delphi/delphi-epidata/runs/5250352604?check_suite_focus=true#step:15:7): in <module>
    from delphi.epidata.server._common import app
delphi/epidata/server/_common.py:3: in <module>
    from flask import Flask, g, request
/usr/local/lib/python3.[8](https://github.com/cmu-delphi/delphi-epidata/runs/5250352604?check_suite_focus=true#step:15:8)/site-packages/flask/__init__.py:1[9](https://github.com/cmu-delphi/delphi-epidata/runs/5250352604?check_suite_focus=true#step:15:9): in <module>
    from . import json
/usr/local/lib/python3.8/site-packages/flask/json/__init__.py:[15](https://github.com/cmu-delphi/delphi-epidata/runs/5250352604?check_suite_focus=true#step:15:15): in <module>
    from itsdangerous import json as _json
E   ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/site-packages/itsdangerous/__init__.py)
@dshemetov
Copy link
Contributor

dshemetov commented Feb 18, 2022

Flask 2.0.0 (commit 2f0c62f) seems to be the earliest version where this is fixed. We'd have to understand and test the backwards incompatibilities.

@krivard
Copy link
Contributor Author

krivard commented Feb 18, 2022

Hmmm, that sounds like a reason to wait until epidata v4 is merged

@krivard krivard added this to the v4.2 milestone Feb 18, 2022
@krivard krivard added help wanted and removed bug labels Feb 6, 2023
@krivard krivard changed the title Build failing: Flask wants json from itsdangerous but it's no longer available Upgrade Flask to 2.0.0 Feb 6, 2023
@BrainIsDead BrainIsDead self-assigned this Apr 11, 2023
melange396 added a commit that referenced this issue Oct 11, 2023
@melange396
Copy link
Collaborator

already done! currently up to Flask 2.2.5 as of #1175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants