Source: flask-dance Version: 6.2.0-2 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs User: lu...@debian.org Usertags: ftbfs-20230113 ftbfs-bookworm
Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[1]: Entering directory '/<<PKGBUILDDIR>>' > PYBUILD_SYSTEM=custom \ > PYBUILD_TEST_ARGS="python3-coverage run -m pytest -m \"not > install_required\"" \ > dh_auto_test > I: pybuild base:240: python3-coverage run -m pytest -m "not install_required" > ============================= test session starts > ============================== > platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack > rootdir: /<<PKGBUILDDIR>>, configfile: pyproject.toml > plugins: Flask-Dance-6.2.0, mock-3.8.2, betamax-0.8.1 > collected 196 items / 1 deselected / 195 selected > > tests/test_utils.py .. [ > 1%] > tests/consumer/test_oauth1.py .................... [ > 11%] > tests/consumer/test_oauth2.py ....F...F............... [ > 23%] > tests/consumer/test_requests.py .......... [ > 28%] > tests/consumer/storage/test_sqla.py ............ [ > 34%] > tests/contrib/test_atlassian.py ...... [ > 37%] > tests/contrib/test_authentiq.py .... [ > 40%] > tests/contrib/test_azure.py ....... [ > 43%] > tests/contrib/test_digitalocean.py ..... [ > 46%] > tests/contrib/test_discord.py .... [ > 48%] > tests/contrib/test_dropbox.py ........ [ > 52%] > tests/contrib/test_facebook.py ..... [ > 54%] > tests/contrib/test_fitbit.py ... [ > 56%] > tests/contrib/test_github.py ... [ > 57%] > tests/contrib/test_gitlab.py ...... [ > 61%] > tests/contrib/test_google.py ............. [ > 67%] > tests/contrib/test_heroku.py ... [ > 69%] > tests/contrib/test_jira.py ....... [ > 72%] > tests/contrib/test_linkedin.py ... [ > 74%] > tests/contrib/test_meetup.py .... [ > 76%] > tests/contrib/test_nylas.py ... [ > 77%] > tests/contrib/test_orcid.py .... [ > 80%] > tests/contrib/test_osm.py ... [ > 81%] > tests/contrib/test_reddit.py .... [ > 83%] > tests/contrib/test_salesforce.py ........ [ > 87%] > tests/contrib/test_slack.py ......... [ > 92%] > tests/contrib/test_spotify.py ... [ > 93%] > tests/contrib/test_strava.py ... [ > 95%] > tests/contrib/test_twitch.py ... [ > 96%] > tests/contrib/test_twitter.py ... [ > 98%] > tests/contrib/test_zoho.py ... > [100%] > > =================================== FAILURES > =================================== > _____________________________ test_authorized_url > ______________________________ > > @responses.activate > def test_authorized_url(): > responses.add( > responses.POST, > "https://example.com/oauth/access_token", > > body='{"access_token":"foobar","token_type":"bearer","scope":"admin"}', > ) > app, _ = make_app() > with app.test_client() as client: > # reset the session before the request > with client.session_transaction() as sess: > sess["test-service_oauth_state"] = "random-string" > # make the request > resp = client.get( > > "/login/test-service/authorized?code=secret-code&state=random-string", > base_url="https://a.b.c", > ) > # check that we redirected the client > assert resp.status_code == 302 > assert resp.headers["Location"] in ("https://a.b.c/", "/") > # check that we obtained an access token > assert len(responses.calls) == 1 > request_data = dict(parse_qsl(responses.calls[0].request.body)) > assert ( > request_data["redirect_uri"] > == "https://a.b.c/login/test-service/authorized" > ) > # check that we stored the access token in the session > with client.session_transaction() as sess: > > assert sess["test-service_oauth_token"] == { > "access_token": "foobar", > "scope": ["admin"], > "token_type": "bearer", > } > > tests/consumer/test_oauth2.py:142: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <SecureCookieSession {'test-service_oauth_state': 'random-string'}> > key = 'test-service_oauth_token' > > def __getitem__(self, key: str) -> t.Any: > self.accessed = True > > return super().__getitem__(key) > E KeyError: 'test-service_oauth_token' > > /usr/lib/python3/dist-packages/flask/sessions.py:80: KeyError > ______________________ test_authorized_url_token_lifetime > ______________________ > > @responses.activate > @freeze_time("2016-01-01 12:00:01") > def test_authorized_url_token_lifetime(): > responses.add( > responses.POST, > "https://example.com/oauth/access_token", > > body='{"access_token":"foobar","token_type":"bearer","expires_in":300}', > ) > app, _ = make_app() > > with app.test_client() as client: > # reset the session before the request > with client.session_transaction() as sess: > sess["test-service_oauth_state"] = "random-string" > # make the request > resp = client.get( > > "/login/test-service/authorized?code=secret-code&state=random-string", > base_url="https://a.b.c", > ) > # check that we redirected the client > assert resp.status_code == 302 > assert resp.headers["Location"] in ("https://a.b.c/", "/") > # check that we obtained an access token > assert len(responses.calls) == 1 > request_data = dict(parse_qsl(responses.calls[0].request.body)) > assert ( > request_data["redirect_uri"] > == "https://a.b.c/login/test-service/authorized" > ) > # check that we stored the access token and expiration date in > the session > expected_stored_token = { > "access_token": "foobar", > "token_type": "bearer", > "expires_in": 300, > "expires_at": 1451649901, > } > with client.session_transaction() as sess: > > assert sess["test-service_oauth_token"] == > > expected_stored_token > > tests/consumer/test_oauth2.py:253: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <SecureCookieSession {'test-service_oauth_state': 'random-string'}> > key = 'test-service_oauth_token' > > def __getitem__(self, key: str) -> t.Any: > self.accessed = True > > return super().__getitem__(key) > E KeyError: 'test-service_oauth_token' > > /usr/lib/python3/dist-packages/flask/sessions.py:80: KeyError > =============================== warnings summary > =============================== > tests/consumer/storage/test_sqla.py::test_sqla_flask_login > /<<PKGBUILDDIR>>/tests/consumer/storage/test_sqla.py:335: LegacyAPIWarning: > Deprecated API features detected! These feature(s) are not compatible with > SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating > applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set > environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. > Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this > message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) > return User.query.get(userid) > > tests/consumer/storage/test_sqla.py::test_sqla_cache > /usr/lib/python3/dist-packages/flask_caching/__init__.py:158: > DeprecationWarning: Using the initialization functions in > flask_caching.backend is deprecated. Use the a full path to backend classes > directly. > warnings.warn( > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > =========================== short test summary info > ============================ > FAILED tests/consumer/test_oauth2.py::test_authorized_url - KeyError: > 'test-s... > FAILED tests/consumer/test_oauth2.py::test_authorized_url_token_lifetime - > Ke... > =========== 2 failed, 193 passed, 1 deselected, 2 warnings in 2.86s > ============ > E: pybuild pybuild:388: test: plugin custom failed with: exit code=1: > python3-coverage run -m pytest -m "not install_required" > I: pybuild base:240: python3-coverage run -m pytest -m "not install_required" > ============================= test session starts > ============================== > platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack > rootdir: /<<PKGBUILDDIR>>, configfile: pyproject.toml > plugins: Flask-Dance-6.2.0, mock-3.8.2, betamax-0.8.1 > collected 196 items / 1 deselected / 195 selected > > tests/test_utils.py .. [ > 1%] > tests/consumer/test_oauth1.py .................... [ > 11%] > tests/consumer/test_oauth2.py ....F...F............... [ > 23%] > tests/consumer/test_requests.py .......... [ > 28%] > tests/consumer/storage/test_sqla.py ............ [ > 34%] > tests/contrib/test_atlassian.py ...... [ > 37%] > tests/contrib/test_authentiq.py .... [ > 40%] > tests/contrib/test_azure.py ....... [ > 43%] > tests/contrib/test_digitalocean.py ..... [ > 46%] > tests/contrib/test_discord.py .... [ > 48%] > tests/contrib/test_dropbox.py ........ [ > 52%] > tests/contrib/test_facebook.py ..... [ > 54%] > tests/contrib/test_fitbit.py ... [ > 56%] > tests/contrib/test_github.py ... [ > 57%] > tests/contrib/test_gitlab.py ...... [ > 61%] > tests/contrib/test_google.py ............. [ > 67%] > tests/contrib/test_heroku.py ... [ > 69%] > tests/contrib/test_jira.py ....... [ > 72%] > tests/contrib/test_linkedin.py ... [ > 74%] > tests/contrib/test_meetup.py .... [ > 76%] > tests/contrib/test_nylas.py ... [ > 77%] > tests/contrib/test_orcid.py .... [ > 80%] > tests/contrib/test_osm.py ... [ > 81%] > tests/contrib/test_reddit.py .... [ > 83%] > tests/contrib/test_salesforce.py ........ [ > 87%] > tests/contrib/test_slack.py ......... [ > 92%] > tests/contrib/test_spotify.py ... [ > 93%] > tests/contrib/test_strava.py ... [ > 95%] > tests/contrib/test_twitch.py ... [ > 96%] > tests/contrib/test_twitter.py ... [ > 98%] > tests/contrib/test_zoho.py ... > [100%] > > =================================== FAILURES > =================================== > _____________________________ test_authorized_url > ______________________________ > > @responses.activate > def test_authorized_url(): > responses.add( > responses.POST, > "https://example.com/oauth/access_token", > > body='{"access_token":"foobar","token_type":"bearer","scope":"admin"}', > ) > app, _ = make_app() > with app.test_client() as client: > # reset the session before the request > with client.session_transaction() as sess: > sess["test-service_oauth_state"] = "random-string" > # make the request > resp = client.get( > > "/login/test-service/authorized?code=secret-code&state=random-string", > base_url="https://a.b.c", > ) > # check that we redirected the client > assert resp.status_code == 302 > assert resp.headers["Location"] in ("https://a.b.c/", "/") > # check that we obtained an access token > assert len(responses.calls) == 1 > request_data = dict(parse_qsl(responses.calls[0].request.body)) > assert ( > request_data["redirect_uri"] > == "https://a.b.c/login/test-service/authorized" > ) > # check that we stored the access token in the session > with client.session_transaction() as sess: > > assert sess["test-service_oauth_token"] == { > "access_token": "foobar", > "scope": ["admin"], > "token_type": "bearer", > } > > tests/consumer/test_oauth2.py:142: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <SecureCookieSession {'test-service_oauth_state': 'random-string'}> > key = 'test-service_oauth_token' > > def __getitem__(self, key: str) -> t.Any: > self.accessed = True > > return super().__getitem__(key) > E KeyError: 'test-service_oauth_token' > > /usr/lib/python3/dist-packages/flask/sessions.py:80: KeyError > ______________________ test_authorized_url_token_lifetime > ______________________ > > @responses.activate > @freeze_time("2016-01-01 12:00:01") > def test_authorized_url_token_lifetime(): > responses.add( > responses.POST, > "https://example.com/oauth/access_token", > > body='{"access_token":"foobar","token_type":"bearer","expires_in":300}', > ) > app, _ = make_app() > > with app.test_client() as client: > # reset the session before the request > with client.session_transaction() as sess: > sess["test-service_oauth_state"] = "random-string" > # make the request > resp = client.get( > > "/login/test-service/authorized?code=secret-code&state=random-string", > base_url="https://a.b.c", > ) > # check that we redirected the client > assert resp.status_code == 302 > assert resp.headers["Location"] in ("https://a.b.c/", "/") > # check that we obtained an access token > assert len(responses.calls) == 1 > request_data = dict(parse_qsl(responses.calls[0].request.body)) > assert ( > request_data["redirect_uri"] > == "https://a.b.c/login/test-service/authorized" > ) > # check that we stored the access token and expiration date in > the session > expected_stored_token = { > "access_token": "foobar", > "token_type": "bearer", > "expires_in": 300, > "expires_at": 1451649901, > } > with client.session_transaction() as sess: > > assert sess["test-service_oauth_token"] == > > expected_stored_token > > tests/consumer/test_oauth2.py:253: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <SecureCookieSession {'test-service_oauth_state': 'random-string'}> > key = 'test-service_oauth_token' > > def __getitem__(self, key: str) -> t.Any: > self.accessed = True > > return super().__getitem__(key) > E KeyError: 'test-service_oauth_token' > > /usr/lib/python3/dist-packages/flask/sessions.py:80: KeyError > =============================== warnings summary > =============================== > tests/consumer/storage/test_sqla.py::test_sqla_flask_login > /<<PKGBUILDDIR>>/tests/consumer/storage/test_sqla.py:335: LegacyAPIWarning: > Deprecated API features detected! These feature(s) are not compatible with > SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating > applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set > environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. > Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this > message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) > return User.query.get(userid) > > tests/consumer/storage/test_sqla.py::test_sqla_cache > /usr/lib/python3/dist-packages/flask_caching/__init__.py:158: > DeprecationWarning: Using the initialization functions in > flask_caching.backend is deprecated. Use the a full path to backend classes > directly. > warnings.warn( > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > =========================== short test summary info > ============================ > FAILED tests/consumer/test_oauth2.py::test_authorized_url - KeyError: > 'test-s... > FAILED tests/consumer/test_oauth2.py::test_authorized_url_token_lifetime - > Ke... > =========== 2 failed, 193 passed, 1 deselected, 2 warnings in 2.07s > ============ > E: pybuild pybuild:388: test: plugin custom failed with: exit code=1: > python3-coverage run -m pytest -m "not install_required" > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 > 3.11" returned exit code 13 The full build log is available from: http://qa-logs.debian.net/2023/01/13/flask-dance_6.2.0-2_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230113;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230113&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.