0001-setup.py-remove-the-U-open-mode-removed-in-Python-3..patch 1.4 KB

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