diff --git a/0000-fix-big-endian-issues.patch b/0000-fix-big-endian-issues.patch new file mode 100644 index 0000000..7f11c4f --- /dev/null +++ b/0000-fix-big-endian-issues.patch @@ -0,0 +1,33 @@ +Author: Michael R. Crusoe +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 +@@ -51,7 +51,7 @@ + + + class YAML: +- def __init__(self, *, typ=None, pure=False, output=None, plug_ins=None): # input=None, ++ def __init__(self, *, typ=None, pure=None, output=None, plug_ins=None): # input=None, + # type: (Any, Optional[Text], Any, Any, Any) -> None + """ + typ: 'rt'/None -> RoundTripLoader/RoundTripDumper, (default) +@@ -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 diff --git a/python-ruamel.yaml.changes b/python-ruamel.yaml.changes index 4b8e22d..0647980 100644 --- a/python-ruamel.yaml.changes +++ b/python-ruamel.yaml.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 28 15:21:16 UTC 2022 - Jan Baier + +- add 0000-fix-big-endian-issues.patch to workaround issue 360 on big endian systems + ------------------------------------------------------------------- Mon Jan 10 22:47:40 UTC 2022 - Dirk Müller @@ -21,17 +26,17 @@ Sat Oct 16 22:32:20 UTC 2021 - Dirk Müller - fix issue 397, insert comment before key when a comment between key and value exists - fix issue 396, inserting key/val in merged-in dictionary - minor fix in attr handling - - fix issue with anchor on registered class not preserved and those classes using package + - fix issue with anchor on registered class not preserved and those classes using package attrs with `@attr.s()` - fix error baseclass for ``DuplicateKeyErorr`` (reported by `Łukasz Rogalski - - fix typo in reader error message, causing `KeyError` during reader error - + - fix typo in reader error message, causing `KeyError` during reader error + ------------------------------------------------------------------- Sat Jul 17 13:53:25 UTC 2021 - Dirk Müller - update to 0.17.10: - fix issue 388, token with old comment structure != two elements - - fix issue with updating CommentedMap + - fix issue with updating CommentedMap - fix for issue 387 where templated anchors on tagged object did get set resulting in potential id reuse. - issue 385 also affected other deprecated loaders @@ -39,7 +44,7 @@ Sat Jul 17 13:53:25 UTC 2021 - Dirk Müller - deprecated round_trip_loader function not working - wasted a few hours getting rid of mypy warnings/errors - fix for issue 384 !!set with aliased entry resulting in broken YAML on rt - + ------------------------------------------------------------------- Sun May 2 14:52:46 UTC 2021 - Matthias Fehring @@ -95,12 +100,12 @@ Fri Sep 6 06:54:38 UTC 2019 - Ondřej Súkup * move setting of version based on YAML directive to scanner, allowing to check for file version during TAG directive scanning * preserve YAML and TAG directives on roundtrip, correctly output # in URL - for YAML 1.2 + for YAML 1.2 ------------------------------------------------------------------- Mon Aug 12 12:37:27 UTC 2019 - Ondřej Súkup -- ruamel.yaml.clib is now harddep +- ruamel.yaml.clib is now harddep ------------------------------------------------------------------- Thu Aug 8 13:27:29 UTC 2019 - Ondřej Súkup @@ -224,7 +229,7 @@ Fri Aug 31 10:53:13 UTC 2018 - Ondřej Súkup - update to 0.15.64 * support round-trip of tagged sequences: !Arg [a, {b: 1}] - * fix issue when roundtripping floats starting with a dot such as .5 + * fix issue when roundtripping floats starting with a dot such as .5 * C based reader/scanner & emitter now allow setting of 1.2 as YAML version ------------------------------------------------------------------- @@ -240,7 +245,7 @@ Tue Aug 28 13:20:10 UTC 2018 - mimi.vx@gmail.com * fix issue with python -O optimizing away code * unmade CommentedSeq a subclass of list. * fix issue where a comment could pop-up twice in the output - * fix issue where JSON object (mapping) without spaces was not parsed properly + * fix issue where JSON object (mapping) without spaces was not parsed properly * ix issue where comments after empty flow-style mappings were not emitted * fix issue with flow style mapping with comments gobbled newline * fix issue where single ‘+’ under YAML 1.2 was interpreted as integer, erroring out @@ -302,7 +307,7 @@ Thu Oct 12 11:59:03 UTC 2017 - mimi.vx@gmail.com * allow setting of boolean representation (false, true) by using: yaml.boolean_representation = [u'False', u'True'] * fix for round_tripping integers on 2.7.X > sys.maxint - * fix for round_tripping singe excl. mark tags doubling + * fix for round_tripping singe excl. mark tags doubling * fix for writing unicode in new API, * added object constructor for rt, decorator yaml_object to replace YAMLObject. * fix for problem using load_all with Path() instance diff --git a/python-ruamel.yaml.spec b/python-ruamel.yaml.spec index 7a7ef11..e88d061 100644 --- a/python-ruamel.yaml.spec +++ b/python-ruamel.yaml.spec @@ -25,6 +25,7 @@ License: MIT Group: Development/Languages/Python URL: https://sourceforge.net/p/ruamel-yaml Source: https://files.pythonhosted.org/packages/source/r/ruamel.yaml/ruamel.yaml-%{version}.tar.gz +Patch0: 0000-fix-big-endian-issues.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -38,6 +39,7 @@ of comments, seq/map flow style, and map key order. %prep %setup -q -n ruamel.yaml-%{version} +%patch0 -p1 rm -rf *egg-info %build