Compare commits
3 Commits
develop
...
quenting/u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afeb2b789f | ||
|
|
8049a35333 | ||
|
|
581b171956 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,6 +16,7 @@ _trial_temp*/
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
# We do want poetry, cargo and flake lockfiles.
|
# We do want poetry, cargo and flake lockfiles.
|
||||||
|
!uv.lock
|
||||||
!poetry.lock
|
!poetry.lock
|
||||||
!Cargo.lock
|
!Cargo.lock
|
||||||
!flake.lock
|
!flake.lock
|
||||||
@@ -26,7 +27,6 @@ __pycache__/
|
|||||||
/*.log.*
|
/*.log.*
|
||||||
/*.log.config
|
/*.log.config
|
||||||
/*.pid
|
/*.pid
|
||||||
/.python-version
|
|
||||||
/*.signing.key
|
/*.signing.key
|
||||||
/env/
|
/env/
|
||||||
/.venv*/
|
/.venv*/
|
||||||
|
|||||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.13
|
||||||
491
pyproject.toml
491
pyproject.toml
@@ -1,38 +1,38 @@
|
|||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
package = "synapse"
|
package = "synapse"
|
||||||
filename = "CHANGES.md"
|
filename = "CHANGES.md"
|
||||||
directory = "changelog.d"
|
directory = "changelog.d"
|
||||||
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
|
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "feature"
|
directory = "feature"
|
||||||
name = "Features"
|
name = "Features"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "bugfix"
|
directory = "bugfix"
|
||||||
name = "Bugfixes"
|
name = "Bugfixes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "docker"
|
directory = "docker"
|
||||||
name = "Updates to the Docker image"
|
name = "Updates to the Docker image"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "doc"
|
directory = "doc"
|
||||||
name = "Improved Documentation"
|
name = "Improved Documentation"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "removal"
|
directory = "removal"
|
||||||
name = "Deprecations and Removals"
|
name = "Deprecations and Removals"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "misc"
|
directory = "misc"
|
||||||
name = "Internal Changes"
|
name = "Internal Changes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 88
|
line-length = 88
|
||||||
@@ -47,11 +47,7 @@ target-version = "py39"
|
|||||||
# flake8-bugbear compatible checks. Its error codes are described at
|
# flake8-bugbear compatible checks. Its error codes are described at
|
||||||
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
|
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
|
||||||
# B023: Functions defined inside a loop must not use variables redefined in the loop
|
# B023: Functions defined inside a loop must not use variables redefined in the loop
|
||||||
ignore = [
|
ignore = ["B023", "E501", "E731"]
|
||||||
"B023",
|
|
||||||
"E501",
|
|
||||||
"E731",
|
|
||||||
]
|
|
||||||
select = [
|
select = [
|
||||||
# pycodestyle
|
# pycodestyle
|
||||||
"E",
|
"E",
|
||||||
@@ -78,7 +74,15 @@ select = [
|
|||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
combine-as-imports = true
|
combine-as-imports = true
|
||||||
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"]
|
section-order = [
|
||||||
|
"future",
|
||||||
|
"standard-library",
|
||||||
|
"third-party",
|
||||||
|
"twisted",
|
||||||
|
"first-party",
|
||||||
|
"testing",
|
||||||
|
"local-folder",
|
||||||
|
]
|
||||||
known-first-party = ["synapse"]
|
known-first-party = ["synapse"]
|
||||||
|
|
||||||
[tool.ruff.lint.isort.sections]
|
[tool.ruff.lint.isort.sections]
|
||||||
@@ -95,188 +99,112 @@ line-ending = "auto"
|
|||||||
manifest-path = "rust/Cargo.toml"
|
manifest-path = "rust/Cargo.toml"
|
||||||
module-name = "synapse.synapse_rust"
|
module-name = "synapse.synapse_rust"
|
||||||
|
|
||||||
[tool.poetry]
|
[project]
|
||||||
name = "matrix-synapse"
|
name = "matrix-synapse"
|
||||||
version = "1.123.0"
|
version = "1.123.0"
|
||||||
description = "Homeserver for the Matrix decentralised comms protocol"
|
description = "Homeserver for the Matrix decentralised comms protocol"
|
||||||
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
authors = [
|
||||||
|
{ name = "Matrix.org Team and Contributors", email = "packages@matrix.org" },
|
||||||
|
]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
readme = "README.rst"
|
readme = "README.rst"
|
||||||
repository = "https://github.com/element-hq/synapse"
|
repository = "https://github.com/element-hq/synapse"
|
||||||
packages = [
|
packages = [{ include = "synapse" }]
|
||||||
{ include = "synapse" },
|
requires-python = ">=3.9"
|
||||||
]
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Topic :: Communications :: Chat",
|
"Topic :: Communications :: Chat",
|
||||||
]
|
]
|
||||||
include = [
|
|
||||||
{ path = "AUTHORS.rst", format = "sdist" },
|
dependencies = [
|
||||||
{ path = "book.toml", format = "sdist" },
|
# we use the TYPE_CHECKER.redefine method added in jsonschema 3.0.0
|
||||||
{ path = "changelog.d", format = "sdist" },
|
"jsonschema>=3.0.0",
|
||||||
{ path = "CHANGES.md", format = "sdist" },
|
# We choose 2.0 as a lower bound: the most recent backwards incompatible release.
|
||||||
{ path = "CONTRIBUTING.md", format = "sdist" },
|
# It seems generally available, judging by https://pkgs.org/search/?q=immutabledict
|
||||||
{ path = "demo", format = "sdist" },
|
"immutabledict>=2.0",
|
||||||
{ path = "docs", format = "sdist" },
|
# We require 2.1.0 or higher for type hints. Previous guard was >= 1.1.0
|
||||||
{ path = "INSTALL.md", format = "sdist" },
|
"unpaddedbase64>=2.1.0",
|
||||||
{ path = "mypy.ini", format = "sdist" },
|
# We require 2.0.0 for immutabledict support.
|
||||||
{ path = "scripts-dev", format = "sdist" },
|
"canonicaljson>=2.0.0",
|
||||||
{ path = "synmark", format="sdist" },
|
# we use the type definitions added in signedjson 1.1.
|
||||||
{ path = "sytest-blacklist", format = "sdist" },
|
"signedjson>=1.1.0",
|
||||||
{ path = "tests", format = "sdist" },
|
# validating SSL certs for IP addresses requires service_identity 18.1.
|
||||||
{ path = "UPGRADE.rst", format = "sdist" },
|
"service-identity>=18.1.0",
|
||||||
{ path = "Cargo.toml", format = "sdist" },
|
# Twisted 18.9 introduces some logger improvements that the structured
|
||||||
{ path = "Cargo.lock", format = "sdist" },
|
# logger utilises
|
||||||
{ path = "rust/Cargo.toml", format = "sdist" },
|
"Twisted[tls]>=18.9.0",
|
||||||
{ path = "rust/build.rs", format = "sdist" },
|
"treq>=15.1",
|
||||||
{ path = "rust/src/**", format = "sdist" },
|
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
|
||||||
]
|
"pyOpenSSL>=16.0.0",
|
||||||
exclude = [
|
"PyYAML>=5.3",
|
||||||
{ path = "synapse/*.so", format = "sdist"}
|
"pyasn1>=0.1.9",
|
||||||
|
"pyasn1-modules>=0.0.7",
|
||||||
|
"bcrypt>=3.1.7",
|
||||||
|
# 10.0.1 minimum is mandatory here because of libwebp CVE-2023-4863.
|
||||||
|
"Pillow>=10.0.1",
|
||||||
|
# We use SortedDict.peekitem(), which was added in sortedcontainers 1.5.2.
|
||||||
|
"sortedcontainers>=1.5.2",
|
||||||
|
"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.
|
||||||
|
# Note: 21.1.0 broke `/sync`, see https://github.com/matrix-org/synapse/issues/9936
|
||||||
|
"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",
|
||||||
|
# We use `assert_never`, which were added in `typing-extensions` 4.1.
|
||||||
|
"typing-extensions>=4.1",
|
||||||
|
# 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",
|
||||||
|
"matrix-common>=1.3.0",
|
||||||
|
# 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",
|
||||||
|
# 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",
|
||||||
|
# This is used for parsing multipart responses
|
||||||
|
"python-multipart>=0.0.9",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.build]
|
[project.optional-dependencies]
|
||||||
script = "build_rust.py"
|
matrix-synapse-ldap3 = ["matrix-synapse-ldap3>=0.1"]
|
||||||
generate-setup-file = true
|
postgres = [
|
||||||
|
"psycopg2>=2.8; platform_python_implementation != 'PyPy'",
|
||||||
[tool.poetry.scripts]
|
"psycopg2cffi>=2.8; platform_python_implementation == 'PyPy'",
|
||||||
synapse_homeserver = "synapse.app.homeserver:main"
|
"psycopg2cffi-compat>=1.1; platform_python_implementation == 'PyPy'",
|
||||||
synapse_worker = "synapse.app.generic_worker:main"
|
]
|
||||||
synctl = "synapse._scripts.synctl:main"
|
saml2 = ["pysaml2>=4.5.0"]
|
||||||
|
oidc = ["authlib>=0.15.1"]
|
||||||
export_signing_key = "synapse._scripts.export_signing_key:main"
|
#systemd = ["systemd-python>=231; platform_system == 'Linux'"]
|
||||||
generate_config = "synapse._scripts.generate_config:main"
|
url-preview = ["lxml>=4.5.2"]
|
||||||
generate_log_config = "synapse._scripts.generate_log_config:main"
|
sentry = ["sentry-sdk>=0.7.2"]
|
||||||
generate_signing_key = "synapse._scripts.generate_signing_key:main"
|
opentracing = ["jaeger-client>=4.0.0", "opentracing>=2.2.0"]
|
||||||
hash_password = "synapse._scripts.hash_password:main"
|
jwt = ["authlib>=0.15.1"]
|
||||||
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]
|
|
||||||
python = "^3.9.0"
|
|
||||||
|
|
||||||
# Mandatory Dependencies
|
|
||||||
# ----------------------
|
|
||||||
# we use the TYPE_CHECKER.redefine method added in jsonschema 3.0.0
|
|
||||||
jsonschema = ">=3.0.0"
|
|
||||||
# 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"
|
|
||||||
# We require 2.1.0 or higher for type hints. Previous guard was >= 1.1.0
|
|
||||||
unpaddedbase64 = ">=2.1.0"
|
|
||||||
# We require 2.0.0 for immutabledict support.
|
|
||||||
canonicaljson = "^2.0.0"
|
|
||||||
# we use the type definitions added in signedjson 1.1.
|
|
||||||
signedjson = "^1.1.0"
|
|
||||||
# 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
|
|
||||||
Twisted = {extras = ["tls"], version = ">=18.9.0"}
|
|
||||||
treq = ">=15.1"
|
|
||||||
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
|
|
||||||
pyOpenSSL = ">=16.0.0"
|
|
||||||
PyYAML = ">=5.3"
|
|
||||||
pyasn1 = ">=0.1.9"
|
|
||||||
pyasn1-modules = ">=0.0.7"
|
|
||||||
bcrypt = ">=3.1.7"
|
|
||||||
# 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"
|
|
||||||
# We use SortedDict.peekitem(), which was added in sortedcontainers 1.5.2.
|
|
||||||
sortedcontainers = ">=1.5.2"
|
|
||||||
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.
|
|
||||||
# Note: 21.1.0 broke `/sync`, see https://github.com/matrix-org/synapse/issues/9936
|
|
||||||
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"
|
|
||||||
# We use `assert_never`, which were added in `typing-extensions` 4.1.
|
|
||||||
typing-extensions = ">=4.1"
|
|
||||||
# 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"
|
|
||||||
matrix-common = "^1.3.0"
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# This is used for parsing multipart responses
|
|
||||||
python-multipart = ">=0.0.9"
|
|
||||||
|
|
||||||
# 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 }
|
|
||||||
authlib = { version = ">=0.15.1", optional = true }
|
|
||||||
# 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.5.2", 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 }
|
|
||||||
idna = { version = ">=2.5", optional = true }
|
|
||||||
pyicu = { version = ">=2.10.2", optional = true }
|
|
||||||
|
|
||||||
[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"]
|
|
||||||
url-preview = ["lxml"]
|
|
||||||
sentry = ["sentry-sdk"]
|
|
||||||
opentracing = ["jaeger-client", "opentracing"]
|
|
||||||
jwt = ["authlib"]
|
|
||||||
# hiredis is not a *strict* dependency, but it makes things much faster.
|
# hiredis is not a *strict* dependency, but it makes things much faster.
|
||||||
# (if it is not installed, we fall back to slow code.)
|
# (if it is not installed, we fall back to slow code.)
|
||||||
redis = ["txredisapi", "hiredis"]
|
redis = ["txredisapi>=1.4.7", "hiredis>=0.1.0"]
|
||||||
# Required to use experimental `caches.track_memory_usage` config option.
|
# Required to use experimental `caches.track_memory
|
||||||
cache-memory = ["pympler"]
|
cache-memory = ["pympler>=0.9.2"]
|
||||||
test = ["parameterized", "idna"]
|
test = ["parameterized>=0.7.4", "idna>=2.5"]
|
||||||
# Allows for better search for international characters in the user directory. This
|
user-search = ["pyicu>=2.10.2"]
|
||||||
# requires libicu's development headers installed on the system (e.g. libicu-dev on
|
|
||||||
# Debian-based distributions).
|
|
||||||
user-search = ["pyicu"]
|
|
||||||
|
|
||||||
# The duplication here is awful. I hate hate hate hate hate it. However, for now I want
|
# 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:
|
# to ensure you can still `pip install matrix-synapse[all]` like today. Two motivations:
|
||||||
@@ -291,87 +219,112 @@ user-search = ["pyicu"]
|
|||||||
# Some of our extra names _are_ package names, which can lead to great confusion.
|
# Some of our extra names _are_ package names, which can lead to great confusion.
|
||||||
all = [
|
all = [
|
||||||
# matrix-synapse-ldap3
|
# matrix-synapse-ldap3
|
||||||
"matrix-synapse-ldap3",
|
"matrix-synapse-ldap3>=0.1",
|
||||||
# postgres
|
# postgres
|
||||||
"psycopg2", "psycopg2cffi", "psycopg2cffi-compat",
|
"psycopg2>=2.8; platform_python_implementation != 'PyPy'",
|
||||||
|
"psycopg2cffi>=2.8; platform_python_implementation == 'PyPy'",
|
||||||
|
"psycopg2cffi-compat>=1.1; platform_python_implementation == 'PyPy'",
|
||||||
# saml2
|
# saml2
|
||||||
"pysaml2",
|
"pysaml2>=4.5.0",
|
||||||
# oidc and jwt
|
# oidc and jwt
|
||||||
"authlib",
|
"authlib>=0.15.1",
|
||||||
# url-preview
|
# url-preview
|
||||||
"lxml",
|
"lxml>=4.5.2",
|
||||||
# sentry
|
# sentry
|
||||||
"sentry-sdk",
|
"sentry-sdk>=0.7.2",
|
||||||
# opentracing
|
# opentracing
|
||||||
"jaeger-client", "opentracing",
|
"jaeger-client>=4.0.0",
|
||||||
|
"opentracing>=2.2.0",
|
||||||
# redis
|
# redis
|
||||||
"txredisapi", "hiredis",
|
"txredisapi>=1.4.7",
|
||||||
|
"hiredis>=0.1.0",
|
||||||
# cache-memory
|
# cache-memory
|
||||||
"pympler",
|
"pympler>=0.9.2",
|
||||||
# improved user search
|
# improved user search
|
||||||
"pyicu",
|
"pyicu>=2.10.2",
|
||||||
# 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]
|
[project.scripts]
|
||||||
# We pin development dependencies in poetry.lock so that our tests don't start
|
synapse_homeserver = "synapse.app.homeserver:main"
|
||||||
# failing on new releases. Keeping lower bounds loose here means that dependabot
|
synapse_worker = "synapse.app.generic_worker:main"
|
||||||
# can bump versions without having to update the content-hash in the lockfile.
|
synctl = "synapse._scripts.synctl:main"
|
||||||
# This helps prevents merge conflicts when running a batch of dependabot updates.
|
|
||||||
ruff = "0.7.3"
|
|
||||||
# Type checking only works with the pydantic.v1 compat module from pydantic v2
|
|
||||||
pydantic = "^2"
|
|
||||||
|
|
||||||
# Typechecking
|
export_signing_key = "synapse._scripts.export_signing_key:main"
|
||||||
lxml-stubs = ">=0.4.0"
|
generate_config = "synapse._scripts.generate_config:main"
|
||||||
mypy = "*"
|
generate_log_config = "synapse._scripts.generate_log_config:main"
|
||||||
mypy-zope = "*"
|
generate_signing_key = "synapse._scripts.generate_signing_key:main"
|
||||||
types-bleach = ">=4.1.0"
|
hash_password = "synapse._scripts.hash_password:main"
|
||||||
types-commonmark = ">=0.9.2"
|
register_new_matrix_user = "synapse._scripts.register_new_matrix_user:main"
|
||||||
types-jsonschema = ">=3.2.0"
|
synapse_port_db = "synapse._scripts.synapse_port_db:main"
|
||||||
types-netaddr = ">=0.8.0.6"
|
synapse_review_recent_signups = "synapse._scripts.review_recent_signups:main"
|
||||||
types-opentracing = ">=2.4.2"
|
update_synapse_database = "synapse._scripts.update_synapse_database:main"
|
||||||
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
|
[dependency-groups]
|
||||||
# NOT a list of all modules that are necessary to run the unit tests.
|
dev = [
|
||||||
# Tests assume that all optional dependencies are installed.
|
"ruff==0.7.3",
|
||||||
# parameterized<0.7.4 can create classes with names that would normally be invalid
|
"mypy",
|
||||||
# identifiers. trial really does not like this when running with multiple workers.
|
"mypy-zope",
|
||||||
parameterized = ">=0.7.4"
|
"types-bleach>=4.1.0",
|
||||||
idna = ">=2.5"
|
"types-commonmark>=0.9.2",
|
||||||
|
"types-jsonschema>=3.2.0",
|
||||||
# The following are used by the release script
|
"types-netaddr>=0.8.0.6",
|
||||||
click = ">=8.1.3"
|
"types-opentracing>=2.4.2",
|
||||||
# GitPython was == 3.1.14; bumped to 3.1.20, the first release with type hints.
|
"types-Pillow>=8.3.4",
|
||||||
GitPython = ">=3.1.20"
|
"types-psycopg2>=2.9.9",
|
||||||
commonmark = ">=0.9.1"
|
"types-pyOpenSSL>=20.0.7",
|
||||||
pygithub = ">=1.55"
|
"types-PyYAML>=5.4.10",
|
||||||
# The following are executed as commands by the release script.
|
"types-requests>=2.26.0",
|
||||||
twine = "*"
|
"types-setuptools>=57.4.0",
|
||||||
# Towncrier min version comes from https://github.com/matrix-org/synapse/pull/3425. Rationale unclear.
|
"parameterized>=0.7.4",
|
||||||
towncrier = ">=18.6.0rc1"
|
"idna>=2.5",
|
||||||
|
"pyicu>=2.10.2",
|
||||||
# Used for checking the Poetry lockfile
|
]
|
||||||
tomli = ">=1.2.3"
|
|
||||||
|
|
||||||
|
release = [
|
||||||
|
"click>=8.1.3",
|
||||||
|
"GitPython>=3.1.20",
|
||||||
|
"commonmark>=0.9.1",
|
||||||
|
"pygithub>=1.55",
|
||||||
|
"twine",
|
||||||
|
# Towncrier min version comes from https://github.com/matrix-org/synapse/pull/3425. Rationale unclear.
|
||||||
|
"towncrier>=18.6.0rc1",
|
||||||
|
# Used for checking the Poetry lockfile
|
||||||
|
"tomli>=1.2.3",
|
||||||
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
# The upper bounds here are defensive, intended to prevent situations like
|
requires = ["hatchling"]
|
||||||
# https://github.com/matrix-org/synapse/issues/13849 and
|
build-backend = "hatchling.build"
|
||||||
# https://github.com/matrix-org/synapse/issues/14079 where we see buildtime or
|
|
||||||
# runtime errors caused by build system changes.
|
[tool.uv]
|
||||||
# We are happy to raise these upper bounds upon request,
|
default-groups = ["dev", "release"]
|
||||||
# provided we check that it's safe to do so (i.e. that CI passes).
|
|
||||||
requires = ["poetry-core>=1.1.0,<=1.9.1", "setuptools_rust>=1.3,<=1.10.2"]
|
[tool.hatch.build.targets.wheel]
|
||||||
build-backend = "poetry.core.masonry.api"
|
packages = ["synapse"]
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
|
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" },
|
||||||
|
{ path = "Cargo.toml", format = "sdist" },
|
||||||
|
{ path = "Cargo.lock", format = "sdist" },
|
||||||
|
{ path = "rust/Cargo.toml", format = "sdist" },
|
||||||
|
{ path = "rust/build.rs", format = "sdist" },
|
||||||
|
{ path = "rust/src/**", format = "sdist" },
|
||||||
|
]
|
||||||
|
exclude = [{ path = "synapse/*.so", format = "sdist" }]
|
||||||
|
|
||||||
|
|
||||||
[tool.cibuildwheel]
|
[tool.cibuildwheel]
|
||||||
@@ -390,8 +343,8 @@ skip = "cp36* cp37* cp38* pp37* pp38* *-musllinux_i686 pp*aarch64 *-musllinux_aa
|
|||||||
#
|
#
|
||||||
# We temporarily pin Rust to 1.82.0 to work around
|
# We temporarily pin Rust to 1.82.0 to work around
|
||||||
# https://github.com/element-hq/synapse/issues/17988
|
# https://github.com/element-hq/synapse/issues/17988
|
||||||
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.82.0 -y --profile minimal"
|
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.82.0 -y --profile minimal"
|
||||||
environment= { PATH = "$PATH:$HOME/.cargo/bin" }
|
environment = { PATH = "$PATH:$HOME/.cargo/bin" }
|
||||||
|
|
||||||
# For some reason if we don't manually clean the build directory we
|
# 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
|
# can end up polluting the next build with a .so that is for the wrong
|
||||||
|
|||||||
Reference in New Issue
Block a user