No need to ignore authlib deprecated warning.
This commit is contained in:
parent
dcaf723336
commit
6712d5993c
1 changed files with 1 additions and 13 deletions
14
update.py
14
update.py
|
|
@ -5,18 +5,9 @@ import asyncio
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import typing
|
import typing
|
||||||
import warnings
|
from datetime import date, datetime, timedelta
|
||||||
from datetime import date, datetime
|
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
# authlib 1.7 registers simplefilter("always") for AuthlibDeprecationWarning at
|
|
||||||
# import time, then _joserfc_helpers.py triggers a deprecation by importing the
|
|
||||||
# old authlib.jose module. Importing authlib.deprecate first lets us insert our
|
|
||||||
# "ignore" filter at position 0 so it wins the ordering race.
|
|
||||||
import authlib.deprecate # noqa: E402 — must precede the filter below
|
|
||||||
|
|
||||||
warnings.filterwarnings("ignore", message="authlib.jose module is deprecated")
|
|
||||||
|
|
||||||
import deepdiff
|
import deepdiff
|
||||||
import flask
|
import flask
|
||||||
import requests
|
import requests
|
||||||
|
|
@ -38,9 +29,6 @@ from agenda.types import StrDict
|
||||||
from web_view import app
|
from web_view import app
|
||||||
|
|
||||||
|
|
||||||
from datetime import date, timedelta
|
|
||||||
|
|
||||||
|
|
||||||
async def update_bank_holidays(config: flask.config.Config) -> None:
|
async def update_bank_holidays(config: flask.config.Config) -> None:
|
||||||
"""Update cached copy of UK Bank holidays."""
|
"""Update cached copy of UK Bank holidays."""
|
||||||
t0 = time()
|
t0 = time()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue