Skip to content

Commit

Permalink
Add 3.13 support.
Browse files Browse the repository at this point in the history
Most of the changes were due to 3.13 sqlite3 now being strict about not closing db connections - which we didn't do in our tests.

Took the opportunity to simplify/remove some fixtures that were used only once or not at all.
  • Loading branch information
jwag956 committed Dec 30, 2024
1 parent 9950c54 commit a6536cf
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 178 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- {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'}

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: check-merge-conflict
- id: fix-byte-order-marker
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand All @@ -31,7 +31,7 @@ repos:
- flake8-bugbear
- flake8-implicit-str-concat
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.36.1
rev: v1.36.4
hooks:
- id: djlint-jinja
files: "\\.html"
Expand Down
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,23 @@ Here you can see the full list of changes between each Flask-Security release.
Version 5.6.0
-------------

Released TBD

Features & Improvements
+++++++++++++++++++++++
- (:issue:`1038`) Add support for 'secret_key' rotation
- (:issue:`980`) Add support for username recovery in simple login flows
- (:pr:`xx`) Add support for Python 3.13

Notes
+++++
Python 3.13 removed ``crypt``, which passlib attempts to import and use as
part of its safe_crypt() method (fallback is to return None).
However - that method only appears to be called in a few crypt handlers and
for bcrypt - only for the built-in bcrypt - not if the bcrypt package is installed.
passlib is not maintained - a new fork (10/1/2024) (https://pypi.org/project/libpass/)
seems promising and has been tested with python 3.13. If that fork matures we will
change the dependencies appropriately.

Version 5.5.2
-------------
Expand Down
5 changes: 5 additions & 0 deletions examples/fsqlalchemy1/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def test_monitor_404(myapp):
headers={myapp.config["SECURITY_TOKEN_AUTHENTICATION_HEADER"]: "token"},
)
assert resp.status_code == 403
with myapp.app_context():
ds.db.engine.dispose()


def test_blog_write(myapp):
Expand All @@ -50,3 +52,6 @@ def test_blog_write(myapp):
)
assert resp.status_code == 200
assert b"Yes, [email protected] can update blog" == resp.data

with myapp.app_context():
ds.db.engine.dispose()
1 change: 1 addition & 0 deletions pyproject-too.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers=[
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 5 - Production/Stable",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers=[
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 5 - Production/Stable",
Expand Down
4 changes: 3 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ filterwarnings =
ignore::DeprecationWarning:pkg_resources:0
ignore::DeprecationWarning:dateutil:0
ignore:.*passwordless feature.*:DeprecationWarning:flask_security:0
ignore::DeprecationWarning:passlib:0
ignore:.*pkg_resources.*:DeprecationWarning:passlib:0
ignore:.*__version__.*:DeprecationWarning:passlib:0
ignore::DeprecationWarning:pony:0
ignore:.*'sms' was enabled in SECURITY_US_ENABLED_METHODS;.*:UserWarning:flask_security:0
ignore:.*'get_token_status' is deprecated.*:DeprecationWarning:flask_security:0
1 change: 1 addition & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Flask-Login
Flask-SQLAlchemy
sqlalchemy
sqlalchemy-utils
setuptools
Loading

0 comments on commit a6536cf

Please sign in to comment.