python-jose icon indicating copy to clipboard operation
python-jose copied to clipboard

Deprecation warning from python 3.12

Open spapanik opened this issue 2 years ago • 2 comments
trafficstars

python 3.12 deprecated the use of .utcnow(), and therefore there are deprecation warnings when creating JWTs:

<...?/lib/python3.12/site-packages/jose/jwt.py:311: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).

spapanik avatar Oct 05 '23 10:10 spapanik

For the sake of transparency, this issue affects FastAPI's test suite:

  • https://github.com/tiangolo/fastapi/pull/10666/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R123

Jamim avatar Dec 27 '23 03:12 Jamim