小编Ajm*_*Ali的帖子

CryptographyDeprecationWarning:int_from_bytes 已弃用,请使用 int.from_bytes 代替

INFO:Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) 
INFO:Started reloader process [27528] using statreload
C:Python\Python39\lib\site-packages\jose\backends\cryptography_backend.py:18:
CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes 
instead from cryptography.utils import int_from_bytes, int_to_bytes 
INFO: Started server process [8912]
INFO: Waiting for application startup. 
INFO: Application startup complete.
Run Code Online (Sandbox Code Playgroud)

我是 FastAPI 的新手,因为我在项目中实现 JWT 令牌,API 正常工作,但每次启动服务器时都会显示此警告。

我已经从 jose 导入了 jwt,并从 passlib.context python 版本 3.9 导入了 CryptContext

我真的很想知道这背后的原因是什么!

python jwt python-jose fastapi

5
推荐指数
1
解决办法
9540
查看次数

标签 统计

fastapi ×1

jwt ×1

python ×1

python-jose ×1