Skip to content

Commit 92de3be

Browse files
committed
Stick FastAPI version to 0.82.0 or higher (latest is better) - Related to nicolargo#2926
1 parent 9432d93 commit 92de3be

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

glances/outputs/glances_restful_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
from fastapi.security import HTTPBasic, HTTPBasicCredentials
3636
from fastapi.staticfiles import StaticFiles
3737
from fastapi.templating import Jinja2Templates
38-
except ImportError:
39-
logger.critical('FastAPI import error. Glances cannot start in web server mode.')
38+
except ImportError as e:
39+
logger.critical(f'FastAPI import error: {e}')
40+
logger.critical('Glances cannot start in web server mode.')
4041
sys.exit(2)
4142

4243
try:

optional-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cassandra-driver
77
chevron
88
docker>=6.1.1
99
elasticsearch
10-
fastapi
10+
fastapi>=0.82.0
1111
graphitesender
1212
hddtemp
1313
influxdb>=1.0.0 # For InfluxDB < 1.8

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get_install_extras_require():
8383
'smart': ['pySMART.smartx'],
8484
'snmp': ['pysnmp'],
8585
'sparklines': ['sparklines'],
86-
'web': ['fastapi', 'uvicorn', 'jinja2', 'requests'],
86+
'web': ['fastapi>=0.82.0', 'uvicorn', 'jinja2', 'requests'],
8787
'wifi': ['wifi'],
8888
}
8989
if sys.platform.startswith('linux'):

webui-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# install with base requirements file
22
-r requirements.txt
33

4-
fastapi; python_version >= "3.8"
4+
fastapi>=0.82.0; python_version >= "3.8"
55
jinja2
66
uvicorn; python_version >= "3.8"

0 commit comments

Comments
 (0)