Skip to content

Commit

Permalink
chore: stop support for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Apr 5, 2024
1 parent 4f56a58 commit e0b3442
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 300 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Check_local_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
strategy:
matrix:
python:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'

steps:
- name: Setup git
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ repos:
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
47 changes: 2 additions & 45 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = ["Your Name <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
python = ">=3.9,<4.0"
celery = "^5.2.7"
filetype = "^1.2.0"
flask = "^3.0.0"
Expand Down Expand Up @@ -82,10 +82,10 @@ isolated_build = true
skipsdist = true
envlist =
style
py38
py39
py310
py311
py312
coverage
doc
Expand Down
18 changes: 8 additions & 10 deletions web/b3desk/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import json
from typing import Annotated
from typing import Any
from typing import Dict
from typing import List
from typing import Optional

from flask_babel import lazy_gettext as _
Expand All @@ -24,7 +22,7 @@ def split_comma_separated_strings(value):
return map(str.strip, value.split(","))


ListOfStrings = Annotated[List[str], BeforeValidator(split_comma_separated_strings)]
ListOfStrings = Annotated[list[str], BeforeValidator(split_comma_separated_strings)]


AVAILABLE_WORDINGS = {
Expand Down Expand Up @@ -231,7 +229,7 @@ class MainSettings(BaseSettings):
MAX_MEETINGS_PER_USER: int = 50
"""Le nombre maximum de séminaires que peut créer un utilisateur."""

ALLOWED_MIME_TYPES_SERVER_SIDE: Optional[List[str]] = [
ALLOWED_MIME_TYPES_SERVER_SIDE: Optional[list[str]] = [
"application/pdf",
"image/vnd.dwg",
"image/x-xcf",
Expand Down Expand Up @@ -268,9 +266,9 @@ class MainSettings(BaseSettings):
@field_validator("ALLOWED_MIME_TYPES_SERVER_SIDE", mode="before")
def get_allowed_mime_types_server_side(
cls,
allowed_mime_types_server_side: Optional[List[str]],
allowed_mime_types_server_side: Optional[list[str]],
info: ValidationInfo,
) -> List[str]:
) -> list[str]:
if not allowed_mime_types_server_side:
return []

Expand Down Expand Up @@ -318,7 +316,7 @@ def get_allowed_mime_types_server_side(
https://flask-pyoidc.readthedocs.io/en/latest/api.html?highlight=userinfo_http_method#flask_pyoidc.provider_configuration.ProviderConfiguration
"""

OIDC_INFO_REQUESTED_FIELDS: List[str] = ["email", "given_name", "family_name"]
OIDC_INFO_REQUESTED_FIELDS: list[str] = ["email", "given_name", "family_name"]
"""Probablement un relicat de flask-oidc, semble inutilisé."""

OIDC_ISSUER: Optional[str] = None
Expand Down Expand Up @@ -492,7 +490,7 @@ def get_attendee_attendee_scopes(
"""Semble inutilisé."""

@computed_field
def DOCUMENTATION_LINK(self) -> Dict[str, Any]:
def DOCUMENTATION_LINK(self) -> dict[str, Any]:
return {
"url": self.DOCUMENTATION_LINK_URL,
"label": self.DOCUMENTATION_LINK_LABEL,
Expand Down Expand Up @@ -821,7 +819,7 @@ def get_meeting_mail_subject(
"""Sous-titre de la page de documentation."""

@computed_field
def WORDINGS(self) -> Dict[str, Any]:
def WORDINGS(self) -> dict[str, Any]:
return {
"a_meeting": self.WORDING_A_MEETING,
"the_meeting": self.WORDING_THE_MEETING,
Expand Down Expand Up @@ -960,7 +958,7 @@ def get_moderator_welcome_message(

@field_validator("EMAIL_WHITELIST")
def get_email_whitelist(
cls, email_whitelist: List[str], info: ValidationInfo
cls, email_whitelist: list[str], info: ValidationInfo
) -> str:
if not email_whitelist:
return DEFAULT_EMAIL_WHITELIST
Expand Down
144 changes: 71 additions & 73 deletions web/requirements.app.txt
Original file line number Diff line number Diff line change
@@ -1,73 +1,71 @@
alembic==1.13.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
amqp==5.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
annotated-types==0.6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
async-timeout==4.0.3 ; python_full_version >= "3.8.1" and python_full_version < "3.11.3"
babel==2.14.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
backports-zoneinfo==0.2.1 ; python_full_version >= "3.8.1" and python_version < "3.9"
backports-zoneinfo[tzdata]==0.2.1 ; python_full_version >= "3.8.1" and python_version < "3.9"
billiard==4.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
blinker==1.7.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
cachelib==0.9.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
celery==5.3.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
certifi==2024.2.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
cffi==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_python_implementation != "PyPy"
charset-normalizer==3.3.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
click-didyoumean==0.3.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
click-plugins==1.1.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
click-repl==0.3.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
click==8.1.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
colorama==0.4.6 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_system == "Windows"
cryptography==42.0.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
defusedxml==0.7.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
filetype==1.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-babel==4.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-caching==2.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-migrate==4.0.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-pyoidc==3.14.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-sqlalchemy==3.0.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-uploads==0.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask-wtf==1.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
flask==3.0.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
future==1.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
greenlet==3.0.3 ; python_full_version >= "3.8.1" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_version < "4.0"
gunicorn==21.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
idna==3.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
importlib-metadata==7.1.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
importlib-resources==6.4.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
itsdangerous==2.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
jinja2==3.1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
kombu==5.3.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
lxml==5.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
mako==1.3.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
markupsafe==2.1.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
netaddr==1.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
oic==1.6.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
packaging==24.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
prompt-toolkit==3.0.43 ; python_full_version >= "3.8.1" and python_version < "4.0"
psycopg2==2.9.9 ; python_full_version >= "3.8.1" and python_version < "4.0"
pycparser==2.22 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_python_implementation != "PyPy"
pycryptodomex==3.20.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pydantic-core==2.16.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
pydantic-settings==2.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pydantic==2.6.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyjwkest==1.4.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dotenv==1.0.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-slugify==8.0.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytz==2024.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
redis==5.0.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
requests==2.31.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
six==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
sqlalchemy-json==0.7.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
sqlalchemy-utils==0.41.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
sqlalchemy==1.4.52 ; python_full_version >= "3.8.1" and python_version < "4.0"
text-unidecode==1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
typing-extensions==4.10.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
tzdata==2024.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
urllib3==2.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
vine==5.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
wcwidth==0.2.13 ; python_full_version >= "3.8.1" and python_version < "4.0"
webdavclient3==3.14.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
werkzeug==3.0.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
wtforms==3.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
zipp==3.18.1 ; python_full_version >= "3.8.1" and python_version < "3.10"
alembic==1.13.1 ; python_version >= "3.9" and python_version < "4.0"
amqp==5.2.0 ; python_version >= "3.9" and python_version < "4.0"
annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "4.0"
async-timeout==4.0.3 ; python_version >= "3.9" and python_full_version < "3.11.3"
babel==2.14.0 ; python_version >= "3.9" and python_version < "4.0"
billiard==4.2.0 ; python_version >= "3.9" and python_version < "4.0"
blinker==1.7.0 ; python_version >= "3.9" and python_version < "4.0"
cachelib==0.9.0 ; python_version >= "3.9" and python_version < "4.0"
celery==5.3.6 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "4.0"
cffi==1.16.0 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0"
click-didyoumean==0.3.1 ; python_version >= "3.9" and python_version < "4.0"
click-plugins==1.1.1 ; python_version >= "3.9" and python_version < "4.0"
click-repl==0.3.0 ; python_version >= "3.9" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows"
cryptography==42.0.5 ; python_version >= "3.9" and python_version < "4.0"
defusedxml==0.7.1 ; python_version >= "3.9" and python_version < "4.0"
filetype==1.2.0 ; python_version >= "3.9" and python_version < "4.0"
flask-babel==4.0.0 ; python_version >= "3.9" and python_version < "4.0"
flask-caching==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
flask-migrate==4.0.7 ; python_version >= "3.9" and python_version < "4.0"
flask-pyoidc==3.14.3 ; python_version >= "3.9" and python_version < "4.0"
flask-sqlalchemy==3.0.5 ; python_version >= "3.9" and python_version < "4.0"
flask-uploads==0.2.1 ; python_version >= "3.9" and python_version < "4.0"
flask-wtf==1.2.1 ; python_version >= "3.9" and python_version < "4.0"
flask==3.0.2 ; python_version >= "3.9" and python_version < "4.0"
future==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
greenlet==3.0.3 ; python_version >= "3.9" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_version < "4.0"
gunicorn==21.2.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.6 ; python_version >= "3.9" and python_version < "4.0"
importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.10"
importlib-resources==6.4.0 ; python_version >= "3.9" and python_version < "4.0"
itsdangerous==2.1.2 ; python_version >= "3.9" and python_version < "4.0"
jinja2==3.1.3 ; python_version >= "3.9" and python_version < "4.0"
kombu==5.3.6 ; python_version >= "3.9" and python_version < "4.0"
lxml==5.2.1 ; python_version >= "3.9" and python_version < "4.0"
mako==1.3.2 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0"
netaddr==1.2.1 ; python_version >= "3.9" and python_version < "4.0"
oic==1.6.1 ; python_version >= "3.9" and python_version < "4.0"
packaging==24.0 ; python_version >= "3.9" and python_version < "4.0"
prompt-toolkit==3.0.43 ; python_version >= "3.9" and python_version < "4.0"
psycopg2==2.9.9 ; python_version >= "3.9" and python_version < "4.0"
pycparser==2.22 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy"
pycryptodomex==3.20.0 ; python_version >= "3.9" and python_version < "4.0"
pydantic-core==2.16.3 ; python_version >= "3.9" and python_version < "4.0"
pydantic-settings==2.2.1 ; python_version >= "3.9" and python_version < "4.0"
pydantic==2.6.4 ; python_version >= "3.9" and python_version < "4.0"
pyjwkest==1.4.2 ; python_version >= "3.9" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "4.0"
python-dotenv==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
python-slugify==8.0.4 ; python_version >= "3.9" and python_version < "4.0"
pytz==2024.1 ; python_version >= "3.9" and python_version < "4.0"
redis==5.0.3 ; python_version >= "3.9" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.9" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0"
sqlalchemy-json==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
sqlalchemy-utils==0.41.2 ; python_version >= "3.9" and python_version < "4.0"
sqlalchemy==1.4.52 ; python_version >= "3.9" and python_version < "4.0"
text-unidecode==1.3 ; python_version >= "3.9" and python_version < "4.0"
typing-extensions==4.10.0 ; python_version >= "3.9" and python_version < "4.0"
tzdata==2024.1 ; python_version >= "3.9" and python_version < "4.0"
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "4.0"
vine==5.1.0 ; python_version >= "3.9" and python_version < "4.0"
wcwidth==0.2.13 ; python_version >= "3.9" and python_version < "4.0"
webdavclient3==3.14.6 ; python_version >= "3.9" and python_version < "4.0"
werkzeug==3.0.2 ; python_version >= "3.9" and python_version < "4.0"
wtforms==3.1.2 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.10"
Loading

0 comments on commit e0b3442

Please sign in to comment.