You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to have a GitHub Actions setup going for this repository (current progress here), and there are errors when running tests with Python 3.9:
$ python -m tox shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.9.13/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.13/x64/lib[...]ERROR: Failure: ImportError (cannot import name 'json_available' from 'flask' (/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask/__init__.py))----------------------------------------------------------------------Traceback (most recent call last): File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/nose/loader.py", line 417, in loadTestsFromName module = self.importer.importFromPath( File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/imp.py", line 244, in load_module return load_package(name, filename) File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/imp.py", line 216, in load_package return _load(spec) File "<frozen importlib._bootstrap>", line 711, in _load File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/home/runner/work/sdx-lc/sdx-lc/swagger_server/test/__init__.py", line 4, in <module> from flask_testing import TestCase File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask_testing/__init__.py", line 13, in <module> from .utils import TestCase, LiveServerTestCase File "/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask_testing/utils.py", line 38, in <module> from flask import json_available, templating, template_renderedImportError: cannot import name 'json_available' from 'flask' (/home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask/__init__.py)----------------------------------------------------------------------Ran 1 test in 0.581sFAILED (errors=1)ERROR: InvocationError for command /home/runner/work/sdx-lc/sdx-lc/.tox/py3/bin/nosetests (exited with code 1)
The text was updated successfully, but these errors were encountered:
This error happens with all Python 3.x versions that I have tested with, except Python 3.10. (There's a different, unrelated error with Python 3.10, and that of course is a different discussion.)
This error happens because Flask 2.0.0 has dropped flask.json_available flag, and flask-testing also have subsequently removed it, here: jarus/flask-testing#136.
Upgrading flask-testing to 0.8.1 should handle this. I wiill make that PR once we have CI running.
I am trying to have a GitHub Actions setup going for this repository (current progress here), and there are errors when running tests with Python 3.9:
The text was updated successfully, but these errors were encountered: