mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 08:43:27 +00:00
Remove remaining references to lxml python dependency, which is no longer required (#20356)
This commit is contained in:
1 parent
542554c093
commit
98735bc6db
7 files changed
+16
-28
No files matched your search
@@ -0,0 +1 @@
|
||||
Remove unused `lxml` packaging and type-stub dependencies, and update URL-preview tests to check for BeautifulSoup instead.
|
||||
Vendored
-1
@@ -53,7 +53,6 @@ dh_virtualenv \
|
||||
--builtin-venv \
|
||||
--python "$SNAKE" \
|
||||
--upgrade-pip \
|
||||
--preinstall="lxml" \
|
||||
--preinstall="mock" \
|
||||
--preinstall="wheel" \
|
||||
--extra-pip-arg="--no-deps" \
|
||||
|
||||
Vendored
+6
@@ -1,3 +1,9 @@
|
||||
matrix-synapse-py3 (1.163.0+unreleased1) UNRELEASED; urgency=medium
|
||||
|
||||
* Stop preinstalling the unused Python lxml package.
|
||||
|
||||
-- Synapse Packaging team <packages@matrix.org> Wed, 14 Oct 2026 11:30:04 +0100
|
||||
|
||||
matrix-synapse-py3 (1.163.0) stable; urgency=medium
|
||||
|
||||
* New synapse release 1.163.0.
|
||||
|
||||
Generated
+4
-20
@@ -1247,22 +1247,6 @@ files = [
|
||||
{file = "librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lxml-stubs"
|
||||
version = "0.5.1"
|
||||
description = "Type annotations for the lxml package"
|
||||
optional = true
|
||||
python-versions = "*"
|
||||
groups = ["main"]
|
||||
markers = "extra == \"saml2\" or extra == \"all\""
|
||||
files = [
|
||||
{file = "lxml-stubs-0.5.1.tar.gz", hash = "sha256:e0ec2aa1ce92d91278b719091ce4515c12adc1d564359dfaf81efa7d4feab79d"},
|
||||
{file = "lxml_stubs-0.5.1-py3-none-any.whl", hash = "sha256:1f689e5dbc4b9247cb09ae820c7d34daeb1fdbd1db06123814b856dae7787272"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
test = ["coverage[toml] (>=7.2.5)", "mypy (>=1.2.0)", "pytest (>=7.3.0)", "pytest-mypy-plugins (>=1.10.1)"]
|
||||
|
||||
[[package]]
|
||||
name = "markdown-it-py"
|
||||
version = "4.0.0"
|
||||
@@ -1972,7 +1956,7 @@ files = [
|
||||
{file = "pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992"},
|
||||
{file = "pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29"},
|
||||
]
|
||||
markers = {main = "implementation_name != \"PyPy\"", dev = "implementation_name != \"PyPy\" and platform_python_implementation != \"PyPy\""}
|
||||
markers = {main = "implementation_name != \"PyPy\"", dev = "platform_python_implementation != \"PyPy\" and implementation_name != \"PyPy\""}
|
||||
|
||||
[[package]]
|
||||
name = "pydantic"
|
||||
@@ -3645,7 +3629,7 @@ docs = ["Sphinx", "repoze.sphinx.autointerface"]
|
||||
test = ["zope.i18nmessageid", "zope.testing", "zope.testrunner (>=6.4)"]
|
||||
|
||||
[extras]
|
||||
all = ["authlib", "beautifulsoup4", "defusedxml", "hiredis", "jaeger-client", "lxml-stubs", "matrix-synapse-ldap3", "opentracing", "psycopg2", "psycopg2cffi", "psycopg2cffi-compat", "pympler", "pysaml2", "pytz", "sentry-sdk", "thrift", "tornado", "txredisapi"]
|
||||
all = ["authlib", "beautifulsoup4", "defusedxml", "hiredis", "jaeger-client", "matrix-synapse-ldap3", "opentracing", "psycopg2", "psycopg2cffi", "psycopg2cffi-compat", "pympler", "pysaml2", "pytz", "sentry-sdk", "thrift", "tornado", "txredisapi"]
|
||||
cache-memory = ["pympler"]
|
||||
jwt = ["authlib"]
|
||||
matrix-synapse-ldap3 = ["matrix-synapse-ldap3"]
|
||||
@@ -3653,7 +3637,7 @@ oidc = ["authlib"]
|
||||
opentracing = ["jaeger-client", "opentracing", "thrift", "tornado"]
|
||||
postgres = ["psycopg2", "psycopg2cffi", "psycopg2cffi-compat"]
|
||||
redis = ["hiredis", "txredisapi"]
|
||||
saml2 = ["defusedxml", "lxml-stubs", "pysaml2", "pytz"]
|
||||
saml2 = ["defusedxml", "pysaml2", "pytz"]
|
||||
sentry = ["sentry-sdk"]
|
||||
test = ["idna", "parameterized"]
|
||||
url-preview = ["beautifulsoup4"]
|
||||
@@ -3661,4 +3645,4 @@ url-preview = ["beautifulsoup4"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.10.0,<4.0.0"
|
||||
content-hash = "6e8f0d223b61ab7c100236797f0ec1eed7f23b819c01c117fe445c6b1e91bbfc"
|
||||
content-hash = "ae436463df1256bff83762dfd3871e58682c3d6e67f622b3c2b5f5cfa25ce475"
|
||||
@@ -128,7 +128,6 @@ postgres = [
|
||||
]
|
||||
saml2 = [
|
||||
"pysaml2>=4.5.0",
|
||||
"lxml-stubs>=0.4.0",
|
||||
|
||||
# Transitive dependencies from pysaml2
|
||||
# These dependencies aren't directly required by Synapse.
|
||||
@@ -187,7 +186,6 @@ all = [
|
||||
"psycopg2cffi-compat==1.1;platform_python_implementation == 'PyPy'",
|
||||
# saml2
|
||||
"pysaml2>=4.5.0",
|
||||
"lxml-stubs>=0.4.0",
|
||||
# oidc and jwt
|
||||
"authlib>=0.15.1",
|
||||
# url-preview
|
||||
|
||||
@@ -32,9 +32,9 @@ from tests import unittest
|
||||
from tests.unittest import override_config, skip_unless
|
||||
|
||||
try:
|
||||
import lxml
|
||||
import bs4
|
||||
except ImportError:
|
||||
lxml = None # type: ignore[assignment]
|
||||
bs4 = None # type: ignore[assignment]
|
||||
|
||||
|
||||
class CapabilitiesTestCase(unittest.HomeserverTestCase):
|
||||
@@ -336,7 +336,7 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
|
||||
self.assertEqual(channel.code, HTTPStatus.OK)
|
||||
self.assertFalse(capabilities["m.preview_url"]["enabled"])
|
||||
|
||||
@skip_unless(lxml is not None, "Requires lxml")
|
||||
@skip_unless(bs4 is not None, "Requires beautifulsoup4")
|
||||
@override_config(
|
||||
{
|
||||
"url_preview_enabled": True,
|
||||
@@ -372,7 +372,7 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
|
||||
self.assertFalse(capabilities["io.element.msc4452.preview_url"]["enabled"])
|
||||
self.assertFalse(capabilities["m.preview_url"]["enabled"])
|
||||
|
||||
@skip_unless(lxml is not None, "Requires lxml")
|
||||
@skip_unless(bs4 is not None, "Requires beautifulsoup4")
|
||||
@override_config(
|
||||
{
|
||||
"url_preview_enabled": True,
|
||||
|
||||
@@ -1605,7 +1605,7 @@ class URLPreviewTests(unittest.HomeserverTestCase):
|
||||
|
||||
|
||||
# We test this here because this endpoint must still work
|
||||
# even if lxml is not installed.
|
||||
# even if beautifulsoup4 is not installed.
|
||||
class URLPreviewDisabledTests(unittest.HomeserverTestCase):
|
||||
servlets = [
|
||||
admin.register_servlets,
|
||||
|
||||
Reference in new issue
Block a user