Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ jobs:
fail-fast: false
matrix:
include:
- {python: '3.9', tox: 'py39-release'}
- {python: '3.9', tox: 'py39-low'}
- {python: '3.10', tox: 'py310-release'}
- {python: '3.10', tox: 'py310-low'}
- {python: '3.11', tox: 'py311-release'}
- {python: '3.11', tox: 'py311-low'}
- {python: '3.12', tox: 'py312-release' }
- {python: '3.12', tox: 'py312-low' }
- {python: '3.13', tox: 'py313-release' }
- {python: 'pypy-3.9', tox: 'pypy39-release'}
- {python: 'pypy-3.9', tox: 'pypy39-low'}
- {python: 'pypy-3.10', tox: 'pypy310-release'}
- {python: 'pypy-3.10', tox: 'pypy310-low'}

steps:
- uses: actions/checkout@v4
Expand All @@ -57,7 +55,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: update pip
run: |
python -m pip install -U pip
Expand All @@ -72,7 +70,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: update pip
run: |
python -m pip install -U pip
Expand All @@ -86,7 +84,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: update pip
run: |
python -m pip install -U pip
Expand Down Expand Up @@ -121,7 +119,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: update pip
run: |
python -m pip install -U pip
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.11
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand All @@ -15,16 +15,16 @@ repos:
- id: check-merge-conflict
- id: fix-byte-order-marker
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.2.0
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ Flask-Security Changelog

Here you can see the full list of changes between each Flask-Security release.

Version 5.7.0
-------------

Released XXX

Fixes
+++++

Docs and Chores
+++++++++++++++
- (:pr:`xx`) Drop support for Python 3.9. This removes the dependency on importlib_resources,
updates pypy to 3.10, and uses 3.12 as base python for tests/tox.

Version 5.6.2
-------------

Expand Down
2 changes: 1 addition & 1 deletion flask_security/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@
)
from .webauthn_util import WebauthnUtil

__version__ = "5.6.2"
__version__ = "5.7.0"
4 changes: 2 additions & 2 deletions flask_security/babel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

I18N support for Flask-Security.

:copyright: (c) 2019-2023 by J. Christopher Wagner (jwag).
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.

As of Flask-Babel 2.0.0 - it supports the Flask-BabelEx Domain extension - and it
Expand All @@ -16,7 +16,7 @@
from collections.abc import Iterable
import atexit
from contextlib import ExitStack
from importlib_resources import files, as_file
from importlib.resources import files, as_file

from flask import current_app
from .utils import config_value as cv
Expand Down
4 changes: 1 addition & 3 deletions pyproject-too.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["flask security"]
license = { file = "LICENSE.txt" }
maintainers = [{ name = "Chris Wagner", email = "jwag.wagner+github@gmail.com"}]
authors = [{ name = "Matt Wright"}, { name = "Chris Wagner", email = "jwag.wagner+github@gmail.com"}]
requires-python = ">=3.9"
requires-python = ">=3.10"
urls.Documentation = "https://flask-security.readthedocs.io"
urls.Homepage = "https://github.com/pallets-eco/flask-security"
urls.Source = "https://github.com/pallets-eco/flask-security"
Expand All @@ -23,7 +23,6 @@ classifiers=[
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -48,7 +47,6 @@ dependencies = [
"setuptools;python_version<'3.13'",
"libpass>=1.9.0;python_version>='3.13'",
"wtforms>=3.0.0", # for form-level errors
"importlib_resources>=5.10.0",
]

[project.optional-dependencies]
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["flask security"]
license = { file = "LICENSE.txt" }
maintainers = [{ name = "Chris Wagner", email = "jwag.wagner+github@gmail.com"}]
authors = [{ name = "Matt Wright"}, { name = "Chris Wagner", email = "jwag.wagner+github@gmail.com"}]
requires-python = ">=3.9"
requires-python = ">=3.10"
urls.Documentation = "https://flask-security.readthedocs.io"
urls.Homepage = "https://github.com/pallets-eco/flask-security"
urls.Source = "https://github.com/pallets-eco/flask-security"
Expand All @@ -23,7 +23,6 @@ classifiers=[
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -46,7 +45,6 @@ dependencies = [
"passlib>=1.7.4;python_version<'3.12'",
"libpass>=1.9.0;python_version>='3.12'",
"wtforms>=3.0.0", # for form-level errors
"importlib_resources>=5.10.0",
]

[project.optional-dependencies]
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ filterwarnings =
ignore::DeprecationWarning:dateutil:0
ignore:.*passwordless feature.*:DeprecationWarning:flask_security:0
ignore:.*pkg_resources.*:DeprecationWarning:passlib:0
ignore:.*pkg_resources.*:UserWarning:passlib:0
ignore:.*__version__.*:DeprecationWarning:passlib:0
ignore:.*'crypt' is deprecated.*:DeprecationWarning:passlib:0
ignore::DeprecationWarning:pony:0
Expand Down
1 change: 0 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ markupsafe
passlib>=1.7.4;python_version<'3.12'
libpass>=1.9.0;python_version>='3.12'
email_validator
importlib_resources>=5.10.0
2 changes: 1 addition & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Flask-Babel
Babel
Flask-Mailman
Flask-SQLAlchemy
Flask-SQLAlchemy-Lite; python_version >= '3.10'
Flask-SQLAlchemy-Lite
argon2-cffi
authlib
bcrypt
Expand Down
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,15 +1034,13 @@ def datastore(request, app, tmpdir, realdburl, realmongodburl):
if request.param == "sqlalchemy":
ds, td = sqlalchemy_setup(app, tmpdir, realdburl)
elif request.param == "sqlalchemy-session":
if sys.version_info < (3, 10):
pytest.skip("sqlalchemy-session requires python3.10 or higher")
ds, td = sqlalchemy_session_setup(app, tmpdir, realdburl)
elif request.param == "mongoengine":
ds, td = mongoengine_setup(app, tmpdir, realmongodburl)
elif request.param == "peewee":
ds, td = peewee_setup(app, tmpdir, realdburl)
elif request.param == "pony":
if sys.version_info > (3, 12):
if sys.version_info >= (3, 13):
pytest.skip("pony requires python3.12 or lower")
ds, td = pony_setup(app, tmpdir, realdburl)
elif request.param == "fsqlalite":
Expand Down
6 changes: 3 additions & 3 deletions tests/test_datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Datastore tests

:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

Expand Down Expand Up @@ -489,7 +489,7 @@ def tear_down():
def test_webauthn(app, datastore):
importorskip("webauthn")
if not datastore.webauthn_model:
skip("No WebAuthn model defined")
skip(f"No WebAuthn model defined for datastore: {datastore.__class__.__name__}")
init_app_with_options(app, datastore)

with app.app_context():
Expand Down Expand Up @@ -523,7 +523,7 @@ def test_webauthn(app, datastore):
def test_webauthn_cascade(app, datastore):
importorskip("webauthn")
if not datastore.webauthn_model:
skip("No WebAuthn model defined")
skip(f"No WebAuthn model defined for datastore: {datastore.__class__.__name__}")
init_app_with_options(app, datastore)

with app.app_context():
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
basepython = python3.11
basepython = python3.12
envlist =
py{39,310,311,312,313,py39}-{low,release,appinstall}
py{310,311,312,313,py310}-{low,release,appinstall}
mypy
async
nowebauthn
Expand All @@ -16,21 +16,21 @@ skip_missing_interpreters = false
[testenv]
allowlist_externals = tox

[testenv:pypy39-release]
[testenv:pypy310-release]
deps =
-r requirements/tests.txt
commands =
tox -e compile_catalog
pytest -W ignore --basetemp={envtmpdir} {posargs:tests}

[testenv:py{39,310,311,312,313}-release]
[testenv:py{310,311,312,313}-release]
deps =
-r requirements/tests.txt
commands =
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}

[testenv:py{39,310,311,312,py39}-low]
[testenv:py{310,311,312,py310}-low]
deps =
pytest
extras = low
Expand Down Expand Up @@ -152,7 +152,7 @@ commands =
mypy --install-types --non-interactive flask_security tests


[testenv:py{39,310,311,312,313}-appinstall]
[testenv:py{310,311,312,313}-appinstall]
commands = python -c "from flask_security import Security"

[testenv:compile_catalog]
Expand All @@ -167,7 +167,7 @@ deps =
jinja2
skip_install = true
commands =
pybabel extract --version 5.6.2 --keyword=_fsdomain --project=Flask-Security \
pybabel extract --version 5.7.0 --keyword=_fsdomain --project=Flask-Security \
-o flask_security/translations/flask_security.pot \
--msgid-bugs-address=jwag956@github.com --mapping-file=babel.ini \
--add-comments=NOTE flask_security
Expand Down