Skip to content

Commit

Permalink
0.6.0 (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lxstr authored Feb 2, 2024
2 parents 35986d2 + 3562c54 commit 41e2771
Show file tree
Hide file tree
Showing 27 changed files with 1,195 additions and 732 deletions.
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/redis-github-action@1.5.0
- 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

0 comments on commit 41e2771

Please sign in to comment.