Synapse 1.33.0 (2021-05-05) =========================== Features -------- - Build Debian packages for Ubuntu 21.04 (Hirsute Hippo). ([\#9909](https://github.com/matrix-org/synapse/issues/9909)) Synapse 1.33.0rc2 (2021-04-29) ============================== Bugfixes -------- - Fix tight loop when handling presence replication when using workers. Introduced in v1.33.0rc1. ([\#9900](https://github.com/matrix-org/synapse/issues/9900)) Synapse 1.33.0rc1 (2021-04-28) ============================== Features -------- - Update experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083): restricting room access via group membership. ([\#9800](https://github.com/matrix-org/synapse/issues/9800), [\#9814](https://github.com/matrix-org/synapse/issues/9814)) - Add experimental support for handling presence on a worker. ([\#9819](https://github.com/matrix-org/synapse/issues/9819), [\#9820](https://github.com/matrix-org/synapse/issues/9820), [\#9828](https://github.com/matrix-org/synapse/issues/9828), [\#9850](https://github.com/matrix-org/synapse/issues/9850)) - Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. ([\#9832](https://github.com/matrix-org/synapse/issues/9832)) Bugfixes -------- - Fixes the OIDC SSO flow when using a `public_baseurl` value including a non-root URL path. ([\#9726](https://github.com/matrix-org/synapse/issues/9726)) - Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. ([\#9788](https://github.com/matrix-org/synapse/issues/9788)) - Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. ([\#9802](https://github.com/matrix-org/synapse/issues/9802)) - Limit the size of HTTP responses read over federation. ([\#9833](https://github.com/matrix-org/synapse/issues/9833)) - Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. ([\#9867](https://github.com/matrix-org/synapse/issues/9867)) - Fix a long-standing bug where errors from federation did not propagate to the client. ([\#9868](https://github.com/matrix-org/synapse/issues/9868)) Improved Documentation ---------------------- - Add a note to the docker docs mentioning that we mirror upstream's supported Docker platforms. ([\#9801](https://github.com/matrix-org/synapse/issues/9801)) Internal Changes ---------------- - Add a dockerfile for running Synapse in worker-mode under Complement. ([\#9162](https://github.com/matrix-org/synapse/issues/9162)) - Apply `pyupgrade` across the codebase. ([\#9786](https://github.com/matrix-org/synapse/issues/9786)) - Move some replication processing out of `generic_worker`. ([\#9796](https://github.com/matrix-org/synapse/issues/9796)) - Replace `HomeServer.get_config()` with inline references. ([\#9815](https://github.com/matrix-org/synapse/issues/9815)) - Rename some handlers and config modules to not duplicate the top-level module. ([\#9816](https://github.com/matrix-org/synapse/issues/9816)) - Fix a long-standing bug which caused `max_upload_size` to not be correctly enforced. ([\#9817](https://github.com/matrix-org/synapse/issues/9817)) - Reduce CPU usage of the user directory by reusing existing calculated room membership. ([\#9821](https://github.com/matrix-org/synapse/issues/9821)) - Small speed up for joining large remote rooms. ([\#9825](https://github.com/matrix-org/synapse/issues/9825)) - Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9838](https://github.com/matrix-org/synapse/issues/9838)) - Only store the raw data in the in-memory caches, rather than objects that include references to e.g. the data stores. ([\#9845](https://github.com/matrix-org/synapse/issues/9845)) - Limit length of accepted email addresses. ([\#9855](https://github.com/matrix-org/synapse/issues/9855)) - Remove redundant `synapse.types.Collection` type definition. ([\#9856](https://github.com/matrix-org/synapse/issues/9856)) - Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts. ([\#9858](https://github.com/matrix-org/synapse/issues/9858)) - Disable invite rate-limiting by default when running the unit tests. ([\#9871](https://github.com/matrix-org/synapse/issues/9871)) - Pass a reactor into `SynapseSite` to make testing easier. ([\#9874](https://github.com/matrix-org/synapse/issues/9874)) - Make `DomainSpecificString` an `attrs` class. ([\#9875](https://github.com/matrix-org/synapse/issues/9875)) - Add type hints to `synapse.api.auth` and `synapse.api.auth_blocking` modules. ([\#9876](https://github.com/matrix-org/synapse/issues/9876)) - Remove redundant `_PushHTTPChannel` test class. ([\#9878](https://github.com/matrix-org/synapse/issues/9878)) - Remove backwards-compatibility code for Python versions < 3.6. ([\#9879](https://github.com/matrix-org/synapse/issues/9879)) - Small performance improvement around handling new local presence updates. ([\#9887](https://github.com/matrix-org/synapse/issues/9887))
195 lines
5.5 KiB
INI
195 lines
5.5 KiB
INI
[tox]
|
|
envlist = packaging, py36, py37, py38, py39, check_codestyle, check_isort
|
|
|
|
# we require tox>=2.3.2 for the fix to https://github.com/tox-dev/tox/issues/208
|
|
minversion = 2.3.2
|
|
|
|
[base]
|
|
deps =
|
|
python-subunit
|
|
junitxml
|
|
coverage
|
|
|
|
# this is pinned since it's a bit of an obscure package.
|
|
coverage-enable-subprocess==1.0
|
|
|
|
# cyptography 2.2 requires setuptools >= 18.5
|
|
#
|
|
# older versions of virtualenv (?) give us a virtualenv with the same
|
|
# version of setuptools as is installed on the system python (and tox runs
|
|
# virtualenv under python3, so we get the version of setuptools that is
|
|
# installed on that).
|
|
#
|
|
# anyway, make sure that we have a recent enough setuptools.
|
|
setuptools>=18.5
|
|
|
|
# we also need a semi-recent version of pip, because old ones fail to
|
|
# install the "enum34" dependency of cryptography.
|
|
pip>=10
|
|
|
|
# directories/files we run the linters on.
|
|
# if you update this list, make sure to do the same in scripts-dev/lint.sh
|
|
lint_targets =
|
|
setup.py
|
|
synapse
|
|
tests
|
|
scripts
|
|
scripts-dev
|
|
stubs
|
|
contrib
|
|
synctl
|
|
synmark
|
|
.buildkite
|
|
docker
|
|
|
|
# default settings for all tox environments
|
|
[testenv]
|
|
deps =
|
|
{[base]deps}
|
|
extras =
|
|
# install the optional dependendencies for tox environments without
|
|
# '-noextras' in their name
|
|
# (this requires tox 3)
|
|
!noextras: all
|
|
test
|
|
|
|
setenv =
|
|
# use a postgres db for tox environments with "-postgres" in the name
|
|
# (see https://tox.readthedocs.io/en/3.20.1/config.html#factors-and-factor-conditional-settings)
|
|
postgres: SYNAPSE_POSTGRES = 1
|
|
|
|
# this is used by .coveragerc to refer to the top of our tree.
|
|
TOP={toxinidir}
|
|
|
|
passenv = *
|
|
|
|
commands =
|
|
# the "env" invocation enables coverage checking for sub-processes. This is
|
|
# particularly important when running trial with `-j`, since that will make
|
|
# it run tests in a subprocess, whose coverage would otherwise not be
|
|
# tracked. (It also makes an explicit `coverage run` command redundant.)
|
|
#
|
|
# (See https://coverage.readthedocs.io/en/coverage-5.3/subprocess.html.
|
|
# Note that the `coverage.process_startup()` call is done by
|
|
# `coverage-enable-subprocess`.)
|
|
#
|
|
# we use "env" rather than putting a value in `setenv` so that it is not
|
|
# inherited by other tox environments.
|
|
#
|
|
/usr/bin/env COVERAGE_PROCESS_START={toxinidir}/.coveragerc "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
|
|
|
|
# As of twisted 16.4, trial tries to import the tests as a package (previously
|
|
# it loaded the files explicitly), which means they need to be on the
|
|
# pythonpath. Our sdist doesn't include the 'tests' package, so normally it
|
|
# doesn't work within the tox virtualenv.
|
|
#
|
|
# As a workaround, we tell tox to do install with 'pip -e', which just
|
|
# creates a symlink to the project directory instead of unpacking the sdist.
|
|
#
|
|
# (An alternative to this would be to set PYTHONPATH to include the project
|
|
# directory. Note two problems with this:
|
|
#
|
|
# - if you set it via `setenv`, then it is also set during the 'install'
|
|
# phase, which inhibits unpacking the sdist, so the virtualenv isn't
|
|
# useful for anything else without setting PYTHONPATH similarly.
|
|
#
|
|
# - `synapse` is also loaded from PYTHONPATH so even if you only set
|
|
# PYTHONPATH for the test phase, we're still running the tests against
|
|
# the working copy rather than the contents of the sdist. So frankly
|
|
# you might as well use -e in the first place.
|
|
#
|
|
# )
|
|
usedevelop=true
|
|
|
|
# A test suite for the oldest supported versions of Python libraries, to catch
|
|
# any uses of APIs not available in them.
|
|
[testenv:py3-old]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps =
|
|
# Old automat version for Twisted
|
|
Automat == 0.3.0
|
|
lxml
|
|
{[base]deps}
|
|
|
|
commands =
|
|
# Make all greater-thans equals so we test the oldest version of our direct
|
|
# dependencies, but make the pyopenssl 17.0, which can work against an
|
|
# OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis).
|
|
/bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "/psycopg2/d" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs -d"\n" pip install'
|
|
|
|
# Install Synapse itself. This won't update any libraries.
|
|
pip install -e ".[test]"
|
|
|
|
{[testenv]commands}
|
|
|
|
[testenv:benchmark]
|
|
deps =
|
|
{[base]deps}
|
|
pyperf
|
|
setenv =
|
|
SYNAPSE_POSTGRES = 1
|
|
commands =
|
|
python -m synmark {posargs:}
|
|
|
|
[testenv:packaging]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps =
|
|
check-manifest
|
|
commands =
|
|
check-manifest
|
|
|
|
[testenv:check_codestyle]
|
|
extras = lint
|
|
commands =
|
|
python -m black --check --diff {[base]lint_targets}
|
|
flake8 {[base]lint_targets} {env:PEP8SUFFIX:}
|
|
{toxinidir}/scripts-dev/config-lint.sh
|
|
|
|
[testenv:check_isort]
|
|
extras = lint
|
|
commands = isort -c --df --sp setup.cfg {[base]lint_targets}
|
|
|
|
[testenv:check-newsfragment]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps = towncrier>=18.6.0rc1
|
|
commands =
|
|
python -m towncrier.check --compare-with=origin/dinsic
|
|
|
|
[testenv:check-sampleconfig]
|
|
commands = {toxinidir}/scripts-dev/generate_sample_config --check
|
|
|
|
[testenv:combine]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps =
|
|
coverage
|
|
pip>=10
|
|
commands=
|
|
coverage combine
|
|
coverage report
|
|
|
|
[testenv:cov-erase]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps =
|
|
coverage
|
|
commands=
|
|
coverage erase
|
|
|
|
[testenv:cov-html]
|
|
skip_install = true
|
|
usedevelop = false
|
|
deps =
|
|
coverage
|
|
commands=
|
|
coverage html
|
|
|
|
[testenv:mypy]
|
|
deps =
|
|
{[base]deps}
|
|
extras = all,mypy
|
|
commands = mypy
|