diff --git a/canaille/core/configuration.py b/canaille/core/configuration.py index c1a4fc02..672c435b 100644 --- a/canaille/core/configuration.py +++ b/canaille/core/configuration.py @@ -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. diff --git a/pyproject.toml b/pyproject.toml index 8c95ecd9..58f47616 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ diff --git a/uv.lock b/uv.lock index 2d313ddc..01890671 100644 --- a/uv.lock +++ b/uv.lock @@ -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]