- adapt patch 0000-fix-big-endian-issues.patch - update to 0.17.26 OBS-URL: https://build.opensuse.org/request/show/1087670 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruamel.yaml?expand=0&rev=67
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
Author: Michael R. Crusoe <crusoe@debian.org>
|
|
Description: Default to pure python parsing on big endian systems
|
|
Forwarded: not-needed
|
|
|
|
As the cpython code has an endianness bug https://sourceforge.net/p/ruamel-yaml/tickets/360/
|
|
|
|
Thanks to Rebecca N. Palmer for the tip about sys.byteorder!
|
|
|
|
Index: ruamel.yaml/main.py
|
|
===================================================================
|
|
--- ruamel.yaml.orig/main.py 2021-10-14 00:10:27.265523204 +0200
|
|
+++ ruamel.yaml/main.py 2021-10-14 00:11:02.469504291 +0200
|
|
@@ -55,7 +55,7 @@
|
|
self: Any,
|
|
*,
|
|
typ: Optional[Union[List[Text], Text]] = None,
|
|
- pure: Any = False,
|
|
+ pure: Any = None,
|
|
output: Any = None,
|
|
plug_ins: Any = None,
|
|
) -> None: # input=None,
|
|
@@ -64,6 +64,11 @@
|
|
"""
|
|
|
|
self.typ = ['rt'] if typ is None else (typ if isinstance(typ, list) else [typ])
|
|
+ if pure is None:
|
|
+ if sys.byteorder == 'big':
|
|
+ pure = True
|
|
+ else:
|
|
+ pure = False
|
|
self.pure = pure
|
|
|
|
# self._input = input
|