Skip to content

Commit 4515cc5

Browse files
committed
Modernise dependencies, remove stale stubs
1 parent 3348149 commit 4515cc5

File tree

3 files changed

+29
-84
lines changed

3 files changed

+29
-84
lines changed

pyproject.toml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ classifiers = [
1313
]
1414

1515
dependencies = [
16-
"attrs>=19.1.0",
16+
"attrs>=22.1.0",
1717
"jinja2>=3.0.0",
1818
"matrix-common>=1.1.0,<2",
19-
"netaddr>=0.7.0",
19+
"netaddr>=0.8.0",
2020
"phonenumbers>=8.12.32",
21-
"prometheus-client>=0.4.0",
22-
"pynacl>=1.2.1",
23-
"pyOpenSSL>=16.0.0",
24-
"pyyaml>=3.11",
25-
"service-identity>=1.0.0",
21+
"prometheus-client>=0.14.0",
22+
"pynacl>=1.5.0",
23+
"pyOpenSSL>=22.0.0",
24+
"pyyaml>=6.0",
25+
"service-identity>=21.1.0",
2626
"signedjson==1.1.1",
2727
"sortedcontainers>=2.1.0",
28-
"twisted>=18.4.0,<25",
28+
"twisted>=22.10.0,<25",
2929
"unpaddedbase64>=1.1.0",
30-
"zope.interface>=4.6.0",
30+
"zope.interface>=5.0.0",
3131
]
3232

3333
[project.optional-dependencies]
34-
sentry = ["sentry-sdk>=0.7.2"]
35-
prometheus = ["prometheus-client>=0.4.0"]
34+
sentry = ["sentry-sdk>=1.0.0"]
35+
prometheus = ["prometheus-client>=0.14.0"]
3636

3737
[project.scripts]
3838
sydent = "sydent.sydent:main"
@@ -48,10 +48,7 @@ dev = [
4848
"mypy-zope>=0.3.1",
4949
"parameterized==0.8.1",
5050
"sentry-sdk",
51-
"types-Jinja2==2.11.9",
52-
"types-mock==4.0.8",
53-
"types-PyOpenSSL==21.0.3",
54-
"types-PyYAML==6.0.3",
51+
"types-PyYAML>=6.0.3",
5552
"towncrier>=21.9.0",
5653
]
5754

sydent/http/servlets/replication.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ def render_POST(self, request: Request) -> JsonDict:
4646
peerCert = cast(X509, request.transport.getPeerCertificate())
4747
peerCertCn = peerCert.get_subject().commonName
4848

49+
if peerCertCn is None:
50+
raise MatrixRestError(
51+
403, "M_UNKNOWN_PEER", "Peer certificate has no commonName"
52+
)
53+
4954
peerStore = PeerStore(self.sydent)
5055

5156
peer = peerStore.getPeerByName(peerCertCn)

uv.lock

Lines changed: 12 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)