SwordArMor-gentoo-overlay/net-im/weechat-matrix/files/weechat-matrix-0.3.0-ssl_set_npn_protocols.patch

28 lines
991 B
Diff

From 4e585d5f4628e6fbeba9ec4560b440d731e076f5 Mon Sep 17 00:00:00 2001
From: Jonas Witschel <diabonas@archlinux.org>
Date: Sat, 11 Dec 2021 19:47:16 +0100
Subject: [PATCH] server: remove set_npn_protocols()
This function is deprecated in favour of set_alpn_protocols(), which is already
called, and is currently broken in Python 3.10, so remove it altogether.
---
matrix/server.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/matrix/server.py b/matrix/server.py
index dda861e..0f34c1e 100644
--- a/matrix/server.py
+++ b/matrix/server.py
@@ -303,11 +303,6 @@ def __init__(self, name, config_ptr):
# Enable http2 negotiation on the ssl context.
self.ssl_context.set_alpn_protocols(["h2", "http/1.1"])
- try:
- self.ssl_context.set_npn_protocols(["h2", "http/1.1"])
- except NotImplementedError:
- pass
-
self.address = None
self.homeserver = None
self.client = None # type: Optional[HttpClient]