From 4c2c81b1d3af8d994e79bceb35ccb4ac34f142ab Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Fri, 18 Dec 2020 23:42:09 +0100 Subject: [PATCH 01/20] sync --- requirements-dev.txt | 1 + tox.ini | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 98593c852..29496b52d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,6 +7,7 @@ tox>=2.9.1 tox-gh-actions>=2.2.0 codecov>=2.0.15 sphinx>=1.7.1 +sphinxcontrib-images>=0.9.1 twine>=1.10.0 pytest>=3.4.2 pytest-runner>=2.11.1 diff --git a/tox.ini b/tox.ini index ea8bd8ea4..0a844cf0d 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ skip_missing_interpreters = true envlist = flake8 coverage + sphinx # CPython py36-{tw189,tw1910,twtrunk,asyncio} @@ -158,3 +159,25 @@ commands = coverage report coverage html codecov + + +[testenv:sphinx] +description = + Generate docs using Sphinx. +skip_install = False +deps = + sphinx + sphinx_rtd_theme +commands = + python -V + sphinx-build --version + + # first test with all warnings fatal + sphinx-build -nWT -b dummy ./docs ./docs/_build + + # generate HTML output + sphinx-build -b html ./docs ./docs/_build + + # move to HOME to preserve on Travis for upload to S3 + -rm -rf {homedir}/autobahn-docs + cp -R ./docs/_build {homedir}/autobahn-docs From aa8d7e8f234a0646c56ff8722b6a3d8cfc018285 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 00:00:01 +0100 Subject: [PATCH 02/20] fix --- .github/workflows/main.yml | 3 ++- requirements-dev.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77b7c4da0..8f7ad2eb9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,9 +44,10 @@ jobs: # since we use --parallel-mode to coverage inside Tox we use # "coverage combine" so the filename is always ".coverage" - name: Run Coverage + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | tox -c tox.ini -e coverage - coverage combine && codecov test: env: diff --git a/requirements-dev.txt b/requirements-dev.txt index 29496b52d..8f8e48fd9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ +txaio>=20.4.1 pip>=9.0.1 bumpversion>=0.5.3 wheel>=0.30.0 From 00bb869f695963d2a3c7427baae0bf582e94ec7e Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 00:24:57 +0100 Subject: [PATCH 03/20] sync --- tox.ini | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tox.ini b/tox.ini index 0a844cf0d..1ca04f11b 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ envlist = py39-{tw189,tw1910,twtrunk,asyncio} # PyPy + pypy36-{tw189,tw1910,twtrunk,asyncio} pypy37-{tw189,tw1910,twtrunk,asyncio} @@ -61,16 +62,16 @@ commands = rm -f /tmp/xbr-protocol-latest.zip curl -s https://xbr.network/lib/abi/xbr-protocol-latest.zip -o /tmp/xbr-protocol-latest.zip unzip -t /tmp/xbr-protocol-latest.zip - rm -rf {toxinidir}/autobahn/xbr/contracts - unzip /tmp/xbr-protocol-latest.zip -d {toxinidir}/autobahn/xbr/contracts + rm -rf ./autobahn/xbr/contracts + unzip /tmp/xbr-protocol-latest.zip -d ./autobahn/xbr/contracts # install package sh -c "which python && which pip && python -V" pip install --no-cache --ignore-installed --force-reinstall .[twisted,asyncio,compress,serialization,encryption,scram] - asyncio: {envbindir}/py.test -v {envsitepackagesdir}/autobahn - tw189,tw1910: {envbindir}/trial {envsitepackagesdir}/autobahn - twtrunk: python -m twisted.trial {envsitepackagesdir}/autobahn + asyncio: py.test -v ./autobahn + tw189,tw1910: trial ./autobahn + twtrunk: python -m twisted.trial ./autobahn whitelist_externals = sh @@ -109,11 +110,10 @@ deps = exclude = autobahn/wamp/gen max-line-length = 119 commands = - sh -c "which python" python -V flake8 --version - ; These ignores will be removed when they are fixed and we are flake8-clean - flake8 --ignore=E402,E501,E722,E741,N801,N802,N803,N805,N806,N815 \ + flake8 -v --statistics \ + --ignore=E402,E501,E722,E741,N801,N802,N803,N805,N806,N815 \ --exclude "autobahn/wamp/message_fbs.py,autobahn/wamp/gen/*" \ autobahn @@ -141,19 +141,19 @@ commands = rm -f /tmp/xbr-protocol-latest.zip curl -s https://xbr.network/lib/abi/xbr-protocol-latest.zip -o /tmp/xbr-protocol-latest.zip unzip -t /tmp/xbr-protocol-latest.zip - rm -rf {toxinidir}/autobahn/xbr/contracts - unzip /tmp/xbr-protocol-latest.zip -d {toxinidir}/autobahn/xbr/contracts + rm -rf ./autobahn/xbr/contracts + unzip /tmp/xbr-protocol-latest.zip -d ./autobahn/xbr/contracts # install package with all optional extensions pip install .[all] # test autobahn on asyncio (run under coverage) - sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" {envbindir}/py.test -v {envsitepackagesdir}/autobahn' + sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" py.test -v -/autobahn' # test autobahn on twisted (run under coverage) - sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial {envsitepackagesdir}/autobahn' + sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' - twtrunk,asyncio: sh -c "mkdir -p {homedir}/coverage && cp {toxinidir}/.coverage.* {homedir}/coverage/ && ls -la {homedir}/coverage" + twtrunk,asyncio: sh -c "mkdir -p ${HOME}/coverage && cp ./.coverage.* ${HOME}/coverage/ && ls -la ${HOME}/coverage" coverage combine coverage report @@ -173,11 +173,12 @@ commands = sphinx-build --version # first test with all warnings fatal + find ./docs -name "*.rst" sphinx-build -nWT -b dummy ./docs ./docs/_build # generate HTML output sphinx-build -b html ./docs ./docs/_build # move to HOME to preserve on Travis for upload to S3 - -rm -rf {homedir}/autobahn-docs - cp -R ./docs/_build {homedir}/autobahn-docs + -rm -rf ${HOME}/autobahn-docs + cp -R ./docs/_build ${HOME}/autobahn-docs From d45830625f093e2c049e39c95338017b4b5605e3 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 00:34:17 +0100 Subject: [PATCH 04/20] sync2 --- .github/workflows/main.yml | 1 - tox.ini | 6 ------ 2 files changed, 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f7ad2eb9..b3f889c40 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -148,7 +148,6 @@ jobs: # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path - name: Set environment run: | - echo "${HOME}/.local/bin" >> $GITHUB_PATH echo BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV diff --git a/tox.ini b/tox.ini index 1ca04f11b..249f96c29 100644 --- a/tox.ini +++ b/tox.ini @@ -153,8 +153,6 @@ commands = # test autobahn on twisted (run under coverage) sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' - twtrunk,asyncio: sh -c "mkdir -p ${HOME}/coverage && cp ./.coverage.* ${HOME}/coverage/ && ls -la ${HOME}/coverage" - coverage combine coverage report coverage html @@ -178,7 +176,3 @@ commands = # generate HTML output sphinx-build -b html ./docs ./docs/_build - - # move to HOME to preserve on Travis for upload to S3 - -rm -rf ${HOME}/autobahn-docs - cp -R ./docs/_build ${HOME}/autobahn-docs From dc5b1d153e3a397af85cab29532c861f6949a8fc Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 00:49:54 +0100 Subject: [PATCH 05/20] fixes --- setup.py | 6 +++--- tox.ini | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c9a477c29..d9a340577 100644 --- a/setup.py +++ b/setup.py @@ -251,8 +251,9 @@ def run_tests(self): url='http://crossbar.io/autobahn', platforms='Any', install_requires=[ - 'txaio>=20.4.1', # MIT license - 'cryptography>=2.9.2', # BSD *or* Apache license + 'txaio>=20.4.1', # MIT license (https://github.com/crossbario/txaio) + 'cryptography>=2.9.2', # BSD *or* Apache license (https://github.com/pyca/cryptography) + 'hyperlink>=20.0.1', # MIT license (https://github.com/python-hyper/hyperlink) ], extras_require={ 'all': extras_require_all, @@ -299,7 +300,6 @@ def run_tests(self): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Programming Language :: Python :: Implementation :: Jython", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Communications", diff --git a/tox.ini b/tox.ini index 249f96c29..ca88bb678 100644 --- a/tox.ini +++ b/tox.ini @@ -84,6 +84,7 @@ whitelist_externals = mv curl unzip + find setenv = SODIUM_INSTALL = bundled @@ -166,6 +167,7 @@ skip_install = False deps = sphinx sphinx_rtd_theme + sphinxcontrib.images commands = python -V sphinx-build --version From adcc70995ba21b5fe6411687d89010e963b6a8a5 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 02:17:28 +0100 Subject: [PATCH 06/20] sync --- .github/workflows/main.yml | 1 + autobahn/asyncio/wamp.py | 4 ++-- autobahn/wamp/component.py | 10 ++++------ autobahn/wamp/protocol.py | 4 ++-- docs/asynchronous-programming.rst | 4 ++-- docs/changelog.rst | 4 ++-- docs/conf.py | 6 +++++- docs/reference/autobahn.wamp.component.rst | 2 +- tox.ini | 11 ++++++++++- 9 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b3f889c40..cabf5f83a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,6 +52,7 @@ jobs: test: env: CB_FULLTESTS: 1 + PYTHONDONTWRITEBYTECODE: 1 # Test on Ubuntu, MacOS, Windows using CPython 3.6-3.9, PyPy 3.6-3.7 runs-on: ${{ matrix.os }} diff --git a/autobahn/asyncio/wamp.py b/autobahn/asyncio/wamp.py index 9ce1291d9..7b11e3c70 100644 --- a/autobahn/asyncio/wamp.py +++ b/autobahn/asyncio/wamp.py @@ -57,8 +57,8 @@ class ApplicationSession(protocol.ApplicationSession): Implements: - * :class:`autobahn.wamp.interfaces.ITransportHandler` - * :class:`autobahn.wamp.interfaces.ISession` + * ``autobahn.wamp.interfaces.ITransportHandler`` + * ``autobahn.wamp.interfaces.ISession`` """ log = txaio.make_logger() diff --git a/autobahn/wamp/component.py b/autobahn/wamp/component.py index d33801f57..88b015b17 100644 --- a/autobahn/wamp/component.py +++ b/autobahn/wamp/component.py @@ -417,7 +417,7 @@ def __init__(self, main=None, transports=None, config=None, realm='realm1', extr pass a main() procedure, the session will not be closed (unless you arrange for .leave() to be called). - :type main: callable taking 2 args: reactor, ISession + :type main: callable taking two args ``reactor`` and ``ISession`` :param transports: Transport configurations for creating transports. Each transport can be a WAMP URL, or a dict @@ -445,25 +445,23 @@ def __init__(self, main=None, transports=None, config=None, realm='realm1', extr - ``options``: tbd - ``proxy``: tbd - :type transports: None or unicode or list of dicts + :type transports: None or str or list :param realm: the realm to join - :type realm: unicode + :type realm: str :param authentication: configuration of authenticators - :type authentication: dict mapping auth_type to dict + :type authentication: dict :param session_factory: if None, ``ApplicationSession`` is used, otherwise a callable taking a single ``config`` argument that is used to create a new `ApplicationSession` instance. - :type session_factory: callable :param is_fatal: a callable taking a single argument, an ``Exception`` instance. The callable should return ``True`` if this error is "fatal", meaning we should not try connecting to the current transport again. The default behavior (on None) is to always return ``False`` - :type is_fatal: callable taking one arg, or None """ self.set_valid_events( [ diff --git a/autobahn/wamp/protocol.py b/autobahn/wamp/protocol.py index ca055c433..5edf7a688 100644 --- a/autobahn/wamp/protocol.py +++ b/autobahn/wamp/protocol.py @@ -1775,8 +1775,8 @@ class _SessionShim(ApplicationSession): ApplicationSession "directly". **NOTE:** this is not public or intended for use; you should import - either :class:`autobahn.asyncio.wamp.Session` or - :class:`autobahn.twisted.wamp.Session` depending on which async + either autobahn.asyncio.wamp.Session or + autobahn.twisted.wamp.Session depending on which async framework yo're using. """ diff --git a/docs/asynchronous-programming.rst b/docs/asynchronous-programming.rst index 069bfa49f..f47262aad 100644 --- a/docs/asynchronous-programming.rst +++ b/docs/asynchronous-programming.rst @@ -267,14 +267,14 @@ Now, when converted to ``inlineCallbacks``, the code becomes: Have a look at the highlighted lines - here is what we do: 1. Decorating our squaring function with ``inlineCallbacks`` (line 5). Doing so marks the function as a coroutine which allows us to use this sequential looking coding style. -2. Inside the function, we simulate the slow execution by sleeping for a second (line 7). However, we are sleeping in a non-blocking way (:func:`autobahn.twisted.util.sleep`). The ``yield`` will put the coroutine aside until the sleep returns. +2. Inside the function, we simulate the slow execution by sleeping for a second (line 7). However, we are sleeping in a non-blocking way (``autobahn.twisted.util.sleep``). The ``yield`` will put the coroutine aside until the sleep returns. 3. To return values from Twisted coroutines, we need to use ``returnValue`` (line 8). .. note:: The reason ``returnValue`` is necessary goes deep into implementation details of Twisted and Python. In short: co-routines in Python 2 with Twisted are simulated using exceptions. Only Python 3.3+ has gotten native support for co-routines using the new yield from statement, Python 3.5+ use await statement and it is the new recommended method. -In above, we are using a little helper :func:`autobahn.twisted.util.sleep` for sleeping "inline". The helper is really trivial: +In above, we are using a little helper ``autobahn.twisted.util.sleep`` for sleeping "inline". The helper is really trivial: .. code-block:: python diff --git a/docs/changelog.rst b/docs/changelog.rst index 141855155..d603d9b21 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -98,7 +98,7 @@ Changelog * fix: CI building (caching?) issue "corrupt ZIP file" * fix: update docker image build scripts and add ARM64/PyPy * fix: update XBR ABI files -* fix: use :func:`txaio.time_ns` and drop deprecated :func:`autobahn.util.time_ns` +* fix: use txaio.time_ns and drop deprecated autobahn.util.time_ns * fix: update project README and docs for supported python versions (#1296) * fix: WebSocket protocol instances now raise `autobahn.exception.Disconnected` when sending on a closed connection (#1002) * fix: version conflict in xbr downstream application dependency (crossbarfx) (#1295) @@ -120,7 +120,7 @@ Changelog * IMPORTANT: release v19.11.2 will be the last release supporting Python 2. We will support Python 3.5 and later beginning with Autobahn v20.1.1. * fix: add docs for parameters to component.py (#1276) * new: statistics tracking on WAMP serializers :class:`autobahn.wamp.serializer.Serializer` -* new: helper :func:`autobahn.util.time_ns` +* new: helper autobahn.util.time_ns 19.11.1 ------- diff --git a/docs/conf.py b/docs/conf.py index 0eec88dc2..c6548d1bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -307,8 +307,12 @@ def autodoc_skip_member(app, what, name, obj, skip, options): # http://sphinx-doc.org/ext/intersphinx.html intersphinx_mapping = { - 'py2': ('https://docs.python.org/2', None), 'py3': ('https://docs.python.org/3', None), + 'python': ('https://docs.python.org/3', None), + 'rtd': ('https://docs.readthedocs.io/en/latest/', None), + 'txaio': ('https://txaio.readthedocs.io/en/latest/', None), + 'autobahn': ('https://autobahn.readthedocs.io/en/latest/', None), + 'zlmdb': ('https://zlmdb.readthedocs.io/en/latest/', None), } rst_epilog = """ diff --git a/docs/reference/autobahn.wamp.component.rst b/docs/reference/autobahn.wamp.component.rst index 8e7b5da8d..4f857b7e0 100644 --- a/docs/reference/autobahn.wamp.component.rst +++ b/docs/reference/autobahn.wamp.component.rst @@ -4,7 +4,7 @@ Module ``autobahn.wamp.component`` Component --------- -This is common code for both Twisted and asyncio components; see either :class:`autobahn.twisted.component.Component` or :class:`autobahn.asyncio.component.Component` for the concrete implementations. +This is common code for both Twisted and asyncio components; see either ``autobahn.twisted.component.Component`` or ``autobahn.asyncio.component.Component`` for the concrete implementations. .. autoclass:: autobahn.wamp.component.Component :members: diff --git a/tox.ini b/tox.ini index ca88bb678..37153db33 100644 --- a/tox.ini +++ b/tox.ini @@ -168,13 +168,22 @@ deps = sphinx sphinx_rtd_theme sphinxcontrib.images + git+https://github.com/crossbario/txaio +extras = + twisted + encryption + serialization + scram + nvx + xbr commands = python -V sphinx-build --version + python -c "from autobahn import xbr; print('HAS_XBR={}'.format(xbr.HAS_XBR))" # first test with all warnings fatal find ./docs -name "*.rst" - sphinx-build -nWT -b dummy ./docs ./docs/_build + sphinx-build -WT -b dummy ./docs ./docs/_build # generate HTML output sphinx-build -b html ./docs ./docs/_build From 798a8be5e5295c048543c4798a88b5e4ee928bfb Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 02:31:33 +0100 Subject: [PATCH 07/20] sync --- .github/workflows/main.yml | 1 + tox.ini | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cabf5f83a..af2a6948f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,6 +101,7 @@ jobs: - name: Run unit tests (PyTest) run: | + find . \( -name "__pycache__" -type d \) -prune -exec rm -rf {} + tox -c tox.ini docs: diff --git a/tox.ini b/tox.ini index 37153db33..00d2d8949 100644 --- a/tox.ini +++ b/tox.ini @@ -66,10 +66,11 @@ commands = unzip /tmp/xbr-protocol-latest.zip -d ./autobahn/xbr/contracts # install package + pip install -U pip sh -c "which python && which pip && python -V" pip install --no-cache --ignore-installed --force-reinstall .[twisted,asyncio,compress,serialization,encryption,scram] - asyncio: py.test -v ./autobahn + asyncio: pytest -v ./autobahn tw189,tw1910: trial ./autobahn twtrunk: python -m twisted.trial ./autobahn @@ -149,7 +150,7 @@ commands = pip install .[all] # test autobahn on asyncio (run under coverage) - sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" py.test -v -/autobahn' + sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" pytest -v -/autobahn' # test autobahn on twisted (run under coverage) sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' From 91c58b8a5fa3ec2619935920212fe8c4ae8ef955 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 02:41:53 +0100 Subject: [PATCH 08/20] sync --- .github/workflows/main.yml | 1 + tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index af2a6948f..fb6c9ff5a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,6 +102,7 @@ jobs: - name: Run unit tests (PyTest) run: | find . \( -name "__pycache__" -type d \) -prune -exec rm -rf {} + + find . -name "*.pyc" -type f -exec rm -f {} \; tox -c tox.ini docs: diff --git a/tox.ini b/tox.ini index 00d2d8949..bd1ff9561 100644 --- a/tox.ini +++ b/tox.ini @@ -150,10 +150,10 @@ commands = pip install .[all] # test autobahn on asyncio (run under coverage) - sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" pytest -v -/autobahn' + USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn # test autobahn on twisted (run under coverage) - sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' + USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn coverage combine coverage report From 6a29538b20d794165c536c4cec96b058d618184e Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 02:52:16 +0100 Subject: [PATCH 09/20] sync --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb6c9ff5a..c48730cdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -97,6 +97,7 @@ jobs: - name: Install this package run: | + make abi_files pip install . - name: Run unit tests (PyTest) @@ -126,6 +127,11 @@ jobs: python -m pip install --upgrade pip pip install -r requirements-dev.txt + - name: Install this package + run: | + make abi_files + pip install . + - name: Run Sphinx run: tox -c tox.ini -e sphinx From c4d9c84f9846695b7ca4943f4bf5724734d78344 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 18:53:14 +0100 Subject: [PATCH 10/20] sync --- .github/workflows/main.yml | 14 +++++++------- pytest.ini | 9 +++++++++ tox.ini | 4 ++-- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 pytest.ini diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c48730cdb..e170f0ef7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ on: jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -58,8 +58,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] - # os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-20.04] + # os: [ubuntu-20.04, macos-latest, windows-latest] # https://github.com/actions/setup-python#specifying-a-pypy-version python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] @@ -98,7 +98,7 @@ jobs: - name: Install this package run: | make abi_files - pip install . + pip install .[all] - name: Run unit tests (PyTest) run: | @@ -107,7 +107,7 @@ jobs: tox -c tox.ini docs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -130,7 +130,7 @@ jobs: - name: Install this package run: | make abi_files - pip install . + pip install .[all] - name: Run Sphinx run: tox -c tox.ini -e sphinx @@ -149,7 +149,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} WAMP_PRIVATE_KEY: ${{ secrets.WAMP_PRIVATE_KEY }} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 000000000..09dc540b0 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,9 @@ +# https://docs.pytest.org/en/stable/reference.html#ini-options-ref + +[pytest] +minversion = 6.2 +addopts = -ra -q +testpaths = + test +python_files = + test_*.py diff --git a/tox.ini b/tox.ini index bd1ff9561..aaa0f7b32 100644 --- a/tox.ini +++ b/tox.ini @@ -150,10 +150,10 @@ commands = pip install .[all] # test autobahn on asyncio (run under coverage) - USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn + {asyncio}: sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn' # test autobahn on twisted (run under coverage) - USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn + {tw189,tw1910,twtrunk}: sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' coverage combine coverage report From 14221c87383c37025e9eab327e052a48f458bbef Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 20:38:32 +0100 Subject: [PATCH 11/20] another try .. --- .github/workflows/main.yml | 4 +- ...cio_rawsocket.py => test_aio_rawsocket.py} | 0 ...cio_websocket.py => test_aio_websocket.py} | 0 autobahn/rawsocket/test/__init__.py | 25 ------- autobahn/test/__init__.py | 67 ------------------- autobahn/twisted/test/__init__.py | 25 ------- ...unner.py => test_tx_application_runner.py} | 0 ...osereactor.py => test_tx_choosereactor.py} | 0 ...test_component.py => test_tx_component.py} | 0 ...plugins.py => test_tx_endpoint_plugins.py} | 0 .../{test_protocol.py => test_tx_protocol.py} | 0 ...test_rawsocket.py => test_tx_rawsocket.py} | 0 ...et_agent.py => test_tx_websocket_agent.py} | 0 autobahn/wamp/test/__init__.py | 25 ------- autobahn/websocket/test/__init__.py | 25 ------- autobahn/xbr/test/__init__.py | 0 tox.ini | 35 +++++----- 17 files changed, 21 insertions(+), 185 deletions(-) rename autobahn/asyncio/test/{test_asyncio_rawsocket.py => test_aio_rawsocket.py} (100%) rename autobahn/asyncio/test/{test_asyncio_websocket.py => test_aio_websocket.py} (100%) delete mode 100644 autobahn/rawsocket/test/__init__.py delete mode 100644 autobahn/test/__init__.py delete mode 100644 autobahn/twisted/test/__init__.py rename autobahn/twisted/test/{test_application_runner.py => test_tx_application_runner.py} (100%) rename autobahn/twisted/test/{test_choosereactor.py => test_tx_choosereactor.py} (100%) rename autobahn/twisted/test/{test_component.py => test_tx_component.py} (100%) rename autobahn/twisted/test/{test_endpoint_plugins.py => test_tx_endpoint_plugins.py} (100%) rename autobahn/twisted/test/{test_protocol.py => test_tx_protocol.py} (100%) rename autobahn/twisted/test/{test_rawsocket.py => test_tx_rawsocket.py} (100%) rename autobahn/twisted/test/{test_websocket_agent.py => test_tx_websocket_agent.py} (100%) delete mode 100644 autobahn/wamp/test/__init__.py delete mode 100644 autobahn/websocket/test/__init__.py delete mode 100644 autobahn/xbr/test/__init__.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e170f0ef7..c9a154e3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,6 +64,8 @@ jobs: # https://github.com/actions/setup-python#specifying-a-pypy-version python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] + framework: ['asyncio', 'tw189', 'tw1910', 'twtrunk'] + # https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/ # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error continue-on-error: false @@ -104,7 +106,7 @@ jobs: run: | find . \( -name "__pycache__" -type d \) -prune -exec rm -rf {} + find . -name "*.pyc" -type f -exec rm -f {} \; - tox -c tox.ini + tox -c tox.ini ${{ matrix.framework }} docs: runs-on: ubuntu-20.04 diff --git a/autobahn/asyncio/test/test_asyncio_rawsocket.py b/autobahn/asyncio/test/test_aio_rawsocket.py similarity index 100% rename from autobahn/asyncio/test/test_asyncio_rawsocket.py rename to autobahn/asyncio/test/test_aio_rawsocket.py diff --git a/autobahn/asyncio/test/test_asyncio_websocket.py b/autobahn/asyncio/test/test_aio_websocket.py similarity index 100% rename from autobahn/asyncio/test/test_asyncio_websocket.py rename to autobahn/asyncio/test/test_aio_websocket.py diff --git a/autobahn/rawsocket/test/__init__.py b/autobahn/rawsocket/test/__init__.py deleted file mode 100644 index 89caae255..000000000 --- a/autobahn/rawsocket/test/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################### -# -# The MIT License (MIT) -# -# Copyright (c) Crossbar.io Technologies GmbH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -############################################################################### diff --git a/autobahn/test/__init__.py b/autobahn/test/__init__.py deleted file mode 100644 index c7f657ba4..000000000 --- a/autobahn/test/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -############################################################################### -# -# The MIT License (MIT) -# -# Copyright (c) Crossbar.io Technologies GmbH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -############################################################################### - - -class FakeTransport(object): - _written = b"" - _open = True - - def __init__(self): - self._abort_calls = [] - - def abortConnection(self, *args, **kw): - self._abort_calls.append((args, kw)) - - def write(self, msg): - if not self._open: - raise Exception("Can't write to a closed connection") - self._written = self._written + msg - - def loseConnection(self): - self._open = False - - def registerProducer(self, producer, streaming): - # https://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IConsumer.html - raise NotImplementedError - - def unregisterProducer(self): - # do nothing is correct! until we fake implement registerProducer ..;) - pass - - def getPeer(self): - # for Twisted, this would be an IAddress - class _FakePeer(object): - pass - return _FakePeer() - - def getHost(self): - # for Twisted, this would be an IAddress - class _FakeHost(object): - pass - return _FakeHost() - - def abort_called(self): - return len(self._abort_calls) > 0 diff --git a/autobahn/twisted/test/__init__.py b/autobahn/twisted/test/__init__.py deleted file mode 100644 index 89caae255..000000000 --- a/autobahn/twisted/test/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################### -# -# The MIT License (MIT) -# -# Copyright (c) Crossbar.io Technologies GmbH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -############################################################################### diff --git a/autobahn/twisted/test/test_application_runner.py b/autobahn/twisted/test/test_tx_application_runner.py similarity index 100% rename from autobahn/twisted/test/test_application_runner.py rename to autobahn/twisted/test/test_tx_application_runner.py diff --git a/autobahn/twisted/test/test_choosereactor.py b/autobahn/twisted/test/test_tx_choosereactor.py similarity index 100% rename from autobahn/twisted/test/test_choosereactor.py rename to autobahn/twisted/test/test_tx_choosereactor.py diff --git a/autobahn/twisted/test/test_component.py b/autobahn/twisted/test/test_tx_component.py similarity index 100% rename from autobahn/twisted/test/test_component.py rename to autobahn/twisted/test/test_tx_component.py diff --git a/autobahn/twisted/test/test_endpoint_plugins.py b/autobahn/twisted/test/test_tx_endpoint_plugins.py similarity index 100% rename from autobahn/twisted/test/test_endpoint_plugins.py rename to autobahn/twisted/test/test_tx_endpoint_plugins.py diff --git a/autobahn/twisted/test/test_protocol.py b/autobahn/twisted/test/test_tx_protocol.py similarity index 100% rename from autobahn/twisted/test/test_protocol.py rename to autobahn/twisted/test/test_tx_protocol.py diff --git a/autobahn/twisted/test/test_rawsocket.py b/autobahn/twisted/test/test_tx_rawsocket.py similarity index 100% rename from autobahn/twisted/test/test_rawsocket.py rename to autobahn/twisted/test/test_tx_rawsocket.py diff --git a/autobahn/twisted/test/test_websocket_agent.py b/autobahn/twisted/test/test_tx_websocket_agent.py similarity index 100% rename from autobahn/twisted/test/test_websocket_agent.py rename to autobahn/twisted/test/test_tx_websocket_agent.py diff --git a/autobahn/wamp/test/__init__.py b/autobahn/wamp/test/__init__.py deleted file mode 100644 index 89caae255..000000000 --- a/autobahn/wamp/test/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################### -# -# The MIT License (MIT) -# -# Copyright (c) Crossbar.io Technologies GmbH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -############################################################################### diff --git a/autobahn/websocket/test/__init__.py b/autobahn/websocket/test/__init__.py deleted file mode 100644 index 89caae255..000000000 --- a/autobahn/websocket/test/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################### -# -# The MIT License (MIT) -# -# Copyright (c) Crossbar.io Technologies GmbH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -############################################################################### diff --git a/autobahn/xbr/test/__init__.py b/autobahn/xbr/test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tox.ini b/tox.ini index aaa0f7b32..9f73343a5 100644 --- a/tox.ini +++ b/tox.ini @@ -56,23 +56,7 @@ extras = serialization scram nvx - -commands = - # download and extract archive with XBR ABI files into package directory for bundling - rm -f /tmp/xbr-protocol-latest.zip - curl -s https://xbr.network/lib/abi/xbr-protocol-latest.zip -o /tmp/xbr-protocol-latest.zip - unzip -t /tmp/xbr-protocol-latest.zip - rm -rf ./autobahn/xbr/contracts - unzip /tmp/xbr-protocol-latest.zip -d ./autobahn/xbr/contracts - - # install package - pip install -U pip - sh -c "which python && which pip && python -V" - pip install --no-cache --ignore-installed --force-reinstall .[twisted,asyncio,compress,serialization,encryption,scram] - - asyncio: pytest -v ./autobahn - tw189,tw1910: trial ./autobahn - twtrunk: python -m twisted.trial ./autobahn + xbr whitelist_externals = sh @@ -103,6 +87,23 @@ setenv = # also: https://github.com/crossbario/autobahn-python/issues/1275 # AUTOBAHN_CI_ENABLE_RNG_DEPLETION_TESTS = 1 +commands = + # download and extract archive with XBR ABI files into package directory for bundling + rm -f /tmp/xbr-protocol-latest.zip + curl -s https://xbr.network/lib/abi/xbr-protocol-latest.zip -o /tmp/xbr-protocol-latest.zip + unzip -t /tmp/xbr-protocol-latest.zip + rm -rf ./autobahn/xbr/contracts + unzip /tmp/xbr-protocol-latest.zip -d ./autobahn/xbr/contracts + + # install package + pip install -U pip + sh -c "which python && which pip && python -V" + pip install --no-cache --ignore-installed --force-reinstall .[twisted,asyncio,compress,serialization,encryption,scram,xbr] + + asyncio: pytest -v --ignore=./autobahn/twisted ./autobahn + tw189,tw1910: trial ./autobahn + twtrunk: python -m twisted.trial ./autobahn + [testenv:flake8] skip_install = True From 90736e120c79819ac44bd3ba24a6509fec2d2515 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 20:58:53 +0100 Subject: [PATCH 12/20] another try 2 .. --- .github/workflows/main.yml | 9 +++++---- tox.ini | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9a154e3d..1c91077ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,9 +62,10 @@ jobs: # os: [ubuntu-20.04, macos-latest, windows-latest] # https://github.com/actions/setup-python#specifying-a-pypy-version - python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] - - framework: ['asyncio', 'tw189', 'tw1910', 'twtrunk'] + # python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] + # framework: ['asyncio', 'tw189', 'tw1910', 'tw203', 'twtrunk'] + python-version: ['3.6', '3.9', 'pypy-3.7'] + framework: ['asyncio', 'tw203', 'twtrunk'] # https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/ # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error @@ -106,7 +107,7 @@ jobs: run: | find . \( -name "__pycache__" -type d \) -prune -exec rm -rf {} + find . -name "*.pyc" -type f -exec rm -f {} \; - tox -c tox.ini ${{ matrix.framework }} + tox -c tox.ini -e ${{ matrix.framework }} docs: runs-on: ubuntu-20.04 diff --git a/tox.ini b/tox.ini index 9f73343a5..3f943cbf8 100644 --- a/tox.ini +++ b/tox.ini @@ -6,14 +6,14 @@ envlist = sphinx # CPython - py36-{tw189,tw1910,twtrunk,asyncio} - py37-{tw189,tw1910,twtrunk,asyncio} - py38-{tw189,tw1910,twtrunk,asyncio} - py39-{tw189,tw1910,twtrunk,asyncio} + py36-{tw189,tw1910,tw203,twtrunk,asyncio} + py37-{tw189,tw1910,tw203,twtrunk,asyncio} + py38-{tw189,tw1910,tw203,twtrunk,asyncio} + py39-{tw189,tw1910,tw203,twtrunk,asyncio} # PyPy - pypy36-{tw189,tw1910,twtrunk,asyncio} - pypy37-{tw189,tw1910,twtrunk,asyncio} + pypy36-{tw189,tw1910,tw203,twtrunk,asyncio} + pypy37-{tw189,tw1910,tw203,twtrunk,asyncio} # MAP: GitHub Actions Python Name => Tox Env Name (for Python) @@ -44,9 +44,10 @@ deps = ; twisted dependencies tw189: twisted==18.9.0 tw1910: twisted==19.10.0 + tw203: twisted==20.3.0 # twtrunk: https://github.com/twisted/twisted/archive/trunk.zip twtrunk: git+https://github.com/twisted/twisted - {tw189,tw1910,twtrunk}: pytest-twisted + {tw189,tw1910,tw203,twtrunk}: pytest-twisted ; asyncio dependencies asyncio: pytest_asyncio @@ -79,7 +80,7 @@ setenv = #AUTOBAHN_USE_UJSON = 1 #AUTOBAHN_USE_CBOR2 = 1 asyncio: USE_ASYNCIO = 1 - tw189,tw1910,twtrunk: USE_TWISTED = 1 + tw189,tw1910,tw203,twtrunk: USE_TWISTED = 1 # this enables "autobahn/test/test_rng.py" (on Linux), # which tests entropy depletion, and tests how to correctly @@ -101,7 +102,7 @@ commands = pip install --no-cache --ignore-installed --force-reinstall .[twisted,asyncio,compress,serialization,encryption,scram,xbr] asyncio: pytest -v --ignore=./autobahn/twisted ./autobahn - tw189,tw1910: trial ./autobahn + tw189,tw1910,tw203: trial ./autobahn twtrunk: python -m twisted.trial ./autobahn @@ -154,7 +155,7 @@ commands = {asyncio}: sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn' # test autobahn on twisted (run under coverage) - {tw189,tw1910,twtrunk}: sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' + {tw189,tw1910,tw203,twtrunk}: sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' coverage combine coverage report From e2190f780993d3c311e91e86438e27877bf847b6 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 21:11:51 +0100 Subject: [PATCH 13/20] renaming unit tests because of pytest --- .../nvx/test/{test_utf8validator.py => test_nvx_utf8validator.py} | 0 autobahn/wamp/test/{test_auth.py => test_wamp_auth.py} | 0 autobahn/wamp/test/{test_component.py => test_wamp_component.py} | 0 .../test/{test_component_aio.py => test_wamp_component_aio.py} | 0 autobahn/wamp/test/{test_cryptobox.py => test_wamp_cryptobox.py} | 0 .../wamp/test/{test_cryptosign.py => test_wamp_cryptosign.py} | 0 autobahn/wamp/test/{test_exception.py => test_wamp_exception.py} | 0 autobahn/wamp/test/{test_message.py => test_wamp_message.py} | 0 autobahn/wamp/test/{test_protocol.py => test_wamp_protocol.py} | 0 .../test/{test_protocol_peer.py => test_wamp_protocol_peer.py} | 0 autobahn/wamp/test/{test_runner.py => test_wamp_runner.py} | 0 .../wamp/test/{test_serializer.py => test_wamp_serializer.py} | 0 .../wamp/test/{test_uri_pattern.py => test_wamp_uri_pattern.py} | 0 ...st_user_handler_errors.py => test_wamp_user_handler_errors.py} | 0 autobahn/wamp/test/{test_websocket.py => test_wamp_websocket.py} | 0 .../websocket/test/{test_websocket.py => test_websocket_frame.py} | 0 .../test/{test_protocol.py => test_websocket_protocol.py} | 0 autobahn/xbr/test/{test_mnemonic.py => test_xbr_mnemonic.py} | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename autobahn/nvx/test/{test_utf8validator.py => test_nvx_utf8validator.py} (100%) rename autobahn/wamp/test/{test_auth.py => test_wamp_auth.py} (100%) rename autobahn/wamp/test/{test_component.py => test_wamp_component.py} (100%) rename autobahn/wamp/test/{test_component_aio.py => test_wamp_component_aio.py} (100%) rename autobahn/wamp/test/{test_cryptobox.py => test_wamp_cryptobox.py} (100%) rename autobahn/wamp/test/{test_cryptosign.py => test_wamp_cryptosign.py} (100%) rename autobahn/wamp/test/{test_exception.py => test_wamp_exception.py} (100%) rename autobahn/wamp/test/{test_message.py => test_wamp_message.py} (100%) rename autobahn/wamp/test/{test_protocol.py => test_wamp_protocol.py} (100%) rename autobahn/wamp/test/{test_protocol_peer.py => test_wamp_protocol_peer.py} (100%) rename autobahn/wamp/test/{test_runner.py => test_wamp_runner.py} (100%) rename autobahn/wamp/test/{test_serializer.py => test_wamp_serializer.py} (100%) rename autobahn/wamp/test/{test_uri_pattern.py => test_wamp_uri_pattern.py} (100%) rename autobahn/wamp/test/{test_user_handler_errors.py => test_wamp_user_handler_errors.py} (100%) rename autobahn/wamp/test/{test_websocket.py => test_wamp_websocket.py} (100%) rename autobahn/websocket/test/{test_websocket.py => test_websocket_frame.py} (100%) rename autobahn/websocket/test/{test_protocol.py => test_websocket_protocol.py} (100%) rename autobahn/xbr/test/{test_mnemonic.py => test_xbr_mnemonic.py} (100%) diff --git a/autobahn/nvx/test/test_utf8validator.py b/autobahn/nvx/test/test_nvx_utf8validator.py similarity index 100% rename from autobahn/nvx/test/test_utf8validator.py rename to autobahn/nvx/test/test_nvx_utf8validator.py diff --git a/autobahn/wamp/test/test_auth.py b/autobahn/wamp/test/test_wamp_auth.py similarity index 100% rename from autobahn/wamp/test/test_auth.py rename to autobahn/wamp/test/test_wamp_auth.py diff --git a/autobahn/wamp/test/test_component.py b/autobahn/wamp/test/test_wamp_component.py similarity index 100% rename from autobahn/wamp/test/test_component.py rename to autobahn/wamp/test/test_wamp_component.py diff --git a/autobahn/wamp/test/test_component_aio.py b/autobahn/wamp/test/test_wamp_component_aio.py similarity index 100% rename from autobahn/wamp/test/test_component_aio.py rename to autobahn/wamp/test/test_wamp_component_aio.py diff --git a/autobahn/wamp/test/test_cryptobox.py b/autobahn/wamp/test/test_wamp_cryptobox.py similarity index 100% rename from autobahn/wamp/test/test_cryptobox.py rename to autobahn/wamp/test/test_wamp_cryptobox.py diff --git a/autobahn/wamp/test/test_cryptosign.py b/autobahn/wamp/test/test_wamp_cryptosign.py similarity index 100% rename from autobahn/wamp/test/test_cryptosign.py rename to autobahn/wamp/test/test_wamp_cryptosign.py diff --git a/autobahn/wamp/test/test_exception.py b/autobahn/wamp/test/test_wamp_exception.py similarity index 100% rename from autobahn/wamp/test/test_exception.py rename to autobahn/wamp/test/test_wamp_exception.py diff --git a/autobahn/wamp/test/test_message.py b/autobahn/wamp/test/test_wamp_message.py similarity index 100% rename from autobahn/wamp/test/test_message.py rename to autobahn/wamp/test/test_wamp_message.py diff --git a/autobahn/wamp/test/test_protocol.py b/autobahn/wamp/test/test_wamp_protocol.py similarity index 100% rename from autobahn/wamp/test/test_protocol.py rename to autobahn/wamp/test/test_wamp_protocol.py diff --git a/autobahn/wamp/test/test_protocol_peer.py b/autobahn/wamp/test/test_wamp_protocol_peer.py similarity index 100% rename from autobahn/wamp/test/test_protocol_peer.py rename to autobahn/wamp/test/test_wamp_protocol_peer.py diff --git a/autobahn/wamp/test/test_runner.py b/autobahn/wamp/test/test_wamp_runner.py similarity index 100% rename from autobahn/wamp/test/test_runner.py rename to autobahn/wamp/test/test_wamp_runner.py diff --git a/autobahn/wamp/test/test_serializer.py b/autobahn/wamp/test/test_wamp_serializer.py similarity index 100% rename from autobahn/wamp/test/test_serializer.py rename to autobahn/wamp/test/test_wamp_serializer.py diff --git a/autobahn/wamp/test/test_uri_pattern.py b/autobahn/wamp/test/test_wamp_uri_pattern.py similarity index 100% rename from autobahn/wamp/test/test_uri_pattern.py rename to autobahn/wamp/test/test_wamp_uri_pattern.py diff --git a/autobahn/wamp/test/test_user_handler_errors.py b/autobahn/wamp/test/test_wamp_user_handler_errors.py similarity index 100% rename from autobahn/wamp/test/test_user_handler_errors.py rename to autobahn/wamp/test/test_wamp_user_handler_errors.py diff --git a/autobahn/wamp/test/test_websocket.py b/autobahn/wamp/test/test_wamp_websocket.py similarity index 100% rename from autobahn/wamp/test/test_websocket.py rename to autobahn/wamp/test/test_wamp_websocket.py diff --git a/autobahn/websocket/test/test_websocket.py b/autobahn/websocket/test/test_websocket_frame.py similarity index 100% rename from autobahn/websocket/test/test_websocket.py rename to autobahn/websocket/test/test_websocket_frame.py diff --git a/autobahn/websocket/test/test_protocol.py b/autobahn/websocket/test/test_websocket_protocol.py similarity index 100% rename from autobahn/websocket/test/test_protocol.py rename to autobahn/websocket/test/test_websocket_protocol.py diff --git a/autobahn/xbr/test/test_mnemonic.py b/autobahn/xbr/test/test_xbr_mnemonic.py similarity index 100% rename from autobahn/xbr/test/test_mnemonic.py rename to autobahn/xbr/test/test_xbr_mnemonic.py From f37d1bfdcb810c56b92928e568d6ee95bb6e7da3 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 21:30:39 +0100 Subject: [PATCH 14/20] one more try --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 3f943cbf8..59cca5cb2 100644 --- a/tox.ini +++ b/tox.ini @@ -152,10 +152,10 @@ commands = pip install .[all] # test autobahn on asyncio (run under coverage) - {asyncio}: sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn' + sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn' # test autobahn on twisted (run under coverage) - {tw189,tw1910,tw203,twtrunk}: sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' + sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' coverage combine coverage report From cc5b54fc81434e797c6da8587e265c3aa2e0f2ce Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 21:38:08 +0100 Subject: [PATCH 15/20] one more try --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 59cca5cb2..9dcb32127 100644 --- a/tox.ini +++ b/tox.ini @@ -152,7 +152,7 @@ commands = pip install .[all] # test autobahn on asyncio (run under coverage) - sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v ./autobahn' + sh -c 'USE_ASYNCIO=1 coverage run --parallel-mode --include "*/autobahn/asyncio/*" --omit "*/twisted/*" --omit "*/test/*.py" -m pytest -v --ignore=./autobahn/twisted ./autobahn' # test autobahn on twisted (run under coverage) sh -c 'USE_TWISTED=1 coverage run --parallel-mode --include "*/autobahn/*" --omit "*/asyncio/*" --omit "*/test/*.py" -m twisted.trial ./autobahn' From ebf2342a002e46f9591476d978f7a0cc17f8259e Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 22:07:15 +0100 Subject: [PATCH 16/20] one more .. --- .github/workflows/main.yml | 2 - autobahn/testutil.py | 67 +++++++++++++++++++ autobahn/twisted/test/test_tx_component.py | 2 +- autobahn/twisted/test/test_tx_protocol.py | 4 +- autobahn/twisted/test/test_tx_rawsocket.py | 2 +- .../websocket/test/test_websocket_frame.py | 2 +- .../websocket/test/test_websocket_protocol.py | 2 +- 7 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 autobahn/testutil.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c91077ec..410e9ea3c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,8 +105,6 @@ jobs: - name: Run unit tests (PyTest) run: | - find . \( -name "__pycache__" -type d \) -prune -exec rm -rf {} + - find . -name "*.pyc" -type f -exec rm -f {} \; tox -c tox.ini -e ${{ matrix.framework }} docs: diff --git a/autobahn/testutil.py b/autobahn/testutil.py new file mode 100644 index 000000000..c7f657ba4 --- /dev/null +++ b/autobahn/testutil.py @@ -0,0 +1,67 @@ +############################################################################### +# +# The MIT License (MIT) +# +# Copyright (c) Crossbar.io Technologies GmbH +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +############################################################################### + + +class FakeTransport(object): + _written = b"" + _open = True + + def __init__(self): + self._abort_calls = [] + + def abortConnection(self, *args, **kw): + self._abort_calls.append((args, kw)) + + def write(self, msg): + if not self._open: + raise Exception("Can't write to a closed connection") + self._written = self._written + msg + + def loseConnection(self): + self._open = False + + def registerProducer(self, producer, streaming): + # https://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IConsumer.html + raise NotImplementedError + + def unregisterProducer(self): + # do nothing is correct! until we fake implement registerProducer ..;) + pass + + def getPeer(self): + # for Twisted, this would be an IAddress + class _FakePeer(object): + pass + return _FakePeer() + + def getHost(self): + # for Twisted, this would be an IAddress + class _FakeHost(object): + pass + return _FakeHost() + + def abort_called(self): + return len(self._abort_calls) > 0 diff --git a/autobahn/twisted/test/test_tx_component.py b/autobahn/twisted/test/test_tx_component.py index a539ce006..2f1afede2 100644 --- a/autobahn/twisted/test/test_tx_component.py +++ b/autobahn/twisted/test/test_tx_component.py @@ -32,7 +32,7 @@ from zope.interface import directlyProvides from autobahn.wamp.message import Welcome, Goodbye, Hello, Abort from autobahn.wamp.serializer import JsonSerializer - from autobahn.test import FakeTransport + from autobahn.testutil import FakeTransport from twisted.internet.interfaces import IStreamClientEndpoint from twisted.internet.defer import inlineCallbacks, succeed, Deferred from twisted.internet.task import Clock diff --git a/autobahn/twisted/test/test_tx_protocol.py b/autobahn/twisted/test/test_tx_protocol.py index 2326c2271..0c24d1824 100644 --- a/autobahn/twisted/test/test_tx_protocol.py +++ b/autobahn/twisted/test/test_tx_protocol.py @@ -40,7 +40,7 @@ from twisted.internet.testing import StringTransport except ImportError: from twisted.test.proto_helpers import StringTransport -from autobahn.test import FakeTransport +from autobahn.testutil import FakeTransport class ExceptionHandlingTests(unittest.TestCase): @@ -386,7 +386,7 @@ class TestProto(WebSocketClientProtocol): def onConnecting(self, transport_details): raise RuntimeError("bad stuff") - from autobahn.test import FakeTransport + from autobahn.testutil import FakeTransport proto = TestProto() proto.transport = FakeTransport() d = proto.startHandshake() diff --git a/autobahn/twisted/test/test_tx_rawsocket.py b/autobahn/twisted/test/test_tx_rawsocket.py index 7438fe68c..d841d6a19 100644 --- a/autobahn/twisted/test/test_tx_rawsocket.py +++ b/autobahn/twisted/test/test_tx_rawsocket.py @@ -31,7 +31,7 @@ WampRawSocketServerProtocol, WampRawSocketClientFactory, WampRawSocketClientProtocol) -from autobahn.test import FakeTransport +from autobahn.testutil import FakeTransport class RawSocketHandshakeTests(unittest.TestCase): diff --git a/autobahn/websocket/test/test_websocket_frame.py b/autobahn/websocket/test/test_websocket_frame.py index ee5d23981..222d972a9 100644 --- a/autobahn/websocket/test/test_websocket_frame.py +++ b/autobahn/websocket/test/test_websocket_frame.py @@ -37,7 +37,7 @@ from autobahn.twisted.websocket import WebSocketClientProtocol from autobahn.twisted.websocket import WebSocketClientFactory from autobahn.websocket.compress_deflate import PerMessageDeflate - from autobahn.test import FakeTransport + from autobahn.testutil import FakeTransport from unittest.mock import MagicMock, patch from txaio.testutil import replace_loop diff --git a/autobahn/websocket/test/test_websocket_protocol.py b/autobahn/websocket/test/test_websocket_protocol.py index 48ba09a19..9ce7ed7ac 100644 --- a/autobahn/websocket/test/test_websocket_protocol.py +++ b/autobahn/websocket/test/test_websocket_protocol.py @@ -36,7 +36,7 @@ from autobahn.websocket.protocol import WebSocketClientFactory from autobahn.websocket.protocol import WebSocketProtocol from autobahn.websocket.types import ConnectingRequest -from autobahn.test import FakeTransport +from autobahn.testutil import FakeTransport import txaio From 709d0ff85c4b2a6443ccbd3eeb385b8d483e2d2e Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 22:17:21 +0100 Subject: [PATCH 17/20] sync --- .github/workflows/main.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 410e9ea3c..7bb63f51a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,6 @@ jobs: test: env: CB_FULLTESTS: 1 - PYTHONDONTWRITEBYTECODE: 1 # Test on Ubuntu, MacOS, Windows using CPython 3.6-3.9, PyPy 3.6-3.7 runs-on: ${{ matrix.os }} @@ -76,9 +75,11 @@ jobs: - uses: actions/checkout@v2 # Install OS packages, as we install Python packages from source: - # libenchant-dev: needed for pyenchant, needed for sphinx-spellcheck - # libbz2-dev, libsnappy-dev: needed for compression - # libunwind-dev: needed for vmprof + # + # libenchant-dev needed for pyenchant, needed for sphinx-spellcheck + # libbz2-dev, libsnappy-dev needed for compression + # libunwind-dev needed for vmprof + # - name: Install OS package dependencies run: | sudo apt update @@ -105,6 +106,8 @@ jobs: - name: Run unit tests (PyTest) run: | + python -c "import autobahn; print(autobahn.__version__); print(autobahn.xbr.HAS_XBR)" + python -c "from autobahn.testutil import FakeTransport; print(FakeTransport)" tox -c tox.ini -e ${{ matrix.framework }} docs: From eebc93b00a3cb18bb370171cfc623251f877f198 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 22:29:11 +0100 Subject: [PATCH 18/20] bump version --- .github/workflows/main.yml | 3 ++- autobahn/_version.py | 2 +- docs/changelog.rst | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bb63f51a..d8c35c996 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -106,7 +106,8 @@ jobs: - name: Run unit tests (PyTest) run: | - python -c "import autobahn; print(autobahn.__version__); print(autobahn.xbr.HAS_XBR)" + python -c "import autobahn; print(autobahn.__version__)" + python -c "from autobahn import xbr; print(xbr.HAS_XBR)" python -c "from autobahn.testutil import FakeTransport; print(FakeTransport)" tox -c tox.ini -e ${{ matrix.framework }} diff --git a/autobahn/_version.py b/autobahn/_version.py index df0380770..ab035c853 100644 --- a/autobahn/_version.py +++ b/autobahn/_version.py @@ -24,4 +24,4 @@ # ############################################################################### -__version__ = '20.12.2' +__version__ = '20.12.3' diff --git a/docs/changelog.rst b/docs/changelog.rst index d603d9b21..675511076 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,13 @@ Changelog ========= +20.12.3 +------- + +* fix: URL must be re-encoded when doing redirect (#1439) +* fix: update and migrate CI/CD pipeline to GitHub Actions +* new: minimum supported Python (language) version is now 3.6 (on CPython and PyPy) + 20.12.2 ------- From 885a04d119a831ed7a51a8885cc03a37acb39d73 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 23:08:56 +0100 Subject: [PATCH 19/20] sync --- tox.ini | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 9dcb32127..8bfc41cf4 100644 --- a/tox.ini +++ b/tox.ini @@ -73,14 +73,19 @@ whitelist_externals = find setenv = - SODIUM_INSTALL = bundled - # env var for serializers - PYUBJSON_NO_EXTENSION = 1 - #AUTOBAHN_USE_NVX = 1 - #AUTOBAHN_USE_UJSON = 1 - #AUTOBAHN_USE_CBOR2 = 1 - asyncio: USE_ASYNCIO = 1 - tw189,tw1910,tw203,twtrunk: USE_TWISTED = 1 + # NaCl/Sodium: use and build bundled sources (don't use any system library) + SODIUM_INSTALL=bundled + + # controls build of WAMP serializers: + PYUBJSON_NO_EXTENSION=1 + # AUTOBAHN_USE_NVX=1 + # AUTOBAHN_USE_UJSON=1 + # AUTOBAHN_USE_CBOR2=1 + + # controls test setup according to networking framework + asyncio: USE_ASYNCIO=1 + asyncio: PYTHONPATH={toxinidir} + tw189,tw1910,tw203,twtrunk: USE_TWISTED=1 # this enables "autobahn/test/test_rng.py" (on Linux), # which tests entropy depletion, and tests how to correctly From 7c1c9de107f9c7a504894e404274c5dea6320d04 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 19 Dec 2020 23:35:14 +0100 Subject: [PATCH 20/20] update readme --- README.rst | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index 8d944e6a4..6faad8527 100644 --- a/README.rst +++ b/README.rst @@ -8,25 +8,25 @@ WebSocket & WAMP for Python on Twisted and asyncio. -------------- | **Quick Links**: `Source Code `__ - `Documentation `__ - `WebSocket Examples `__ - `WAMP Examples `__ -| **Community**: `Mailing list `__ - `StackOverflow `__ - `Twitter `__ - `IRC #autobahn/chat.freenode.net `__ -| **Companion Projects**: `Autobahn|JS `__ - `Autobahn|Cpp `__ - `Autobahn|Testsuite `__ - `Crossbar.io `__ - `WAMP `__ +| **Community**: `Forum `__ - `StackOverflow `__ - `Twitter `__ - `IRC #autobahn/chat.freenode.net `__ +| **Companion Projects**: `Autobahn|JS `__ - `Autobahn|Cpp `__ - `Autobahn|Testsuite `__ - `Crossbar.io `__ - `WAMP `__ Introduction ------------ -**Autobahn\|Python** is a subproject of `Autobahn `__ and provides open-source +**Autobahn\|Python** is a subproject of `Autobahn `__ and provides open-source implementations of -- `The WebSocket Protocol `__ -- `The Web Application Messaging Protocol (WAMP) `__ +- `The WebSocket Protocol `__ +- `The Web Application Messaging Protocol (WAMP) `__ -for Python 3.6+ and running on `Twisted `__ and `asyncio `__. +for Python 3.6+ and running on `Twisted `__ and `asyncio `__. You can use **Autobahn\|Python** to create clients and servers in Python speaking just plain WebSocket or WAMP. -**WebSocket** allows `bidirectional real-time messaging on the Web `__ and beyond, while `WAMP `__ adds real-time application communication on top of WebSocket. +**WebSocket** allows `bidirectional real-time messaging on the Web `__ and beyond, while `WAMP `__ adds real-time application communication on top of WebSocket. -**WAMP** provides asynchronous **Remote Procedure Calls** and **Publish & Subscribe** for applications in *one* protocol running over `WebSocket `__. WAMP is a *routed* protocol, so you need a **WAMP Router** to connect your **Autobahn\|Python** based clients. We provide `Crossbar.io `__, but there are `other options `__ as well. +**WAMP** provides asynchronous **Remote Procedure Calls** and **Publish & Subscribe** for applications in *one* protocol running over `WebSocket `__. WAMP is a *routed* protocol, so you need a **WAMP Router** to connect your **Autobahn\|Python** based clients. We provide `Crossbar.io `__, but there are `other options `__ as well. .. note:: @@ -35,14 +35,14 @@ You can use **Autobahn\|Python** to create clients and servers in Python speakin Features -------- -- framework for `WebSocket `__ and `WAMP `__ clients and servers -- runs on `CPython `__, `PyPy `__ and `Jython `__ -- runs under `Twisted `__ and `asyncio `__ - implements WebSocket - `RFC6455 `__ and Draft Hybi-10+ -- implements `WebSocket compression `__ -- implements `WAMP `__, the Web Application Messaging Protocol +- framework for `WebSocket `__ and `WAMP `__ clients and servers +- runs on `CPython `__ and `PyPy ` +- runs under `Twisted `__ and `asyncio `__ - implements WebSocket + `RFC6455 `__ and Draft Hybi-10+ +- implements `WebSocket compression `__ +- implements `WAMP `__, the Web Application Messaging Protocol - high-performance, fully asynchronous implementation -- best-in-class standards conformance (100% strict passes with `Autobahn Testsuite `__: `Client `__ `Server `__) +- best-in-class standards conformance (100% strict passes with `Autobahn Testsuite `__: `Client `__ `Server `__) - message-, frame- and streaming-APIs for WebSocket - supports TLS (secure WebSocket) and proxies - Open-source (`MIT license `__) @@ -268,8 +268,9 @@ implementation, set the environment variable: .. |Master Branch| image:: https://img.shields.io/badge/branch-master-orange.svg :target: https://travis-ci.com/crossbario/autobahn-python.svg?branch=master -.. |Build Status| image:: https://travis-ci.com/crossbario/autobahn-python.svg?branch=master - :target: https://travis-ci.com/crossbario/autobahn-python +.. |Build Status| image:: https://github.com/crossbario/autobahn-python/workflows/main/badge.svg + :target: https://github.com/crossbario/autobahn-python/actions?query=workflow%3Amain + :alt: Build Status .. |Coverage| image:: https://img.shields.io/codecov/c/github/crossbario/autobahn-python/master.svg :target: https://codecov.io/github/crossbario/autobahn-python