1From df6126ee86c1f84c7e0c25fcf69543b83b1b32c6 Mon Sep 17 00:00:00 2001
2From: Julien Olivain <ju.o@free.fr>
3Date: Sat, 5 Nov 2022 13:06:07 +0100
4Subject: [PATCH] setup.py: remove the 'U' open mode removed in Python 3.11
5
6The 'U' open mode was removed in Python 3.11. See:
7https://docs.python.org/3.11/library/functions.html#open
8
9Installing with Python 3.11 fails with:
10
11    /path/to/python-magic-wormhole-mailbox-server-0.4.1/setup.py", line 20, in <module>
12        long_description=open('README.md', 'rU').read(),
13                         ^^^^^^^^^^^^^^^^^^^^^^^
14    ValueError: invalid mode: 'rU'
15
16This patch removes the 'U' open mode.
17
18Upstream: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/commit/df6126ee86c1f84c7e0c25fcf69543b83b1b32c6
19Signed-off-by: Julien Olivain <ju.o@free.fr>
20---
21 setup.py | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/setup.py b/setup.py
25index 6ef292f..ad9ff5a 100644
26--- a/setup.py
27+++ b/setup.py
28@@ -17,7 +17,7 @@ trove_classifiers = [
29 setup(name="magic-wormhole-mailbox-server",
30       version=versioneer.get_version(),
31       description="Securely transfer data between computers",
32-      long_description=open('README.md', 'rU').read(),
33+      long_description=open('README.md', 'r').read(),
34       long_description_content_type='text/markdown',
35       author="Brian Warner",
36       author_email="warner-magic-wormhole@lothar.com",
37--
382.38.1
39
40