From d1f77fb306a05fc9174f87ffd6a5866beb2fc246b3f6ffac9dcff45095401312 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 12 Jun 2025 05:10:08 +0000 Subject: [PATCH] - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ujson?expand=0&rev=53 --- .gitattributes | 23 ++++ .gitignore | 1 + python-ujson.changes | 300 +++++++++++++++++++++++++++++++++++++++++++ python-ujson.spec | 66 ++++++++++ ujson-5.10.0.tar.gz | 3 + 5 files changed, 393 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-ujson.changes create mode 100644 python-ujson.spec create mode 100644 ujson-5.10.0.tar.gz 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/python-ujson.changes b/python-ujson.changes new file mode 100644 index 0000000..dcbb8b0 --- /dev/null +++ b/python-ujson.changes @@ -0,0 +1,300 @@ +------------------------------------------------------------------- +Thu Jun 12 05:01:35 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Thu Jun 13 15:43:08 UTC 2024 - Dirk Müller + +- update to 5.10.0: + * Add support for Python 3.13 (#628) @hugovk + +------------------------------------------------------------------- +Wed Dec 13 10:14:23 UTC 2023 - Dirk Müller + +- update to 5.9.0: + * Raise TypeError if toDict() returns a non-dict instead of + silently converting it to null (#615) @eltoder + * Use lowercase strings for bool dict keys (#614) @eltoder + * Deploy to PyPI using trusted publishing (#603) @hugovk + * Replace PyPy3.8 wheel with PyPy3.10 (#602) @hugovk + * Speed-up and cleanup objToJSON (#615) @eltoder + * Use lowercase strings for bool dict keys (#614) @eltoder + +------------------------------------------------------------------- +Wed Jul 19 07:08:39 UTC 2023 - ecsos + +- %{?sle15_python_module_pythons} must at begnning to work. + +------------------------------------------------------------------- +Sat Jul 8 20:35:13 UTC 2023 - Arun Persaud + +- update to version 5.8.0: + * Added + + Build wheel for Python 3.12 beta (built against 3.12.0b2) (#594) + @hugovk + * Changed + + Drop support for Python 3.7 (#595) @hugovk + * Fixed + + Include BSD-3-Clause and TCL license text (#584) @musicinmybrain + +------------------------------------------------------------------- +Sat Jun 10 17:33:30 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Mon Mar 27 10:04:29 UTC 2023 - Dirk Müller + +- update to 5.7.0: + * Support ujson.loads(bytearray(...)) and other bytes-like + objects. + +------------------------------------------------------------------- +Wed Dec 7 22:34:15 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 5.6.0 + * Added + Update vendored double-conversion to 3.2.1 (#570) @joemarshall + * Fixed + Fix len integer overflow issue (#567) @marioga + +------------------------------------------------------------------- +Sat Sep 17 15:58:07 UTC 2022 - Arun Persaud + +- update to version 5.5.0: + * Added + + Add support for Python 3.11 and PyPy3.9 (#564) @hugovk + + Add separators encoding parameter (#557) @JustAnotherArchivist + * Fixed + + Fix encoding of infinity (#80). (#562) @bwoodsend + +------------------------------------------------------------------- +Fri Jul 8 11:55:32 UTC 2022 - Dirk Müller + +- update to 5.4.0 (CVE-2022-31116, bsc#1201255, CVE-2022-31117, bsc#1201254): + * Replace wchar_t string decoding implementation with a uint32_t-based one + * Fix handling of surrogates on decoding + * CVE-2022-31117: Potential double free of buffer during string decoding + * Fix memory leak on encoding errors when the buffer was resized + * Integer parsing: always detect overflows + * Fix handling of surrogates on encoding + +------------------------------------------------------------------- +Tue May 24 16:34:36 UTC 2022 - Gayane Osipyan + +- update to version 5.3.0 + * Test Python 3.11 beta (#539) @hugovk + * Benchmark refactor - argparse CLI (#533) @Erotemic + * Fix segmentation faults when errors occur while handling unserialisable objects (#531) @JustAnotherArchivist + * Fix segmentation fault when an exception is raised while converting a dict key to a string (#526) @JustAnotherArchivist + * Fix memory leak dumping on non-string dict keys (#521) @JustAnotherArchivist + * Fix ref counting on repeated default function calls (#524) @JustAnotherArchivist + * Remove redundant wheel dependency from pyproject.toml (#535) @hugovk +- Release 5.2.0 + * Support parsing NaN, Infinity and -Infinity (#514) @Erotemic + * Support dynamically linking against system double-conversion library (#508) @musicinmybrain + * Add env var to control stripping debug info (#507) @musicinmybrain + * Add JSONDecodeError (#498) @JustAnotherArchivist + * Fix buffer overflows (CVE-2021-45958, bsc#1194261) (#519) @JustAnotherArchivist + * Upgrade Black to fix Click (#515) @hugovk + * simplify exception handling on integer overflow (#510) @RouquinBlanc + * Remove dead code that used to handle the separate int type in Python 2 (#509) @JustAnotherArchivist + * Fix exceptions on encoding list or dict elements and non-overflow errors on int handling getting silenced (#505) @JustAnotherArchivist +- Release 5.1.0 + * Strip debugging symbols from Linux binaries (#493) @bwoodsend +- Release 5.0.0 + * Use cibuildwheel to build wheels (#491) @bwoodsend + * Drop support for soon-EOL Python 3.6 (#490) @hugovk + * Install Twine to upload to PyPI (#492) @hugovk +- Remove python-ujson-system-double-conversion.patch (upstreamed) + +------------------------------------------------------------------- +Sat Dec 11 18:15:20 UTC 2021 - Ben Greiner + +- update to 4.3.0 + * Enable Windows on ARM64 target (#488) @nsait-linaro +- Release 4.2.0 + * Add a default keyword argument to dumps (#470) @garenchan + * Add support for Python 3.10 (#472) @hugovk + * Build 32-bit wheels for Windows (#481) @hugovk + * Build PyPy3 wheels for manylinux (#475) @hugovk + * Build wheels for musl aarch64 (aka ARM) Linux + (musllinux_1_1_aarch64) (#478) @bwoodsend + * Build wheels for musl Linux (musllinux_1_1_x86_64) (#476) + @bwoodsend + * Use declarative setup metadata (#477) @hugovk + * Wheel building updates (#473) @hugovk + * Rename master to main (#471) @hugovk + * Replace README.rst with Markdown (#479) @hugovk +- Release 4.1.0 + * Add gcov coverage testing for C code (#457) @bwoodsend + * Test Python 3.10-dev (#454) @hugovk + * Remove unused variable (#459) @hugovk + * Remove explicit handling of manylinux platform tag (#452) + @bwoodsend + * dconv no longer uses global instances of + StringToDoubleConverter and (#469) @das-intensity + * Switch shebang for the manylinux-wheels script (#465) + @bwoodsend + * Fix typos in error message (#449) @filipsalomonsson +- refresh python-ujson-system-double-conversion.patch +- Update requirements: removes unmaintained blist + +------------------------------------------------------------------- +Mon Feb 1 18:19:31 UTC 2021 - Dirk Müller + +- update to 4.0.2: + * Travis CI: Test on 3.9 final, remove 3.8 + * Toward matching Python standard library output for float + * Fix errors on reading long decimal floats + * Fix #429: Make empty dict/list indented serialization match stdlib json + * Fix dealing with None types + +------------------------------------------------------------------- +Thu Nov 26 08:33:12 UTC 2020 - Dirk Mueller + +- update to 4.0.1: + * Fix UnicodeDecodeError on arm64/aarch64 + * Add support for Python 3.9 + * Drop support for EOL Python 3.5 + * Make PEP 384 compliant + +------------------------------------------------------------------- +Mon Aug 3 05:24:24 UTC 2020 - Steve Kowalik + +- Update to 3.1.0: + * PEP 489 Multi Phase Init support (#418) @WillAyd + * PyPy3 test fixes (#413) @mgorny + +------------------------------------------------------------------- +Sun Jun 14 09:36:42 UTC 2020 - Dirk Mueller + +- update to 3.0.0: + * Build Windows, macOS and manylinux wheels on CI and deploy to PyPI + * Breaking change: New reject_bytes option to raise on bytes, + defaults to True to align with json library. Set to False for + old behaviour (#266) @elelay + * Breaking change: Add an allow_nan keyword argument to dumps, + defaults to True to align with json library. Set to False for old + behaviour (#327) @segfault + Specify setuptools_scm config in pyproject.toml (#399) @BenjaminSchubert + * Remove python 2.x support + +------------------------------------------------------------------- +Sat Mar 28 16:22:49 UTC 2020 - Arun Persaud + +- update to version 2.0.3: + * Changed + + Drop legacy distutils in setup.py (#397) @hugovk + + Update benchmarking (#395) @hugovk + * Fixed + + Decrease dict key reference (#394) @suola + + Remove double_precision and precise_float from help text (#389) + @JTJL + +------------------------------------------------------------------- +Sun Mar 15 19:44:07 UTC 2020 - Benjamin Greiner + +- update to version 2.0.2 + Fix serialization issue (#382) +- reactivate Python 2 build + +------------------------------------------------------------------- +Tue Mar 10 13:37:34 UTC 2020 - pgajdos@suse.com + +- version update to 2.0.1 + Added + Include license file in manifest (#288) @kszucs + added "static" to C functions, where possible (#238) @WGH- + bring back benchmark introduction (#234) @rdpate + Add syntax highlighting to README (#255) @adamchainz + Test on new Travis CPUs (#350) @hugovk + Test on GitHub Actions (#348) @hugovk + Test on Python 3.9-dev to avoid surprises (#349) @hugovk + Use Release Drafter to draft releases (#365) @hugovk + Deploy from GitHub Actions instead of Travis CI (#364) @hugovk + Autodeploy to PyPI from Travis CI (#357) @hugovk + Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk + Changed + Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja + Reduce default buffer on stack size (#281) @ncopa + Update ultrajsondec.c (#260) @markpiekarz + Indent dict values (#217) @orivej + Test with pytest (#363) @hugovk + Less Travis (#361) @hugovk + Update links (#356) @hugovk + Tests: Remove unused, unmaintained blist (#362) @hugovk + Only deploy sdist from Travis CI (#359) @hugovk + Removed + Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk + Remove serialization of date/datetime objects (50181f0) @Jahaja + Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja + Remove generic serialization of objects/iterables (53f85b1) @Jahaja + Remove support for __json__ method on str (5f98f01) @Jahaja + Remove blist tests (3a6ba52) @Jahaja + Fixed + Fix for sort_keys bug and a typo (870ee48) @Jahaja + Fix for overflowing long causing invalid JSON (409c6d4) @Jahaja + Following std JSON handling of None dict key (ac4637f) + Fix for incorrect order when using OrderedDict (c9f8318) @Jahaja + Fix reference counting bug for dict values (#353) @richafrank + Fix a couple of memory leaks. (#257) @borman + Correct JSON decoding implementation to die on trailing commas in Objects (#323) @timdawborn + fixup dconv_wrapper linkage (#312) @tclh123 + Fix Warning: 'classifiers' should be a list, got type 'filter' (#351) @hugovk + Remove redundant license parameter (#341) @blag + do not forcefully remove the build directory manually (fix #179) (#207) @anthraxx + Merged pull request to fix memory leak. (#1) @Adriandorr + http -> https (#299) @hugovk +- added patches + fix unbundle double-conversion + + python-ujson-system-double-conversion.patch +- deleted patches + - do_not_remove_build_directory_manually.patch (upstreamed) + - no-unittest2.patch (upstreamed) + - ujson-1.35-fix-for-overflowing-long.patch (upstreamed) + - ujson-1.35-fix-ordering-of-orderdict.patch (upstreamed) + - ujson-1.35-sort_keys-segfault.patch (upstreamed) + - ujson-1.35-standard-handling-of-none.patch (upstreamed) + - ujson-1.35-test-depricationwarning.patch (upstreamed) + - ujson-1.35-use-static-where-possible.patch (upstreamed) + +------------------------------------------------------------------- +Sun May 12 13:09:01 UTC 2019 - John Vandenberg + +- Apply six patches from Gentoo: + * ujson-1.35-fix-for-overflowing-long.patch + * ujson-1.35-fix-ordering-of-orderdict.patch + * ujson-1.35-sort_keys-segfault.patch + * ujson-1.35-standard-handling-of-none.patch + * ujson-1.35-test-depricationwarning.patch + * ujson-1.35-use-static-where-possible.patch + +------------------------------------------------------------------- +Fri Aug 10 11:15:14 UTC 2018 - tchvatal@suse.com + +- Do not depend on unittest2 it is not needed: + * no-unittest2.patch +- Really execute the tests + +------------------------------------------------------------------- +Wed Apr 26 03:28:07 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Fix source URL +- Run tests +- Add do_not_remove_build_directory_manually.patch + This avoids deleting build directories that the single-spec + macro system needs. + +------------------------------------------------------------------- +Fri Dec 16 11:52:13 UTC 2016 - jengelh@inai.de + +- Replace filler words in description + +------------------------------------------------------------------- +Fri Dec 16 09:48:29 UTC 2016 - tbechtold@suse.com + +- Initial packaging (version 1.35) + diff --git a/python-ujson.spec b/python-ujson.spec new file mode 100644 index 0000000..ec4e954 --- /dev/null +++ b/python-ujson.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-ujson +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-ujson +Version: 5.10.0 +Release: 0 +Summary: JSON encoder and decoder for Python +License: BSD-3-Clause +URL: https://github.com/esnme/ultrajson +Source: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: double-conversion-devel +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros + +%python_subpackages + +%description +An ultrafast JSON encoder and decoder written in pure C with +bindings for Python 2.7 and 3.8+ + +%prep +%autosetup -p1 -n ujson-%{version} + +%build +rm -r deps +export CFLAGS="%{optflags} -fno-strict-aliasing" +export UJSON_BUILD_DC_INCLUDES='%{_includedir}/double-conversion' +export UJSON_BUILD_DC_LIBS='-ldouble-conversion' +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%pytest_arch + +%files %{python_files} +%doc README.md +%{python_sitearch}/ujson.cpython-*-linux-gnu.so +%{python_sitearch}/ujson-%{version}.dist-info + +%changelog diff --git a/ujson-5.10.0.tar.gz b/ujson-5.10.0.tar.gz new file mode 100644 index 0000000..1833954 --- /dev/null +++ b/ujson-5.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1 +size 7154885