-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed processing of heartbeats and a session expiration and addeds su…
…pport of aiohttp_cors (#448) * - Fixed processing of heartbeats and a session expiration. - Fixed ping-pong based heartbeats for web-socket connections. - Added arguments ``heartbeat_delay`` and ``disconnect_delay`` into ``Session.__init__()``. - Added argument ``disconnect_delay`` into ``SessionManager.__init__()``. - **Breaking change:** Removed argument ``timeout`` from ``Session.__init__()`` and ``SessionManager.__init__()``. - **Breaking change:** Argument ``heartbeat`` of ``SessionManager.__init__()`` renamed into ``heartbeat_delay``. - **Breaking change:** ``Session.registry`` renamed into ``Session.app``. - **Breaking change:** Dropped support of Python < 3.7 * Deleted method ``SessionManager.route_url()``. * Added release date into CHANGES.rst * Removed commented code from tests and fixed CHANGES.rst * - Added argument ``cors_config`` into function ``add_endpoint()`` to support of CORS settings from ``aiohttp_cors``. - Function ``add_endpoint()`` now returns all registered routes. - Replaced returning instances of error HTTP responses on raising its as exceptions. - Changed name of some routes. * Fixed GitHub actions * Fixed GitHub actions * Fixed GitHub actions * Fixed version of flake8 to support Python 3.7 * Fixed typing * Reverted pytest-timeout * Removed embedded CORS processing. * Added arguments ``heartbeat_delay`` and ``disconnect_delay`` into function ``add_endpoint()``. * - Heartbeat task moved from ``SessionManager`` into ``Session``. - Methods ``_acquire`` and ``_release`` of ``Sessions`` renamed into ``acquire`` and ``release``. * Added processing of ``ConnectionError`` in ``StreamingTransport``. * Fixed name of transports. * - Changed arguments of handler function. Now handler function must be defined like ``async def handler(manager, session, msg):`` - Constants: - FRAME_OPEN - FRAME_CLOSE - FRAME_MESSAGE - FRAME_MESSAGE_BLOB - FRAME_HEARTBEAT replaced by ``Frame`` enums with corresponding values. - Constants: - MSG_OPEN - MSG_MESSAGE - MSG_CLOSE - MSG_CLOSED replaced by ``MsgType`` enums with corresponding values. - Constants: - STATE_NEW - STATE_OPEN - STATE_CLOSING - STATE_CLOSED replaced by ``SessionState`` enums with corresponding values. * Fixed error processing in StreamingTransport * Changed supported versions of Python. * Added "sockjs_transport_name" into request object. * - Updated dependencies versions. - Fixed code style. * Fixed dependencies. * Fixed versions of GitHub actions.
- Loading branch information
Showing
50 changed files
with
1,797 additions
and
1,902 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Check and Test | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: {} | ||
|
||
|
||
jobs: | ||
run_tests: | ||
strategy: | ||
matrix: | ||
python-version: [ "3.10", "3.11", "3.12" ] | ||
|
||
name: Test on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools | ||
python -m pip install -r requirements.txt | ||
python -m pip install -e .[test] | ||
- name: Run checks and tests | ||
run: | | ||
make flake | ||
pytest ./tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ eggs | |
sources | ||
dist | ||
develop-eggs | ||
build | ||
*.egg-info | ||
*.pyc | ||
*.pyo | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ Supported transports | |
Requirements | ||
------------ | ||
|
||
- Python 3.5.3 | ||
- Python 3.10.0 | ||
|
||
- gunicorn 19.2.0 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.