Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3ad74b6

Browse files
authored
Specify tls extra for Twisted dependency. (#12444)
* Specify `tls` extra for Twisted dependency. It was already pulled in for us by `treq`, but we should be explicit that we do use the `tls` functionality of Twisted directly. * Mark `idna` as dev-dependency This doesn't actually change anything, as `Twisted[tls]` will put it in as a main dependency anyway.
1 parent 5f8173d commit 3ad74b6

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

changelog.d/12444.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Explicitly specify the `tls` extra for Twisted dependency.

poetry.lock

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

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,11 @@ canonicaljson = ">=1.4.0"
114114
# we use the type definitions added in signedjson 1.1.
115115
signedjson = ">=1.1.0"
116116
PyNaCl = ">=1.2.1"
117-
idna = ">=2.5"
118117
# validating SSL certs for IP addresses requires service_identity 18.1.
119118
service-identity = ">=18.1.0"
120119
# Twisted 18.9 introduces some logger improvements that the structured
121120
# logger utilises
122-
Twisted = ">=18.9.0"
121+
Twisted = {extras = ["tls"], version = ">=18.9.0"}
123122
treq = ">=15.1"
124123
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
125124
pyOpenSSL = ">=16.0.0"
@@ -180,6 +179,7 @@ txredisapi = { version = ">=1.4.7", optional = true }
180179
hiredis = { version = "*", optional = true }
181180
Pympler = { version = "*", optional = true }
182181
parameterized = { version = ">=0.7.4", optional = true }
182+
idna = { version = ">=2.5", optional = true }
183183

184184
[tool.poetry.extras]
185185
# NB: Packages that should be part of `pip install matrix-synapse[all]` need to be specified
@@ -201,7 +201,7 @@ jwt = ["pyjwt"]
201201
redis = ["txredisapi", "hiredis"]
202202
# Required to use experimental `caches.track_memory_usage` config option.
203203
cache_memory = ["pympler"]
204-
test = ["parameterized"]
204+
test = ["parameterized", "idna"]
205205

206206
# The duplication here is awful. I hate hate hate hate hate it. However, for now I want
207207
# to ensure you can still `pip install matrix-synapse[all]` like today. Two motivations:
@@ -266,6 +266,7 @@ types-setuptools = ">=57.4.0"
266266
# parameterized<0.7.4 can create classes with names that would normally be invalid
267267
# identifiers. trial really does not like this when running with multiple workers.
268268
parameterized = ">=0.7.4"
269+
idna = ">=2.5"
269270

270271
# The following are used by the release script
271272
click = "==8.1.0"
@@ -280,4 +281,4 @@ towncrier = ">=18.6.0rc1"
280281

281282
[build-system]
282283
requires = ["setuptools"]
283-
build-backend = "setuptools.build_meta"
284+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def exec_file(path_segments):
120120
# Tests assume that all optional dependencies are installed.
121121
#
122122
# parameterized_class decorator was introduced in parameterized 0.7.0
123-
CONDITIONAL_REQUIREMENTS["test"] = ["parameterized>=0.7.0"]
123+
CONDITIONAL_REQUIREMENTS["test"] = ["parameterized>=0.7.0", "idna>=2.5"]
124124

125125
CONDITIONAL_REQUIREMENTS["dev"] = (
126126
CONDITIONAL_REQUIREMENTS["lint"]

synapse/python_dependencies.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@
5050
# we use the type definitions added in signedjson 1.1.
5151
"signedjson>=1.1.0",
5252
"pynacl>=1.2.1",
53-
"idna>=2.5",
5453
# validating SSL certs for IP addresses requires service_identity 18.1.
5554
"service_identity>=18.1.0",
5655
# Twisted 18.9 introduces some logger improvements that the structured
5756
# logger utilises
58-
"Twisted>=18.9.0",
57+
"Twisted[tls]>=18.9.0",
5958
"treq>=15.1",
6059
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
6160
"pyopenssl>=16.0.0",

0 commit comments

Comments
 (0)