2018-06-25 16:42:27 +03:00
|
|
|
[tool.towncrier]
|
|
|
|
package = "synapse"
|
2018-07-19 14:25:47 +03:00
|
|
|
filename = "CHANGES.md"
|
2018-06-25 16:42:27 +03:00
|
|
|
directory = "changelog.d"
|
2023-11-20 22:18:58 +03:00
|
|
|
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
|
2018-07-19 14:25:47 +03:00
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "feature"
|
|
|
|
name = "Features"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "bugfix"
|
|
|
|
name = "Bugfixes"
|
|
|
|
showcontent = true
|
|
|
|
|
2019-07-12 19:27:07 +03:00
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "docker"
|
|
|
|
name = "Updates to the Docker image"
|
|
|
|
showcontent = true
|
|
|
|
|
2018-07-19 14:25:47 +03:00
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "doc"
|
|
|
|
name = "Improved Documentation"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "removal"
|
|
|
|
name = "Deprecations and Removals"
|
|
|
|
showcontent = true
|
|
|
|
|
|
|
|
[[tool.towncrier.type]]
|
|
|
|
directory = "misc"
|
|
|
|
name = "Internal Changes"
|
|
|
|
showcontent = true
|
2019-06-20 12:32:02 +03:00
|
|
|
|
|
|
|
[tool.black]
|
2023-08-29 15:34:53 +03:00
|
|
|
target-version = ['py38', 'py39', 'py310', 'py311']
|
2022-04-08 16:36:09 +03:00
|
|
|
# black ignores everything in .gitignore by default, see
|
|
|
|
# https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
|
|
|
|
# Use `extend-exclude` if you want to exclude something in addition to this.
|
2022-02-22 14:30:19 +03:00
|
|
|
|
2022-12-21 21:05:21 +03:00
|
|
|
[tool.ruff]
|
|
|
|
line-length = 88
|
|
|
|
|
2024-07-05 15:35:57 +03:00
|
|
|
[tool.ruff.lint]
|
2023-09-08 18:24:36 +03:00
|
|
|
# See https://beta.ruff.rs/docs/rules/#error-e
|
2022-12-21 21:05:21 +03:00
|
|
|
# for error codes. The ones we ignore are:
|
|
|
|
# E501: Line too long (black enforces this for us)
|
2023-09-08 18:24:36 +03:00
|
|
|
# E731: do not assign a lambda expression, use a def
|
2022-12-21 21:05:21 +03:00
|
|
|
#
|
|
|
|
# flake8-bugbear compatible checks. Its error codes are described at
|
2023-09-08 18:24:36 +03:00
|
|
|
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
|
2022-12-21 21:05:21 +03:00
|
|
|
# B023: Functions defined inside a loop must not use variables redefined in the loop
|
|
|
|
ignore = [
|
|
|
|
"B023",
|
|
|
|
"E501",
|
|
|
|
"E731",
|
|
|
|
]
|
|
|
|
select = [
|
2023-09-08 18:24:36 +03:00
|
|
|
# pycodestyle
|
2022-12-21 21:05:21 +03:00
|
|
|
"E",
|
|
|
|
"W",
|
2023-09-08 18:24:36 +03:00
|
|
|
# pyflakes
|
2022-12-21 21:05:21 +03:00
|
|
|
"F",
|
2023-09-08 18:24:36 +03:00
|
|
|
# flake8-bugbear
|
2022-12-21 21:05:21 +03:00
|
|
|
"B0",
|
2023-09-08 18:24:36 +03:00
|
|
|
# flake8-comprehensions
|
2022-12-21 21:05:21 +03:00
|
|
|
"C4",
|
2023-09-08 18:24:36 +03:00
|
|
|
# flake8-2020
|
|
|
|
"YTT",
|
|
|
|
# flake8-slots
|
|
|
|
"SLOT",
|
|
|
|
# flake8-debugger
|
|
|
|
"T10",
|
|
|
|
# flake8-pie
|
|
|
|
"PIE",
|
|
|
|
# flake8-executable
|
|
|
|
"EXE",
|
2022-12-21 21:05:21 +03:00
|
|
|
]
|
|
|
|
|
2022-02-22 14:30:19 +03:00
|
|
|
[tool.isort]
|
|
|
|
line_length = 88
|
|
|
|
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"]
|
|
|
|
default_section = "THIRDPARTY"
|
|
|
|
known_first_party = ["synapse"]
|
|
|
|
known_tests = ["tests"]
|
|
|
|
known_twisted = ["twisted", "OpenSSL"]
|
|
|
|
multi_line_output = 3
|
|
|
|
include_trailing_comma = true
|
|
|
|
combine_as_imports = true
|
2022-04-08 16:36:09 +03:00
|
|
|
skip_gitignore = true
|
2022-02-22 14:30:19 +03:00
|
|
|
|
2022-09-06 21:01:37 +03:00
|
|
|
[tool.maturin]
|
|
|
|
manifest-path = "rust/Cargo.toml"
|
2023-09-28 14:01:16 +03:00
|
|
|
module-name = "synapse.synapse_rust"
|
2022-09-06 21:01:37 +03:00
|
|
|
|
2022-04-05 20:40:56 +03:00
|
|
|
[tool.poetry]
|
|
|
|
name = "matrix-synapse"
|
2024-08-13 16:37:01 +03:00
|
|
|
version = "1.113.0"
|
2022-04-05 20:40:56 +03:00
|
|
|
description = "Homeserver for the Matrix decentralised comms protocol"
|
|
|
|
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
2023-11-21 23:29:55 +03:00
|
|
|
license = "AGPL-3.0-or-later"
|
2022-04-05 20:40:56 +03:00
|
|
|
readme = "README.rst"
|
2023-11-20 22:18:58 +03:00
|
|
|
repository = "https://github.com/element-hq/synapse"
|
2022-04-05 20:40:56 +03:00
|
|
|
packages = [
|
|
|
|
{ include = "synapse" },
|
|
|
|
]
|
|
|
|
classifiers = [
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Topic :: Communications :: Chat",
|
|
|
|
]
|
|
|
|
include = [
|
|
|
|
{ path = "AUTHORS.rst", format = "sdist" },
|
|
|
|
{ path = "book.toml", format = "sdist" },
|
|
|
|
{ path = "changelog.d", format = "sdist" },
|
|
|
|
{ path = "CHANGES.md", format = "sdist" },
|
|
|
|
{ path = "CONTRIBUTING.md", format = "sdist" },
|
|
|
|
{ path = "demo", format = "sdist" },
|
|
|
|
{ path = "docs", format = "sdist" },
|
|
|
|
{ path = "INSTALL.md", format = "sdist" },
|
|
|
|
{ path = "mypy.ini", format = "sdist" },
|
|
|
|
{ path = "scripts-dev", format = "sdist" },
|
|
|
|
{ path = "synmark", format="sdist" },
|
|
|
|
{ path = "sytest-blacklist", format = "sdist" },
|
|
|
|
{ path = "tests", format = "sdist" },
|
|
|
|
{ path = "UPGRADE.rst", format = "sdist" },
|
2022-09-06 21:01:37 +03:00
|
|
|
{ path = "Cargo.toml", format = "sdist" },
|
2022-09-26 16:58:10 +03:00
|
|
|
{ path = "Cargo.lock", format = "sdist" },
|
2022-09-06 21:01:37 +03:00
|
|
|
{ path = "rust/Cargo.toml", format = "sdist" },
|
2022-09-22 13:59:23 +03:00
|
|
|
{ path = "rust/build.rs", format = "sdist" },
|
2022-09-06 21:01:37 +03:00
|
|
|
{ path = "rust/src/**", format = "sdist" },
|
|
|
|
]
|
|
|
|
exclude = [
|
|
|
|
{ path = "synapse/*.so", format = "sdist"}
|
2022-04-05 20:40:56 +03:00
|
|
|
]
|
|
|
|
|
2023-02-06 22:34:14 +03:00
|
|
|
[tool.poetry.build]
|
|
|
|
script = "build_rust.py"
|
|
|
|
generate-setup-file = true
|
2022-09-06 21:01:37 +03:00
|
|
|
|
2022-04-05 20:40:56 +03:00
|
|
|
[tool.poetry.scripts]
|
|
|
|
synapse_homeserver = "synapse.app.homeserver:main"
|
|
|
|
synapse_worker = "synapse.app.generic_worker:main"
|
|
|
|
synctl = "synapse._scripts.synctl:main"
|
|
|
|
|
|
|
|
export_signing_key = "synapse._scripts.export_signing_key:main"
|
|
|
|
generate_config = "synapse._scripts.generate_config:main"
|
|
|
|
generate_log_config = "synapse._scripts.generate_log_config:main"
|
|
|
|
generate_signing_key = "synapse._scripts.generate_signing_key:main"
|
|
|
|
hash_password = "synapse._scripts.hash_password:main"
|
|
|
|
register_new_matrix_user = "synapse._scripts.register_new_matrix_user:main"
|
|
|
|
synapse_port_db = "synapse._scripts.synapse_port_db:main"
|
|
|
|
synapse_review_recent_signups = "synapse._scripts.review_recent_signups:main"
|
|
|
|
update_synapse_database = "synapse._scripts.update_synapse_database:main"
|
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
2023-07-06 02:45:42 +03:00
|
|
|
python = "^3.8.0"
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
# Mandatory Dependencies
|
|
|
|
# ----------------------
|
|
|
|
# we use the TYPE_CHECKER.redefine method added in jsonschema 3.0.0
|
|
|
|
jsonschema = ">=3.0.0"
|
2023-03-22 20:15:34 +03:00
|
|
|
# We choose 2.0 as a lower bound: the most recent backwards incompatible release.
|
|
|
|
# It seems generally available, judging by https://pkgs.org/search/?q=immutabledict
|
|
|
|
immutabledict = ">=2.0"
|
2022-04-05 20:40:56 +03:00
|
|
|
# We require 2.1.0 or higher for type hints. Previous guard was >= 1.1.0
|
|
|
|
unpaddedbase64 = ">=2.1.0"
|
2023-03-22 20:15:34 +03:00
|
|
|
# We require 2.0.0 for immutabledict support.
|
|
|
|
canonicaljson = "^2.0.0"
|
2022-04-05 20:40:56 +03:00
|
|
|
# we use the type definitions added in signedjson 1.1.
|
2022-06-17 21:07:04 +03:00
|
|
|
signedjson = "^1.1.0"
|
2022-04-05 20:40:56 +03:00
|
|
|
# validating SSL certs for IP addresses requires service_identity 18.1.
|
|
|
|
service-identity = ">=18.1.0"
|
|
|
|
# Twisted 18.9 introduces some logger improvements that the structured
|
|
|
|
# logger utilises
|
2022-04-12 13:49:02 +03:00
|
|
|
Twisted = {extras = ["tls"], version = ">=18.9.0"}
|
2022-04-05 20:40:56 +03:00
|
|
|
treq = ">=15.1"
|
|
|
|
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
|
|
|
|
pyOpenSSL = ">=16.0.0"
|
2022-12-21 20:29:19 +03:00
|
|
|
PyYAML = ">=3.13"
|
2022-04-05 20:40:56 +03:00
|
|
|
pyasn1 = ">=0.1.9"
|
|
|
|
pyasn1-modules = ">=0.0.7"
|
2022-09-06 17:21:55 +03:00
|
|
|
bcrypt = ">=3.1.7"
|
2023-09-18 16:01:23 +03:00
|
|
|
# 10.0.1 minimum is mandatory here because of libwebp CVE-2023-4863.
|
|
|
|
# Packagers that already took care of libwebp can lower that down to 5.4.0.
|
|
|
|
Pillow = ">=10.0.1"
|
2022-12-05 17:00:59 +03:00
|
|
|
# We use SortedDict.peekitem(), which was added in sortedcontainers 1.5.2.
|
|
|
|
sortedcontainers = ">=1.5.2"
|
2022-04-05 20:40:56 +03:00
|
|
|
pymacaroons = ">=0.13.0"
|
|
|
|
msgpack = ">=0.5.2"
|
|
|
|
phonenumbers = ">=8.2.0"
|
|
|
|
# we use GaugeHistogramMetric, which was added in prom-client 0.4.0.
|
|
|
|
prometheus-client = ">=0.4.0"
|
|
|
|
# we use `order`, which arrived in attrs 19.2.0.
|
2023-11-15 16:02:11 +03:00
|
|
|
# Note: 21.1.0 broke `/sync`, see https://github.com/matrix-org/synapse/issues/9936
|
2022-04-05 20:40:56 +03:00
|
|
|
attrs = ">=19.2.0,!=21.1.0"
|
|
|
|
netaddr = ">=0.7.18"
|
|
|
|
# Jinja 2.x is incompatible with MarkupSafe>=2.1. To ensure that admins do not
|
|
|
|
# end up with a broken installation, with recent MarkupSafe but old Jinja, we
|
|
|
|
# add a lower bound to the Jinja2 dependency.
|
|
|
|
Jinja2 = ">=3.0"
|
|
|
|
bleach = ">=1.4.3"
|
2024-07-30 00:45:48 +03:00
|
|
|
# We use `assert_never`, which were added in `typing-extensions` 4.1.
|
|
|
|
typing-extensions = ">=4.1"
|
2022-04-05 20:40:56 +03:00
|
|
|
# We enforce that we have a `cryptography` version that bundles an `openssl`
|
|
|
|
# with the latest security patches.
|
|
|
|
cryptography = ">=3.4.7"
|
|
|
|
# ijson 3.1.4 fixes a bug with "." in property names
|
|
|
|
ijson = ">=3.1.4"
|
2022-09-15 15:57:16 +03:00
|
|
|
matrix-common = "^1.3.0"
|
2023-09-25 18:19:08 +03:00
|
|
|
# We need packaging.verison.Version(...).major added in 20.0.
|
|
|
|
packaging = ">=20.0"
|
|
|
|
# We support pydantic v1 and pydantic v2 via the pydantic.v1 compat module.
|
|
|
|
# See https://github.com/matrix-org/synapse/issues/15858
|
|
|
|
pydantic = ">=1.7.4, <3"
|
2022-08-15 22:05:57 +03:00
|
|
|
|
2022-09-06 21:01:37 +03:00
|
|
|
# This is for building the rust components during "poetry install", which
|
|
|
|
# currently ignores the `build-system.requires` directive (c.f.
|
|
|
|
# https://github.com/python-poetry/poetry/issues/6154). Both `pip install` and
|
|
|
|
# `poetry build` do the right thing without this explicit dependency.
|
|
|
|
#
|
|
|
|
# This isn't really a dev-dependency, as `poetry install --no-dev` will fail,
|
|
|
|
# but the alternative is to add it to the main list of deps where it isn't
|
|
|
|
# needed.
|
|
|
|
setuptools_rust = ">=1.3"
|
2022-04-05 20:40:56 +03:00
|
|
|
|
2024-07-02 16:07:04 +03:00
|
|
|
# This is used for parsing multipart responses
|
|
|
|
python-multipart = ">=0.0.9"
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
# Optional Dependencies
|
|
|
|
# ---------------------
|
|
|
|
matrix-synapse-ldap3 = { version = ">=0.1", optional = true }
|
|
|
|
psycopg2 = { version = ">=2.8", markers = "platform_python_implementation != 'PyPy'", optional = true }
|
|
|
|
psycopg2cffi = { version = ">=2.8", markers = "platform_python_implementation == 'PyPy'", optional = true }
|
|
|
|
psycopg2cffi-compat = { version = "==1.1", markers = "platform_python_implementation == 'PyPy'", optional = true }
|
|
|
|
pysaml2 = { version = ">=4.5.0", optional = true }
|
2022-10-25 17:25:02 +03:00
|
|
|
authlib = { version = ">=0.15.1", optional = true }
|
2022-04-05 20:40:56 +03:00
|
|
|
# systemd-python is necessary for logging to the systemd journal via
|
|
|
|
# `systemd.journal.JournalHandler`, as is documented in
|
|
|
|
# `contrib/systemd/log_config.yaml`.
|
|
|
|
# Note: systemd-python 231 appears to have been yanked from pypi
|
|
|
|
systemd-python = { version = ">=231", optional = true }
|
|
|
|
lxml = { version = ">=4.2.0", optional = true }
|
|
|
|
sentry-sdk = { version = ">=0.7.2", optional = true }
|
|
|
|
opentracing = { version = ">=2.2.0", optional = true }
|
|
|
|
jaeger-client = { version = ">=4.0.0", optional = true }
|
|
|
|
txredisapi = { version = ">=1.4.7", optional = true }
|
|
|
|
hiredis = { version = "*", optional = true }
|
|
|
|
Pympler = { version = "*", optional = true }
|
|
|
|
parameterized = { version = ">=0.7.4", optional = true }
|
2022-04-12 13:49:02 +03:00
|
|
|
idna = { version = ">=2.5", optional = true }
|
2022-12-12 15:21:17 +03:00
|
|
|
pyicu = { version = ">=2.10.2", optional = true }
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
[tool.poetry.extras]
|
|
|
|
# NB: Packages that should be part of `pip install matrix-synapse[all]` need to be specified
|
|
|
|
# twice: once here, and once in the `all` extra.
|
|
|
|
matrix-synapse-ldap3 = ["matrix-synapse-ldap3"]
|
|
|
|
postgres = ["psycopg2", "psycopg2cffi", "psycopg2cffi-compat"]
|
|
|
|
saml2 = ["pysaml2"]
|
|
|
|
oidc = ["authlib"]
|
|
|
|
# systemd-python is necessary for logging to the systemd journal via
|
|
|
|
# `systemd.journal.JournalHandler`, as is documented in
|
|
|
|
# `contrib/systemd/log_config.yaml`.
|
|
|
|
systemd = ["systemd-python"]
|
2022-10-07 17:15:10 +03:00
|
|
|
url-preview = ["lxml"]
|
2022-04-05 20:40:56 +03:00
|
|
|
sentry = ["sentry-sdk"]
|
|
|
|
opentracing = ["jaeger-client", "opentracing"]
|
2022-06-15 19:45:16 +03:00
|
|
|
jwt = ["authlib"]
|
2022-04-05 20:40:56 +03:00
|
|
|
# hiredis is not a *strict* dependency, but it makes things much faster.
|
|
|
|
# (if it is not installed, we fall back to slow code.)
|
|
|
|
redis = ["txredisapi", "hiredis"]
|
|
|
|
# Required to use experimental `caches.track_memory_usage` config option.
|
2022-10-18 15:59:04 +03:00
|
|
|
cache-memory = ["pympler"]
|
2022-04-12 13:49:02 +03:00
|
|
|
test = ["parameterized", "idna"]
|
2022-12-12 15:21:17 +03:00
|
|
|
# Allows for better search for international characters in the user directory. This
|
|
|
|
# requires libicu's development headers installed on the system (e.g. libicu-dev on
|
|
|
|
# Debian-based distributions).
|
|
|
|
user-search = ["pyicu"]
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
# The duplication here is awful. I hate hate hate hate hate it. However, for now I want
|
|
|
|
# to ensure you can still `pip install matrix-synapse[all]` like today. Two motivations:
|
|
|
|
# 1) for new installations, I want instructions in existing documentation and tutorials
|
|
|
|
# out there to still work.
|
|
|
|
# 2) I don't want to hard-code a list of extras into CI if I can help it. The ideal
|
|
|
|
# solution here would be something like https://github.com/python-poetry/poetry/issues/3413
|
|
|
|
# Poetry 1.2's dependency groups might make this easier. But I'm not trying that out
|
|
|
|
# until there's a stable release of 1.2.
|
|
|
|
#
|
|
|
|
# NB: the strings in this list must be *package* names, not extra names.
|
|
|
|
# Some of our extra names _are_ package names, which can lead to great confusion.
|
|
|
|
all = [
|
|
|
|
# matrix-synapse-ldap3
|
|
|
|
"matrix-synapse-ldap3",
|
|
|
|
# postgres
|
|
|
|
"psycopg2", "psycopg2cffi", "psycopg2cffi-compat",
|
|
|
|
# saml2
|
|
|
|
"pysaml2",
|
2022-06-15 19:45:16 +03:00
|
|
|
# oidc and jwt
|
2022-04-05 20:40:56 +03:00
|
|
|
"authlib",
|
2022-10-07 17:15:10 +03:00
|
|
|
# url-preview
|
2022-04-05 20:40:56 +03:00
|
|
|
"lxml",
|
|
|
|
# sentry
|
|
|
|
"sentry-sdk",
|
|
|
|
# opentracing
|
|
|
|
"jaeger-client", "opentracing",
|
2022-05-07 15:40:58 +03:00
|
|
|
# redis
|
|
|
|
"txredisapi", "hiredis",
|
2022-10-18 15:59:04 +03:00
|
|
|
# cache-memory
|
2022-05-07 15:40:58 +03:00
|
|
|
"pympler",
|
2022-12-12 15:21:17 +03:00
|
|
|
# improved user search
|
|
|
|
"pyicu",
|
2022-04-05 20:40:56 +03:00
|
|
|
# omitted:
|
|
|
|
# - test: it's useful to have this separate from dev deps in the olddeps job
|
|
|
|
# - systemd: this is a system-based requirement
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.poetry.dev-dependencies]
|
2023-08-29 15:34:53 +03:00
|
|
|
# We pin development dependencies in poetry.lock so that our tests don't start
|
|
|
|
# failing on new releases. Keeping lower bounds loose here means that dependabot
|
|
|
|
# can bump versions without having to update the content-hash in the lockfile.
|
|
|
|
# This helps prevents merge conflicts when running a batch of dependabot updates.
|
2022-10-18 18:44:43 +03:00
|
|
|
isort = ">=5.10.1"
|
2023-08-29 15:34:53 +03:00
|
|
|
black = ">=22.7.0"
|
2024-07-30 13:44:54 +03:00
|
|
|
ruff = "0.5.5"
|
2023-09-25 18:19:08 +03:00
|
|
|
# Type checking only works with the pydantic.v1 compat module from pydantic v2
|
|
|
|
pydantic = "^2"
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
# Typechecking
|
2023-05-31 20:06:57 +03:00
|
|
|
lxml-stubs = ">=0.4.0"
|
2022-05-06 15:35:20 +03:00
|
|
|
mypy = "*"
|
|
|
|
mypy-zope = "*"
|
2022-04-05 20:40:56 +03:00
|
|
|
types-bleach = ">=4.1.0"
|
2022-04-27 16:10:31 +03:00
|
|
|
types-commonmark = ">=0.9.2"
|
2022-04-05 20:40:56 +03:00
|
|
|
types-jsonschema = ">=3.2.0"
|
2023-03-09 15:09:49 +03:00
|
|
|
types-netaddr = ">=0.8.0.6"
|
2022-04-05 20:40:56 +03:00
|
|
|
types-opentracing = ">=2.4.2"
|
|
|
|
types-Pillow = ">=8.3.4"
|
|
|
|
types-psycopg2 = ">=2.9.9"
|
|
|
|
types-pyOpenSSL = ">=20.0.7"
|
|
|
|
types-PyYAML = ">=5.4.10"
|
|
|
|
types-requests = ">=2.26.0"
|
|
|
|
types-setuptools = ">=57.4.0"
|
|
|
|
|
|
|
|
# Dependencies which are exclusively required by unit test code. This is
|
|
|
|
# NOT a list of all modules that are necessary to run the unit tests.
|
|
|
|
# Tests assume that all optional dependencies are installed.
|
|
|
|
# parameterized<0.7.4 can create classes with names that would normally be invalid
|
|
|
|
# identifiers. trial really does not like this when running with multiple workers.
|
|
|
|
parameterized = ">=0.7.4"
|
2022-04-12 13:49:02 +03:00
|
|
|
idna = ">=2.5"
|
2022-04-05 20:40:56 +03:00
|
|
|
|
|
|
|
# The following are used by the release script
|
2022-10-18 18:44:43 +03:00
|
|
|
click = ">=8.1.3"
|
2022-04-27 16:10:31 +03:00
|
|
|
# GitPython was == 3.1.14; bumped to 3.1.20, the first release with type hints.
|
|
|
|
GitPython = ">=3.1.20"
|
2022-10-18 18:44:43 +03:00
|
|
|
commonmark = ">=0.9.1"
|
|
|
|
pygithub = ">=1.55"
|
2022-04-05 20:40:56 +03:00
|
|
|
# The following are executed as commands by the release script.
|
|
|
|
twine = "*"
|
2023-11-15 16:02:11 +03:00
|
|
|
# Towncrier min version comes from https://github.com/matrix-org/synapse/pull/3425. Rationale unclear.
|
2022-04-05 20:40:56 +03:00
|
|
|
towncrier = ">=18.6.0rc1"
|
|
|
|
|
2023-02-13 21:15:38 +03:00
|
|
|
# Used for checking the Poetry lockfile
|
|
|
|
tomli = ">=1.2.3"
|
|
|
|
|
2023-03-24 19:41:10 +03:00
|
|
|
|
2022-04-05 20:40:56 +03:00
|
|
|
[build-system]
|
2022-10-07 17:15:10 +03:00
|
|
|
# The upper bounds here are defensive, intended to prevent situations like
|
2023-11-15 16:02:11 +03:00
|
|
|
# https://github.com/matrix-org/synapse/issues/13849 and
|
|
|
|
# https://github.com/matrix-org/synapse/issues/14079 where we see buildtime or
|
|
|
|
# runtime errors caused by build system changes.
|
2022-10-07 17:15:10 +03:00
|
|
|
# We are happy to raise these upper bounds upon request,
|
|
|
|
# provided we check that it's safe to do so (i.e. that CI passes).
|
2024-03-13 19:40:08 +03:00
|
|
|
requires = ["poetry-core>=1.1.0,<=1.9.0", "setuptools_rust>=1.3,<=1.8.1"]
|
2022-04-20 19:33:20 +03:00
|
|
|
build-backend = "poetry.core.masonry.api"
|
2022-09-06 21:01:37 +03:00
|
|
|
|
|
|
|
|
|
|
|
[tool.cibuildwheel]
|
|
|
|
# Skip unsupported platforms (by us or by Rust).
|
2023-07-11 17:16:19 +03:00
|
|
|
# See https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip for the list of build targets.
|
|
|
|
# We skip:
|
|
|
|
# - CPython 3.6 and 3.7: EOLed
|
|
|
|
# - PyPy 3.7: we only support Python 3.8+
|
|
|
|
# - musllinux i686: excluded to reduce number of wheels we build.
|
|
|
|
# c.f. https://github.com/matrix-org/synapse/pull/12595#discussion_r963107677
|
|
|
|
# - PyPy on Aarch64 and musllinux on aarch64: too slow to build.
|
|
|
|
# c.f. https://github.com/matrix-org/synapse/pull/14259
|
|
|
|
skip = "cp36* cp37* pp37* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64"
|
2022-09-06 21:01:37 +03:00
|
|
|
|
|
|
|
# We need a rust compiler
|
2022-10-12 12:47:02 +03:00
|
|
|
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal"
|
2022-09-06 21:01:37 +03:00
|
|
|
environment= { PATH = "$PATH:$HOME/.cargo/bin" }
|
|
|
|
|
|
|
|
# For some reason if we don't manually clean the build directory we
|
|
|
|
# can end up polluting the next build with a .so that is for the wrong
|
|
|
|
# Python version.
|
|
|
|
before-build = "rm -rf {project}/build"
|
|
|
|
build-frontend = "build"
|
|
|
|
test-command = "python -c 'from synapse.synapse_rust import sum_as_string; print(sum_as_string(1, 2))'"
|
2022-10-21 17:17:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
[tool.cibuildwheel.linux]
|
|
|
|
# Wrap the repair command to correctly rename the built cpython wheels as ABI3.
|
|
|
|
repair-wheel-command = "./.ci/scripts/auditwheel_wrapper.py -w {dest_dir} {wheel}"
|
|
|
|
|
|
|
|
[tool.cibuildwheel.macos]
|
|
|
|
# Wrap the repair command to correctly rename the built cpython wheels as ABI3.
|
|
|
|
repair-wheel-command = "./.ci/scripts/auditwheel_wrapper.py --require-archs {delocate_archs} -w {dest_dir} {wheel}"
|