Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release candidate 0.6.0-rc1 #208

Merged
merged 38 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eb5c19d
Update sessions.py
idoshr Apr 25, 2023
07363f3
Remove references to PY2
darless Jun 24, 2023
7f100a6
Changes based on review
darless Jun 24, 2023
285c1e8
Update test.yaml
darless Aug 10, 2023
ebfd76c
minor: add newline to end of file
darless Aug 10, 2023
3d78e3c
minor: add newline to end of file
darless Aug 10, 2023
285a06f
Merge branch 'main' of https://github.com/pallets-eco/flask-session
idocyabra Sep 13, 2023
2acec61
remove duplicate code
idocyabra Sep 13, 2023
5f2fd18
revert if session.modified
idocyabra Sep 13, 2023
4283fe5
CHANGELOG
idocyabra Sep 13, 2023
11f11d9
tester fix
idocyabra Sep 14, 2023
60dd963
tester for redis mock version 6/7
idocyabra Sep 14, 2023
57a1978
Merge remote-tracking branch 'darless/chore-166'
Lxstr Dec 31, 2023
a59735f
Minor edits to the pytest addition
Lxstr Dec 31, 2023
3c72917
Merge remote-tracking branch 'idoshr/PR-tester-clean-prevens_save_again'
Lxstr Dec 31, 2023
5a18064
Fix PY2 reference from merge
Lxstr Dec 31, 2023
cab9263
Add contributing
Lxstr Dec 31, 2023
ef332d0
Explicit sign and unsign, improve absent secret_key error message
Lxstr Dec 31, 2023
edd3a9c
Fix expiry is None bug in SQLAlchemy
Lxstr Dec 31, 2023
20f834a
Fix empty session being set
Lxstr Jan 5, 2024
c4a0ede
Fix testing error with no secret key
Lxstr Jan 5, 2024
c4e4157
Use secrets module for session ids
Lxstr Jan 8, 2024
2c724b0
Use redis set command instead of setex
Lxstr Jan 8, 2024
d6617ad
Increase tests
Lxstr Jan 8, 2024
34139c7
Pymongo fixes from flask-session2 and #183 #199 #136
Lxstr Jan 9, 2024
fe3f136
Add badges
Lxstr Jan 9, 2024
f07e28f
Refactor SQLAlchemy and remove default parameters
Lxstr Jan 10, 2024
3ccb16a
Add ruff linter
Lxstr Jan 10, 2024
9e3b2a4
Additional ruff linting
Lxstr Jan 13, 2024
c7478c2
Refactor for readability and consistency
Lxstr Jan 14, 2024
96408be
Simplify fix for tz_aware mongodb
Lxstr Jan 15, 2024
6833806
Consistent expiration naming
Lxstr Jan 15, 2024
191aa27
Explicit support for certain memcache client libraries
Lxstr Jan 15, 2024
252ab91
Comment __init__ for readability
Lxstr Jan 15, 2024
e6fb72c
Update documentation and change log
Lxstr Jan 15, 2024
8edca3f
Ruff noqa
Lxstr Jan 15, 2024
44d7320
Fix docs build
Lxstr Jan 16, 2024
3562c54
Fix missing rc1 in init
Lxstr Jan 19, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [push, pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Run unittests
on: [push, pull_request]
jobs:
unittests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: supercharge/[email protected]
- uses: niden/actions-memcached@v7
- uses: actions/setup-python@v4
with:
python-version: 'pypy3.9'
- name: Install testing requirements
run: pip3 install -r requirements/pytest.txt
- name: Run tests
run: pytest tests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/.idea/
/.vscode/
/.venv/
/venv/
__pycache__/
/dist/
*.egg-info/
/.pytest_cache/
/.coverage
/.coverage.*
*.coveragerc
/htmlcov/
/.mypy_cache/
/.tox/
Expand Down
19 changes: 19 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Version 0.6.0-RC1
------------------

Unreleased

- Use ``should_set_cookie`` for preventing each request from saving the session again.
- Permanent session otherwise empty will not be saved.
- Use `secrets` module to generate session identifiers, with 256 bits of
entropy (was previously 122).
- Explicitly name support for python-memcached, pylibmc and pymemcache.
- Introduce SESSION_KEY_LENGTH to control the length of the session key in bytes, default is 32.
- Fix pymongo 4.0 compatibility.
- Fix expiry is None bug in SQLAlchemy.
- Fix bug when existing SQLAlchemy db instance.
- Support SQLAlchemy SESSION_SQLALCHEMY_SEQUENCE, SESSION_SQLALCHEMY_SCHEMA and SESSION_SQLALCHEMY_BINDKEY
- Drop support for Redis < 2.6.12.
- Fix empty sessions being saved.
- Support Flask 3.0 and Werkzeug 3.0

Version 0.5.0
-------------

Expand Down
32 changes: 32 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Getting started
-------------

Navigate to the project directory and run the following commands:

Create and activate a virtual environment
.. code-block:: text
python -m venv .venv
.\venv\bin\activate


Install dependencies
.. code-block:: text
pip install -r requirements/dev.txt
pip install -r requirements/pytest.txt


Install Memecached and Redis and activate local server (optional)
.. code-block:: text
brew install memcached
brew install redis


Run the tests together or individually
.. code-block:: text
pytest tests
pytest tests/test_basic.py


Pull requests
-------------
Please check previous pull requests before submitting a new one.
29 changes: 29 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,32 @@ Flask-Session

Flask-Session is an extension for Flask that adds support for server-side sessions to
your application.


.. image:: https://github.com/pallets-eco/flask-session/actions/workflows/test.yaml/badge.svg?branch=development
:target: https://github.com/pallets-eco/flask-session/actions/workflows/test.yaml?query=workflow%3ACI+branch%3Adeveloment
:alt: Tests

.. image:: https://readthedocs.org/projects/flask-session/badge/?version=stable&style=flat
:target: https://flask-session.readthedocs.io
:alt: docs

.. image:: https://img.shields.io/github/license/pallets-eco/flask-session
:target: ./LICENSE
:alt: BSD-3 Clause License

.. image:: https://img.shields.io/pypi/v/flask-session.svg?
:target: https://pypi.org/project/flask-session
:alt: PyPI

.. image:: https://img.shields.io/badge/dynamic/json?query=info.requires_python&label=python&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fflask-session%2Fjson
:target: https://pypi.org/project/Flask-Session/
:alt: PyPI - Python Version

.. image:: https://img.shields.io/github/v/release/pallets-eco/flask-session?include_prereleases&label=latest-prerelease
:target: https://github.com/pallets-eco/flask-session/releases
:alt: pre-release

.. image:: https://codecov.io/gh/pallets-eco/flask-session/branch/master/graph/badge.svg?token=yenl5fzxxr
:target: https://codecov.io/gh/pallets-eco/flask-session
:alt: codecov
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ API

.. attribute:: sid

Session id, internally we use :func:`uuid.uuid4` to generate one
Session id, internally we use :func:`secrets.token_urlsafe` to generate one
session id. You can access it with ``session.sid``.

.. autoclass:: NullSessionInterface
Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@
"github_button": True,
"github_user": "pallets-eco",
"github_repo": "flask-session",
"github_type": "star",
"github_banner": True,
"show_related": True,
}
Loading
Loading