mozilla-services / python-dockerflow

A Python package to implement tools and helpers for Mozilla Dockerflow
https://python-dockerflow.readthedocs.io
Mozilla Public License 2.0
38 stars 22 forks source link

Flask 0.10 tests fail #60

Closed djmitche closed 2 years ago

djmitche commented 3 years ago
   ______________________ test_preserves_existing_request_id ______________________
  Traceback (most recent call last):
    File "/home/runner/work/python-dockerflow/python-dockerflow/tests/flask/test_flask.py", line 246, in test_preserves_existing_request_id
      assert getattr(g, "_request_id") is not None
    File "/home/runner/work/python-dockerflow/python-dockerflow/.tox/py39-fl10/lib/python3.9/site-packages/werkzeug/local.py", line 410, in __get__
      obj = instance._get_current_object()
    File "/home/runner/work/python-dockerflow/python-dockerflow/.tox/py39-fl10/lib/python3.9/site-packages/werkzeug/local.py", line 530, in _get_current_object
      return self.__local()  # type: ignore
    File "/home/runner/work/python-dockerflow/python-dockerflow/.tox/py39-fl10/lib/python3.9/site-packages/flask/globals.py", line 45, in _lookup_app_object
      raise RuntimeError(_app_ctx_err_msg)
  RuntimeError: Working outside of application context.

  This typically means that you attempted to use functionality that needed
  to interface with the current application object in some way. To solve
  this, set up an application context with app.app_context().  See the
  documentation for more information.

I'm guessing this is a newer version of werkzeug, as that is unconstrained. I'm also guessing that maybe we could drop this support? According to https://github.com/pallets/flask/releases?after=0.12.4 0.10 was last released in 2013.

jwhitlock commented 2 years ago

I could not find any Flask documentation about supported and unsupported versions. However, they appear to have branches for most of the minor releases, and 0.10 is not tracked by a branch. I agree that Flask 0.10 can be dropped, and recommended that in issue #68.

jwhitlock commented 2 years ago

Fixed in PR #69 by dropping support for Flask 0.10.