#256 Bump Flask/Werkzeug to 2.2.1
Merged 2 years ago by kparal. Opened 2 years ago by frantisekz.

file modified
+2 -2
@@ -1,6 +1,6 @@ 

  # the flask and werkzeug freeze is to reflect the state on production

- Flask == 2.0.3

- Werkzeug == 2.0.3

+ Flask == 2.2.2

+ Werkzeug == 2.2.2

  

  alembic

  # bodhi-client 5.7.5 because of compatibility with Bodhi 6 server

file modified
+1
@@ -23,6 +23,7 @@ 

      """

      monkeypatch.setattr(app, 'before_request', mock.MagicMock())

      monkeypatch.setattr(app, 'add_url_rule', mock.MagicMock())

+     monkeypatch.setattr(app, 'route', mock.MagicMock())

  

  

  class TestLogin:

no initial comment

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 92a389e

2 years ago

rebased onto 75a9d79

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

I can reproduce the error even locally with ./run test. It's genuine.

_________________________________________ TestLogin.test_config_fas_enabled __________________________________________

self = <testing.test_login.TestLogin object at 0x7f74da1c4dc0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f74d6bb92a0>

    def test_config_fas_enabled(self, monkeypatch):
        """Config option FAS_ENABLED should affect the returned object"""
        monkeypatch.setitem(app.config, 'FAS_ENABLED', False)
        assert isinstance(login.getFAS(), login.FakeFAS)

        login._fas = None
        monkeypatch.setitem(app.config, 'FAS_ENABLED', '')
        assert isinstance(login.getFAS(), login.FakeFAS)

        login._fas = None
        monkeypatch.setitem(app.config, 'FAS_ENABLED', True)
>       assert isinstance(login.getFAS(), flask_fas_openid.FAS)

testing/test_login.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
blockerbugs/util/login.py:40: in getFAS
    _fas = FAS(app)
../../.venv/blockerbugs/lib/python3.10/site-packages/flask_fas_openid.py:92: in __init__
    self.init_app(app)
../../.venv/blockerbugs/lib/python3.10/site-packages/flask_fas_openid.py:118: in init_app
    @app.route('/_flask_fas_openid_handler/', methods=['GET', 'POST'])
../../.venv/blockerbugs/lib/python3.10/site-packages/flask/scaffold.py:49: in wrapper_func
    self._check_setup_finished(f_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Flask 'blockerbugs'>, f_name = 'route'

    def _check_setup_finished(self, f_name: str) -> None:
        if self._got_first_request:
>           raise AssertionError(
                f"The setup method '{f_name}' can no longer be called"
                " on the application. It has already handled its first"
                " request, any changes will not be applied"
                " consistently.\n"
                "Make sure all imports, decorators, functions, etc."
                " needed to set up the application are done before"
                " running it."
            )
E           AssertionError: The setup method 'route' can no longer be called on the application. It has already handled its first request, any changes will not be applied consistently.
E           Make sure all imports, decorators, functions, etc. needed to set up the application are done before running it.

../../.venv/blockerbugs/lib/python3.10/site-packages/flask/app.py:722: AssertionError

1 new commit added

  • DRAFT: Always init realFAS to avoid touching app's routes later on
2 years ago

Build succeeded.

2 new commits added

  • fix the unit test
  • Revert "DRAFT: Always init realFAS to avoid touching app's routes later on"
2 years ago

Build succeeded.

Victory! :-) (Don't merge without squashing).

1 new commit added

  • bump flask+werkzeug to 2.2.2
2 years ago

Build succeeded.

Commit 399a73c fixes this pull-request

Pull-Request has been merged by kparal

2 years ago
Metadata