Closed machawk1 closed 2 years ago
One recurring issue reported relates to flask:
ImportError while importing test module '/ipwb/tests/test_replay.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_replay.py:3: in <module>
from . import testUtil as ipwb_test
tests/testUtil.py:9: in <module>
from ipwb import replay
ipwb/replay.py:23: in <module>
from flask import (
/usr/local/lib/python3.10/site-packages/flask/__init__.py:19: in <module>
from . import json
/usr/local/lib/python3.10/site-packages/flask/json/__init__.py:15: in <module>
from itsdangerous import json as _json
E ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.10/site-packages/itsdangerous/__init__.py)
The itsdangerous
module reports that some json methods were deprecated in version 2.0, released May 2021.
Of all of the permutations only macos-latest, Python 3.7, and ipfs versions 0.9 and 0.11 report failure.
From https://itsdangerous.palletsprojects.com/en/2.1.x/changes/#version-2-1-0 :
import itsdangerous.json: Import json from the standard library instead.
ipwb requires the older version of Flask Flask
, which it seems tries to import and use a newer version of itsdangerous. Addressing #728 might fix this.
Python 3.7 is still maintained per https://en.wikipedia.org/wiki/History_of_Python , so this can't be written off by removing it from tests just yet.
Is this fixed?
@cclauss The issue seems to come-and-go with GitHub Actions + Python 3.7. I am unable to reliably reproduce it and all are passing at the moment, so I will close this issue for now and re-open it if the issue re-surfaces.
Without any significant code changes, the test suite has started to report failures. This issue will document what needs to be done to bring it back to a passing state.