Skip to content

Commit

Permalink
requirements: upgrade flask-caching to 2.0.1 (bug 1791807)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeid committed Feb 28, 2023
1 parent 504299d commit 47de8d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion landoapi/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def healthy(self) -> bool | str:
# Dirty, but if this breaks in the future we can instead
# create our own redis-py client with its own connection
# pool.
redis = cache.cache._read_clients
redis = cache.cache._read_client

try:
redis.ping()
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask-Caching==1.10.1
Flask-Caching==2.0.1
Flask-Migrate==3.1.0
Flask==2.1.1
black==22.3.0
Expand Down
10 changes: 7 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ botocore==1.25.0 \
# boto3
# moto
# s3transfer
cachelib==0.9.0 \
--hash=sha256:38222cc7c1b79a23606de5c2607f4925779e37cdcea1c2ad21b8bae94b5425a5 \
--hash=sha256:811ceeb1209d2fe51cd2b62810bd1eccf70feba5c52641532498be5c675493b3
# via flask-caching
celery==4.3.0 \
--hash=sha256:4c4532aa683f170f40bd76f928b70bc06ff171a959e06e71bf35f2f9d6031ef9 \
--hash=sha256:528e56767ae7e43a16cfef24ee1062491f5754368d38fcfffa861cdb9ef219be
Expand Down Expand Up @@ -200,9 +204,9 @@ flask==2.1.1 \
# flask-sqlalchemy
# pytest-flask
# sentry-sdk
flask-caching==1.10.1 \
--hash=sha256:bcda8acbc7508e31e50f63e9b1ab83185b446f6b6318bd9dd1d45626fba2e903 \
--hash=sha256:cf19b722fcebc2ba03e4ae7c55b532ed53f0cbf683ce36fafe5e881789a01c00
flask-caching==2.0.1 \
--hash=sha256:10df200a03f032af60077befe41779dd94898b67c82040d34e87210b71ba2638 \
--hash=sha256:703df847cbe904d8ddffd5f5fb320e236a31cb7bebac4a93d6b1701dd16dbf37
# via -r requirements.in
flask-migrate==3.1.0 \
--hash=sha256:57d6060839e3a7f150eaab6fe4e726d9e3e7cffe2150fb223d73f92421c6d1d9 \
Expand Down
2 changes: 1 addition & 1 deletion tests/test_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_cache_unhealthy_configuration():

def test_cache_unhealthy_service(redis_cache, monkeypatch):
mock_cache = Mock(redis_cache)
mock_cache.cache._read_clients.ping.side_effect = redis.TimeoutError
mock_cache.cache._read_client.ping.side_effect = redis.TimeoutError
monkeypatch.setattr("landoapi.cache.cache", mock_cache)
monkeypatch.setattr("landoapi.cache.RedisCache", type(mock_cache.cache))

Expand Down

0 comments on commit 47de8d0

Please sign in to comment.