feat!: require Python 3.15 and fix unsigned session cookies
Build & Publish Package / publish (push) Successful in 46s
Build & Publish Package / publish (push) Successful in 46s
BREAKING CHANGE: the minimum supported Python version is now 3.15. Python 3.15: - Raise requires-python from >=3.13 to >=3.15. - Replace the 3.13 trove classifier with 3.15. - Pin the toolchain via a .python-version file. - Pin setup-uv to Python 3.15 in the publish workflow. - Correct the stale "Python 3.7.0 or higher" claim in the README. - Verified against CPython 3.15.0; all extras resolve to 3.15 wheels. Session cookie fixes: - Fix save_session() crashing with AttributeError on every request. - The str sid was decoded as bytes when SESSION_USE_SIGNER is off. - That is the default, so it broke the stock configuration. - Only decode in the signer branch, where sign() actually returns bytes. - Handle a missing secret_key instead of calling sign() on None. - A missing signer now warns and skips the cookie, like open_session(). - Both bugs predate this release and affect all Python 3 versions. Tests: - Add a pytest suite; the project previously had no tests at all. - Cover the cookie round-trip for both signed and unsigned sessions. - Cover session state surviving a follow-up request. - Cover the missing secret_key path. - Three of the five tests fail without the save_session() fix. - Add pytest and pytest-asyncio to the dev dependency group. - Enable asyncio_mode = "auto" so tests need no per-test markers. Version: - Bump the package version to 4.0.0. - Derive __version__ from installed package metadata. - It was hardcoded and had drifted to 3.0.0 while the release was 3.0.2. - pyproject.toml is now the single source of truth for the version. - Commit uv.lock to pin the development environment.
This commit is contained in:
+9
-3
@@ -1,9 +1,9 @@
|
||||
[project]
|
||||
name = "quart-session"
|
||||
version = "3.0.2"
|
||||
version = "4.0.0"
|
||||
description = "Server-side sessions for Quart"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
requires-python = ">=3.15"
|
||||
license = "BSD-3-Clause"
|
||||
license-files = ["LICENSE"]
|
||||
authors = [{ name = "Kroket Ltd.", email = "code@kroket.io" }]
|
||||
@@ -15,7 +15,7 @@ classifiers = [
|
||||
"Intended Audience :: Developers",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Programming Language :: Python :: 3.15",
|
||||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
]
|
||||
@@ -34,6 +34,8 @@ redis-trio = ["trio>=0.22"]
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"build>=1.3.0",
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.24",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
@@ -42,3 +44,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["quart_session*"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
Reference in New Issue
Block a user