Skip to content

Commit 0271a57

Browse files
committed
Move from python-jose to pyjwt
1 parent d5b31d9 commit 0271a57

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

Dockerfile.celery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN <<EOT
4646
set -ex
4747
python3 -m venv /root/ansible_env
4848
source /root/ansible_env/bin/activate
49-
pip3 install -r celery.txt ansible-core==2.12.10
49+
pip3 install -r celery.txt ansible-core==2.15.12
5050
EOT
5151

5252
RUN <<EOT

alts/scheduler/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import urllib.parse
1111
from threading import Event
1212

13+
import jwt
1314
from celery.contrib.abortable import AbortableAsyncResult
1415
from celery.exceptions import TimeoutError
1516
from celery.states import READY_STATES, RECEIVED, STARTED
@@ -21,7 +22,6 @@
2122
)
2223
from fastapi.responses import JSONResponse
2324
from fastapi.security import HTTPBearer
24-
from jose import JWTError, jwt
2525
from sqlalchemy import select
2626

2727
from alts.scheduler import CONFIG
@@ -213,7 +213,7 @@ async def authenticate_user(credentials: str = Depends(http_bearer_scheme)):
213213
CONFIG.jwt_secret,
214214
algorithms=[CONFIG.hashing_algorithm],
215215
)
216-
except JWTError:
216+
except jwt.PyJWTError:
217217
raise HTTPException(
218218
status_code=status.HTTP_401_UNAUTHORIZED,
219219
detail="Could not validate credentials",

requirements/base.txt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
PyYAML==6.0.1
2-
asyncssh==2.14.2
1+
PyYAML==6.0.2
2+
asyncssh==2.17.0
33
azure-storage-blob==12.19.0
44
boto3==1.34.40
5-
celery[redis]==5.3.6
5+
celery[redis]==5.4.0
66
cryptography==43.0.1
7-
filelock==3.13.1
7+
filelock==3.16.1
88
filesplit==3.0.2,<4.0
9-
librabbitmq==2.0.0
10-
mako==1.3.2
11-
plumbum==1.8.2
12-
pulpcore-client==3.45.2
13-
pydantic==2.6.1
14-
pyone==6.8.1
15-
requests==2.32.2
9+
mako==1.3.5
10+
plumbum==1.8.3
11+
pulpcore-client==3.61.0
12+
pydantic==2.9.2
13+
pyone==6.10.0
14+
requests==2.32.3
1615
syncer==2.0.3
1716
tap.py==3.1

requirements/scheduler.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-r base.txt
2-
SQLAlchemy==1.4.51
3-
aiohttp==3.10.2
2+
SQLAlchemy==1.4.54
3+
aiohttp==3.10.5
44
databases[sqlite]==0.8.0
5-
fastapi==0.109.2
6-
python-jose==3.3.0
7-
uvicorn==0.27.1
5+
fastapi==0.115.0
6+
pyjwt==2.9.0
7+
uvicorn==0.30.6

0 commit comments

Comments
 (0)