From cbf90c2ab023d0c971cde6779464114a2b8713c5ca10b15d4ccc4630555e4041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 29 Sep 2025 08:59:13 +0000 Subject: [PATCH] - Update to 0.12.1 * Fix #94, where objects returned from a custom encoder were not being indented properly. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-json5?expand=0&rev=31 --- .gitattributes | 23 +++++++ .gitignore | 1 + pyjson5-0.12.0.tar.gz | 3 + pyjson5-0.12.1.tar.gz | 3 + python-json5.changes | 156 ++++++++++++++++++++++++++++++++++++++++++ python-json5.spec | 93 +++++++++++++++++++++++++ 6 files changed, 279 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyjson5-0.12.0.tar.gz create mode 100644 pyjson5-0.12.1.tar.gz create mode 100644 python-json5.changes create mode 100644 python-json5.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pyjson5-0.12.0.tar.gz b/pyjson5-0.12.0.tar.gz new file mode 100644 index 0000000..1924e29 --- /dev/null +++ b/pyjson5-0.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39b21785fc12c61716a3634b466e3faffc5c679148c2d9cbbef9cc0c15772b6f +size 424039 diff --git a/pyjson5-0.12.1.tar.gz b/pyjson5-0.12.1.tar.gz new file mode 100644 index 0000000..b516784 --- /dev/null +++ b/pyjson5-0.12.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c729b79398a116a9eec40c71d8ad84e0e9e52d502377639d7ca67dd630266674 +size 424290 diff --git a/python-json5.changes b/python-json5.changes new file mode 100644 index 0000000..bde15d3 --- /dev/null +++ b/python-json5.changes @@ -0,0 +1,156 @@ +------------------------------------------------------------------- +Mon Sep 29 07:13:11 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 0.12.1 + * Fix #94, where objects returned from a custom encoder were + not being indented properly. + +------------------------------------------------------------------- +Sun Jun 8 22:42:48 UTC 2025 - Georg Pfuetzenreuter + +- update to 0.12.0 + * jump several versions with meta/test changes + * from 0.11.0: + * Fix a typing issue in dump and dumps with the cls argument + * Introduce a new parse method + * Fix #60 - parsing '--6.0' incorrectly + * from 0.10.1: + * Add custom encoding to dump/dumps + +------------------------------------------------------------------- +Wed Nov 13 15:22:09 UTC 2024 - Dirk Müller + +- update to 0.9.28: + * Fix GitHub CI to install uv so ./run tests works properly. + * Mark Python3.13 as supported in package metadata. + * Update dev package dependencies + * Fix typo in //README.md + * GitHub issue #82 Add support for the strict parameter to + load()/loads(). + * Significantly rework the infra and the run script to be + contemporary. + +------------------------------------------------------------------- +Mon Apr 15 06:16:21 UTC 2024 - Dirk Müller + +- update to 0.9.25: + * Explicitly specify the directory to use for the package in + pyproject.toml. + +------------------------------------------------------------------- +Mon Mar 25 20:18:38 UTC 2024 - Dirk Müller + +- update to 0.9.24: + * drop python2 + * switch to pyproject.toml + * add typing + * format with ruff + +------------------------------------------------------------------- +Mon Nov 27 19:03:15 UTC 2023 - Dirk Müller + +- update to 0.9.14: + * Handle `+Infinity` as well as `-Infinity` and `Infinity`. + +------------------------------------------------------------------- +Sun Mar 26 19:22:31 UTC 2023 - Dirk Müller + +- update to 0.9.13: + * Remove a field from one of the JSON benchmark files to + reduce confusion in Chromium. + * No code changes. + +------------------------------------------------------------------- +Wed Jan 4 19:58:43 UTC 2023 - Dirk Müller + +- update to 0.9.12: + * fix dump error on python 2 + * fix GitHub actions + +------------------------------------------------------------------- +Sat Sep 24 10:54:29 UTC 2022 - Dirk Müller + +- update to 0.9.10: + * Updated the //README.md to be clear that parsing arbitrary JS + code may not work. + * Fixed serialization for objects that subclass `int` or `float`: + Previously we would use the objects __str__ implementation, but + that might result in an illegal JSON5 value if the object had + customized __str__ to return something illegal. Instead, + we follow the lead of the `JSON` module and call `int.__repr__` + or `float.__repr__` directly. + * While I was at it, I added tests for dumps(-inf) and dumps(nan) + when those were supposed to be disallowed by `allow_nan=False`. + +------------------------------------------------------------------- +Sun May 29 20:17:37 UTC 2022 - Dirk Müller + +- update to 0.9.8: + * Fixed error reporting in some cases due to how parsing was handling + nested rules in the grammar - previously the reported location for + the error could be far away from the point where it actually happened. + * Fixed behavior of `default` fn in `dump` and `dumps`. Previously + we didn't require the function to return a string, and so we could + end up returning something that wasn't actually valid. This change + now matches the behavior in the `json` module. + +------------------------------------------------------------------- +Tue Oct 5 16:04:01 UTC 2021 - Stefan Schubert + +- Added BuildRequires: alts + +------------------------------------------------------------------- +Fri Oct 1 08:16:33 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + +------------------------------------------------------------------- +Tue Jun 22 08:52:38 UTC 2021 - Paolo Stivanin + +- Update to 0.9.6 + * Bump development status classifier to 5 - Production/Stable + * Bump the tested Python versions to 2.7, 3.8 and 3.9 + * GitHub issue #46 Fix incorrect serialization of custom subtypes + * Make it possible to run the tests if hypothesis isn't installed. + * Miscellaneous non-source cleanups in the repo + +------------------------------------------------------------------- +Mon May 25 10:59:34 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Thu Apr 16 11:47:01 UTC 2020 - pgajdos@suse.com + +- version update to 0.9.4 + * v0.9.4 (2020-03-26) + * [GitHub pull #38](https://github.com/dpranke/pyjson5/pull/38) + Fix from fredrik@fornwall.net for dumps() crashing when passed + an empty string as a key in an object. + * v0.9.3 (2020-03-17) + * [GitHub pull #35](https://github.com/dpranke/pyjson5/pull/35) + Fix from pastelmind@ for dump() not passing the right args to dumps(). + * Fix from p.skouzos@novafutur.com to remove the tests directory from + the setup call, making the package a bit smaller. + * v0.9.2 (2020-03-02) + * [GitHub pull #34](https://github.com/dpranke/pyjson5/pull/34) + Fix from roosephu@ for a badly formatted nested list. + * v0.9.1 (2020-02-09) + * [GitHub issue #33](https://github.com/dpranke/pyjson5/issues/33): + Fix stray trailing comma when dumping an object with an invalid key. + * v0.9.0 (2020-01-30) + * [GitHub issue #29](https://github.com/dpranke/pyjson5/issues/29): + Fix an issue where objects keys that started with a reserved + word were incorrectly quoted. + * [GitHub issue #30](https://github.com/dpranke/pyjson5/issues/30): + Fix an issue where dumps() incorrectly thought a data structure + was cyclic in some cases. + * [GitHub issue #32](https://github.com/dpranke/pyjson5/issues/32): + Allow for non-string keys in dicts passed to ``dump()``/``dumps()``. + Add an ``allow_duplicate_keys=False`` to prevent possible + ill-formed JSON that might result. + +------------------------------------------------------------------- +Mon Jul 29 02:39:50 UTC 2019 - Todd R + +- Initial version diff --git a/python-json5.spec b/python-json5.spec new file mode 100644 index 0000000..c65b334 --- /dev/null +++ b/python-json5.spec @@ -0,0 +1,93 @@ +# +# spec file for package python-json5 +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + +%{?sle15_python_module_pythons} +Name: python-json5 +Version: 0.12.1 +Release: 0 +Summary: A Python implementation of the JSON5 data format +License: Apache-2.0 +Group: Development/Languages/Python +URL: https://github.com/dpranke/pyjson5 +Source: https://github.com/dpranke/pyjson5/archive/v%{version}.tar.gz#/pyjson5-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros >= 20210929 +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +BuildArch: noarch +%python_subpackages + +%description +A Python implementation of the JSON5 data format. + +JSON5 extends the JSON data interchange format to make it +slightly more usable as a configuration language: + + * JavaScript-style comments (both single and multi-line) are legal. + * Object keys may be unquoted if they are legal ECMAScript identifiers + * Objects and arrays may end with trailing commas. + * Strings can be single-quoted, and multi-line string literals are allowed. + +%prep +%setup -q -n pyjson5-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/pyjson5 +%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative pyjson5 + +%post +%python_install_alternative pyjson5 + +%postun +%python_uninstall_alternative pyjson5 + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/pyjson5 +%{python_sitelib}/json5 +%{python_sitelib}/json5-%{version}.dist-info + +%changelog