fix: disable zxcvbn for Python 3.13

https://github.com/fief-dev/zxcvbn-rs-py/issues/2
This commit is contained in:
Éloi Rivard 2024-11-06 19:23:40 +01:00
parent a23a9b3ecc
commit 6c4ef023cb
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
3 changed files with 6 additions and 7 deletions

View file

@ -302,16 +302,12 @@ class CoreSettings(BaseModel):
MIN_PASSWORD_LENGTH: int = 8
"""Minimum length for user password.
Defaults to 8.
It is possible not to set a minimum, by entering None or 0.
"""
MAX_PASSWORD_LENGTH: int = 1000
"""Maximum length for user password.
Defaults to 1000.
There is a technical limit with passlib used by sql database of 4096
characters. If the value entered is 0 or None, or greater than 4096,
then 4096 will be retained.

View file

@ -44,7 +44,10 @@ front = [
"pycountry >= 23.12.7",
"pytz >= 2022.7",
"toml >= 0.10.0",
"zxcvbn-rs-py >= 0.1.1",
# zxcvbn does not support Python 3.13 yet
# This leads to Canaille installation to fail in some situations.
# https://github.com/fief-dev/zxcvbn-rs-py/issues/2
"zxcvbn-rs-py >= 0.1.1; python_version<'3.13'",
]
oidc = [

View file

@ -138,7 +138,7 @@ front = [
{ name = "pycountry" },
{ name = "pytz" },
{ name = "toml" },
{ name = "zxcvbn-rs-py" },
{ name = "zxcvbn-rs-py", marker = "python_full_version < '3.13'" },
]
ldap = [
{ name = "python-ldap" },
@ -212,7 +212,7 @@ requires-dist = [
{ name = "sqlalchemy-utils", marker = "extra == 'sql'", specifier = ">=0.41.1" },
{ name = "toml", marker = "extra == 'front'", specifier = ">=0.10.0" },
{ name = "wtforms", specifier = ">=3.1.1" },
{ name = "zxcvbn-rs-py", marker = "extra == 'front'", specifier = ">=0.1.1" },
{ name = "zxcvbn-rs-py", marker = "python_full_version < '3.13' and extra == 'front'", specifier = ">=0.1.1" },
]
[package.metadata.requires-dev]