Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.1 to 0.12.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.12.2</h2> <h2>Release Notes</h2> <h3>Preview features</h3> <ul> <li>[<code>flake8-pyi</code>] Expand <code>Optional[A]</code> to <code>A | None</code> (<code>PYI016</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18572">#18572</a>)</li> <li>[<code>pyupgrade</code>] Mark <code>UP008</code> fix safe if no comments are in range (<a href="https://redirect.github.com/astral-sh/ruff/pull/18683">#18683</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>flake8-comprehensions</code>] Fix <code>C420</code> to prepend whitespace when needed (<a href="https://redirect.github.com/astral-sh/ruff/pull/18616">#18616</a>)</li> <li>[<code>perflint</code>] Fix <code>PERF403</code> panic on attribute or subscription loop variable (<a href="https://redirect.github.com/astral-sh/ruff/pull/19042">#19042</a>)</li> <li>[<code>pydocstyle</code>] Fix <code>D413</code> infinite loop for parenthesized docstring (<a href="https://redirect.github.com/astral-sh/ruff/pull/18930">#18930</a>)</li> <li>[<code>pylint</code>] Fix <code>PLW0108</code> autofix introducing a syntax error when the lambda's body contains an assignment expression (<a href="https://redirect.github.com/astral-sh/ruff/pull/18678">#18678</a>)</li> <li>[<code>refurb</code>] Fix false positive on empty tuples (<code>FURB168</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19058">#19058</a>)</li> <li>[<code>ruff</code>] Allow more <code>field</code> calls from <code>attrs</code> (<code>RUF009</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19021">#19021</a>)</li> <li>[<code>ruff</code>] Fix syntax error introduced for an empty string followed by a u-prefixed string (<code>UP025</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18899">#18899</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-executable</code>] Allow <code>uvx</code> in shebang line (<code>EXE003</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18967">#18967</a>)</li> <li>[<code>pandas</code>] Avoid flagging <code>PD002</code> if <code>pandas</code> is not imported (<a href="https://redirect.github.com/astral-sh/ruff/pull/18963">#18963</a>)</li> <li>[<code>pyupgrade</code>] Avoid PEP-604 unions with <code>typing.NamedTuple</code> (<code>UP007</code>, <code>UP045</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18682">#18682</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Document link between <code>import-outside-top-level (PLC0415)</code> and <code>lint.flake8-tidy-imports.banned-module-level-imports</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/18733">#18733</a>)</li> <li>Fix description of the <code>format.skip-magic-trailing-comma</code> example (<a href="https://redirect.github.com/astral-sh/ruff/pull/19095">#19095</a>)</li> <li>[<code>airflow</code>] Make <code>AIR302</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18988">#18988</a>)</li> <li>[<code>airflow</code>] Make <code>AIR312</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18989">#18989</a>)</li> <li>[<code>flake8-annotations</code>] Make <code>ANN401</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18974">#18974</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC100</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18993">#18993</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC105</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19002">#19002</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC110</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18975">#18975</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC210</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18977">#18977</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC220</code>, <code>ASYNC221</code>, and <code>ASYNC222</code> examples error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18978">#18978</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC251</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18990">#18990</a>)</li> <li>[<code>flake8-bandit</code>] Make <code>S201</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19017">#19017</a>)</li> <li>[<code>flake8-bandit</code>] Make <code>S604</code> and <code>S609</code> examples error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19049">#19049</a>)</li> <li>[<code>flake8-bugbear</code>] Make <code>B028</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19054">#19054</a>)</li> <li>[<code>flake8-bugbear</code>] Make <code>B911</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19051">#19051</a>)</li> <li>[<code>flake8-datetimez</code>] Make <code>DTZ011</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19055">#19055</a>)</li> <li>[<code>flake8-datetimez</code>] Make <code>DTZ901</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19056">#19056</a>)</li> <li>[<code>flake8-pyi</code>] Make <code>PYI032</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19061">#19061</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI014</code>, <code>PYI015</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19097">#19097</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI042</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19101">#19101</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI059</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19080">#19080</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI062</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19079">#19079</a>)</li> <li>[<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT023</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19104">#19104</a>)</li> <li>[<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT030</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19105">#19105</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.12.2</h2> <h3>Preview features</h3> <ul> <li>[<code>flake8-pyi</code>] Expand <code>Optional[A]</code> to <code>A | None</code> (<code>PYI016</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18572">#18572</a>)</li> <li>[<code>pyupgrade</code>] Mark <code>UP008</code> fix safe if no comments are in range (<a href="https://redirect.github.com/astral-sh/ruff/pull/18683">#18683</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>flake8-comprehensions</code>] Fix <code>C420</code> to prepend whitespace when needed (<a href="https://redirect.github.com/astral-sh/ruff/pull/18616">#18616</a>)</li> <li>[<code>perflint</code>] Fix <code>PERF403</code> panic on attribute or subscription loop variable (<a href="https://redirect.github.com/astral-sh/ruff/pull/19042">#19042</a>)</li> <li>[<code>pydocstyle</code>] Fix <code>D413</code> infinite loop for parenthesized docstring (<a href="https://redirect.github.com/astral-sh/ruff/pull/18930">#18930</a>)</li> <li>[<code>pylint</code>] Fix <code>PLW0108</code> autofix introducing a syntax error when the lambda's body contains an assignment expression (<a href="https://redirect.github.com/astral-sh/ruff/pull/18678">#18678</a>)</li> <li>[<code>refurb</code>] Fix false positive on empty tuples (<code>FURB168</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19058">#19058</a>)</li> <li>[<code>ruff</code>] Allow more <code>field</code> calls from <code>attrs</code> (<code>RUF009</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19021">#19021</a>)</li> <li>[<code>ruff</code>] Fix syntax error introduced for an empty string followed by a u-prefixed string (<code>UP025</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18899">#18899</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-executable</code>] Allow <code>uvx</code> in shebang line (<code>EXE003</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18967">#18967</a>)</li> <li>[<code>pandas</code>] Avoid flagging <code>PD002</code> if <code>pandas</code> is not imported (<a href="https://redirect.github.com/astral-sh/ruff/pull/18963">#18963</a>)</li> <li>[<code>pyupgrade</code>] Avoid PEP-604 unions with <code>typing.NamedTuple</code> (<code>UP007</code>, <code>UP045</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/18682">#18682</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Document link between <code>import-outside-top-level (PLC0415)</code> and <code>lint.flake8-tidy-imports.banned-module-level-imports</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/18733">#18733</a>)</li> <li>Fix description of the <code>format.skip-magic-trailing-comma</code> example (<a href="https://redirect.github.com/astral-sh/ruff/pull/19095">#19095</a>)</li> <li>[<code>airflow</code>] Make <code>AIR302</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18988">#18988</a>)</li> <li>[<code>airflow</code>] Make <code>AIR312</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18989">#18989</a>)</li> <li>[<code>flake8-annotations</code>] Make <code>ANN401</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18974">#18974</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC100</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18993">#18993</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC105</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19002">#19002</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC110</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18975">#18975</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC210</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18977">#18977</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC220</code>, <code>ASYNC221</code>, and <code>ASYNC222</code> examples error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18978">#18978</a>)</li> <li>[<code>flake8-async</code>] Make <code>ASYNC251</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/18990">#18990</a>)</li> <li>[<code>flake8-bandit</code>] Make <code>S201</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19017">#19017</a>)</li> <li>[<code>flake8-bandit</code>] Make <code>S604</code> and <code>S609</code> examples error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19049">#19049</a>)</li> <li>[<code>flake8-bugbear</code>] Make <code>B028</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19054">#19054</a>)</li> <li>[<code>flake8-bugbear</code>] Make <code>B911</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19051">#19051</a>)</li> <li>[<code>flake8-datetimez</code>] Make <code>DTZ011</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19055">#19055</a>)</li> <li>[<code>flake8-datetimez</code>] Make <code>DTZ901</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19056">#19056</a>)</li> <li>[<code>flake8-pyi</code>] Make <code>PYI032</code> example error out-of-the-box (<a href="https://redirect.github.com/astral-sh/ruff/pull/19061">#19061</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI014</code>, <code>PYI015</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19097">#19097</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI042</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19101">#19101</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI059</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19080">#19080</a>)</li> <li>[<code>flake8-pyi</code>] Make example error out-of-the-box (<code>PYI062</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19079">#19079</a>)</li> <li>[<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT023</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19104">#19104</a>)</li> <li>[<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT030</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19105">#19105</a>)</li> <li>[<code>flake8-quotes</code>] Make example error out-of-the-box (<code>Q003</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/19106">#19106</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="9bee8376a1"><code>9bee837</code></a> Bump 0.12.2 (<a href="https://redirect.github.com/astral-sh/ruff/issues/19126">#19126</a>)</li> <li><a href="1c6717b149"><code>1c6717b</code></a> Filter private symbols from stubs if they are internal types (<a href="https://redirect.github.com/astral-sh/ruff/issues/19121">#19121</a>)</li> <li><a href="1b813cd5f1"><code>1b813cd</code></a> Fix description of the <code>format.skip-magic-trailing-comma</code> example (<a href="https://redirect.github.com/astral-sh/ruff/issues/19095">#19095</a>)</li> <li><a href="b00f68a23c"><code>b00f68a</code></a> [<code>ruff</code>] Allow more <code>field</code> calls from <code>attrs</code> (<code>RUF009</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19021">#19021</a>)</li> <li><a href="710c60f713"><code>710c60f</code></a> [<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT023</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19104">#19104</a>)</li> <li><a href="811e25d16e"><code>811e25d</code></a> [<code>flake8-pytest-style</code>] Make example error out-of-the-box (<code>PT030</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19105">#19105</a>)</li> <li><a href="b78af2db48"><code>b78af2d</code></a> [<code>flake8-quotes</code>] Make example error out-of-the-box (<code>Q003</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19106">#19106</a>)</li> <li><a href="4f36f0677f"><code>4f36f06</code></a> Document link between <code>import-outside-top-level (PLC0415)</code> and `lint.flake8-t...</li> <li><a href="2589a2938e"><code>2589a29</code></a> [<code>flake8-simplify</code>] Make example error out-of-the-box (<code>SIM113</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19109">#19109</a>)</li> <li><a href="26bb8f7b71"><code>26bb8f7</code></a> [<code>flake8-simplify</code>] Make example error out-of-the-box (<code>SIM401</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/19110">#19110</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.12.1...0.12.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
411 lines
15 KiB
TOML
411 lines
15 KiB
TOML
[tool.towncrier]
|
|
package = "synapse"
|
|
filename = "CHANGES.md"
|
|
directory = "changelog.d"
|
|
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
|
|
|
|
[[tool.towncrier.type]]
|
|
directory = "feature"
|
|
name = "Features"
|
|
showcontent = true
|
|
|
|
[[tool.towncrier.type]]
|
|
directory = "bugfix"
|
|
name = "Bugfixes"
|
|
showcontent = true
|
|
|
|
[[tool.towncrier.type]]
|
|
directory = "docker"
|
|
name = "Updates to the Docker image"
|
|
showcontent = true
|
|
|
|
[[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
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
target-version = "py39"
|
|
|
|
[tool.ruff.lint]
|
|
# See https://beta.ruff.rs/docs/rules/#error-e
|
|
# for error codes. The ones we ignore are:
|
|
# E501: Line too long (black enforces this for us)
|
|
# E731: do not assign a lambda expression, use a def
|
|
#
|
|
# flake8-bugbear compatible checks. Its error codes are described at
|
|
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
|
|
# B023: Functions defined inside a loop must not use variables redefined in the loop
|
|
ignore = [
|
|
"B023",
|
|
"E501",
|
|
"E731",
|
|
]
|
|
select = [
|
|
# pycodestyle
|
|
"E",
|
|
"W",
|
|
# pyflakes
|
|
"F",
|
|
# isort
|
|
"I001",
|
|
# flake8-bugbear
|
|
"B0",
|
|
# flake8-comprehensions
|
|
"C4",
|
|
# flake8-2020
|
|
"YTT",
|
|
# flake8-slots
|
|
"SLOT",
|
|
# flake8-debugger
|
|
"T10",
|
|
# flake8-pie
|
|
"PIE",
|
|
# flake8-executable
|
|
"EXE",
|
|
# flake8-logging
|
|
"LOG",
|
|
# flake8-logging-format
|
|
"G",
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
combine-as-imports = true
|
|
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"]
|
|
known-first-party = ["synapse"]
|
|
|
|
[tool.ruff.lint.isort.sections]
|
|
twisted = ["twisted", "OpenSSL"]
|
|
testing = ["tests"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
skip-magic-trailing-comma = false
|
|
line-ending = "auto"
|
|
|
|
[tool.maturin]
|
|
manifest-path = "rust/Cargo.toml"
|
|
module-name = "synapse.synapse_rust"
|
|
|
|
[tool.poetry]
|
|
name = "matrix-synapse"
|
|
version = "1.133.0"
|
|
description = "Homeserver for the Matrix decentralised comms protocol"
|
|
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
|
license = "AGPL-3.0-or-later"
|
|
readme = "README.rst"
|
|
repository = "https://github.com/element-hq/synapse"
|
|
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" },
|
|
{ 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.poetry.build]
|
|
script = "build_rust.py"
|
|
generate-setup-file = true
|
|
|
|
[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]
|
|
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 }
|
|
|
|
[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.
|
|
# (if it is not installed, we fall back to slow code.)
|
|
redis = ["txredisapi", "hiredis"]
|
|
# Required to use experimental `caches.track_memory_usage` config option.
|
|
cache-memory = ["pympler"]
|
|
test = ["parameterized", "idna"]
|
|
|
|
# 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",
|
|
# oidc and jwt
|
|
"authlib",
|
|
# url-preview
|
|
"lxml",
|
|
# sentry
|
|
"sentry-sdk",
|
|
# opentracing
|
|
"jaeger-client", "opentracing",
|
|
# redis
|
|
"txredisapi", "hiredis",
|
|
# cache-memory
|
|
"pympler",
|
|
# 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]
|
|
# 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.
|
|
ruff = "0.12.2"
|
|
# Type checking only works with the pydantic.v1 compat module from pydantic v2
|
|
pydantic = "^2"
|
|
|
|
# Typechecking
|
|
lxml-stubs = ">=0.4.0"
|
|
mypy = "*"
|
|
mypy-zope = "*"
|
|
types-bleach = ">=4.1.0"
|
|
types-commonmark = ">=0.9.2"
|
|
types-jsonschema = ">=3.2.0"
|
|
types-netaddr = ">=0.8.0.6"
|
|
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"
|
|
idna = ">=2.5"
|
|
|
|
# The following are used by the release script
|
|
click = ">=8.1.3"
|
|
# GitPython was == 3.1.14; bumped to 3.1.20, the first release with type hints.
|
|
GitPython = ">=3.1.20"
|
|
commonmark = ">=0.9.1"
|
|
pygithub = ">=1.55"
|
|
# The following are executed as commands by the release script.
|
|
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]
|
|
# The upper bounds here are defensive, intended to prevent situations like
|
|
# 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.
|
|
# 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).
|
|
requires = ["poetry-core>=1.1.0,<=2.1.3", "setuptools_rust>=1.3,<=1.11.1"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
|
[tool.cibuildwheel]
|
|
# Skip unsupported platforms (by us or by Rust).
|
|
# See https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip for the list of build targets.
|
|
# We skip:
|
|
# - CPython 3.6, 3.7 and 3.8: EOLed
|
|
# - PyPy 3.7 and 3.8: we only support Python 3.9+
|
|
# - 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* cp38* pp37* pp38* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64"
|
|
# Enable non-default builds.
|
|
# "pypy" used to be included by default up until cibuildwheel 3.
|
|
enable = "pypy"
|
|
|
|
# We need a rust compiler.
|
|
#
|
|
# We temporarily pin Rust to 1.82.0 to work around
|
|
# https://github.com/element-hq/synapse/issues/17988
|
|
before-all = "sh .ci/before_build_wheel.sh"
|
|
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))'"
|
|
|
|
|
|
[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}"
|