python-rapidjson 1.20__tar.gz → 1.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. {python_rapidjson-1.20 → python_rapidjson-1.21}/CHANGES.rst +20 -1
  2. {python_rapidjson-1.20 → python_rapidjson-1.21}/PKG-INFO +38 -7
  3. {python_rapidjson-1.20 → python_rapidjson-1.21}/README.rst +2 -2
  4. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/benchmarks-tables.rst +43 -43
  5. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/changes.rst +20 -1
  6. {python_rapidjson-1.20 → python_rapidjson-1.21}/python_rapidjson.egg-info/PKG-INFO +38 -7
  7. {python_rapidjson-1.20 → python_rapidjson-1.21}/python_rapidjson.egg-info/SOURCES.txt +1 -1
  8. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/document.h +2 -1
  9. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/encodings.h +2 -2
  10. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/strtod.h +1 -1
  11. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/pointer.h +7 -1
  12. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/reader.h +2 -2
  13. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/schema.h +2 -3
  14. python_rapidjson-1.21/rapidjson_exact_version.txt +1 -0
  15. {python_rapidjson-1.20 → python_rapidjson-1.21}/requirements-test.txt +5 -5
  16. {python_rapidjson-1.20 → python_rapidjson-1.21}/requirements.txt +8 -8
  17. {python_rapidjson-1.20 → python_rapidjson-1.21}/setup.py +4 -5
  18. {python_rapidjson-1.20 → python_rapidjson-1.21}/typings/rapidjson/__init__.pyi +1 -1
  19. python_rapidjson-1.20/rapidjson_exact_version.txt +0 -1
  20. python_rapidjson-1.20/version.txt +0 -1
  21. {python_rapidjson-1.20 → python_rapidjson-1.21}/.dir-locals.el +0 -0
  22. {python_rapidjson-1.20 → python_rapidjson-1.21}/LICENSE +0 -0
  23. {python_rapidjson-1.20 → python_rapidjson-1.21}/MANIFEST.in +0 -0
  24. {python_rapidjson-1.20 → python_rapidjson-1.21}/benchmarks/conftest.py +0 -0
  25. {python_rapidjson-1.20 → python_rapidjson-1.21}/benchmarks/tablize.py +0 -0
  26. {python_rapidjson-1.20 → python_rapidjson-1.21}/benchmarks/test_benchmark.py +0 -0
  27. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/Makefile +0 -0
  28. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/api.rst +0 -0
  29. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/benchmarks.rst +0 -0
  30. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/conf.py +0 -0
  31. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/decoder.rst +0 -0
  32. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/dump.rst +0 -0
  33. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/dumps.rst +0 -0
  34. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/encoder.rst +0 -0
  35. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/index.rst +0 -0
  36. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/load.rst +0 -0
  37. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/loads.rst +0 -0
  38. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/quickstart.rst +0 -0
  39. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/rawjson.rst +0 -0
  40. {python_rapidjson-1.20 → python_rapidjson-1.21}/docs/validator.rst +0 -0
  41. {python_rapidjson-1.20 → python_rapidjson-1.21}/python_rapidjson.egg-info/dependency_links.txt +0 -0
  42. {python_rapidjson-1.20 → python_rapidjson-1.21}/python_rapidjson.egg-info/top_level.txt +0 -0
  43. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/allocators.h +0 -0
  44. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -0
  45. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/encodedstream.h +0 -0
  46. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/error/en.h +0 -0
  47. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/error/error.h +0 -0
  48. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/filereadstream.h +0 -0
  49. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/filewritestream.h +0 -0
  50. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/fwd.h +0 -0
  51. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/biginteger.h +0 -0
  52. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/clzll.h +0 -0
  53. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/diyfp.h +0 -0
  54. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/dtoa.h +0 -0
  55. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/ieee754.h +0 -0
  56. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/itoa.h +0 -0
  57. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/meta.h +0 -0
  58. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/pow10.h +0 -0
  59. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/regex.h +0 -0
  60. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/stack.h +0 -0
  61. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/strfunc.h +0 -0
  62. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/internal/swap.h +0 -0
  63. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/istreamwrapper.h +0 -0
  64. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/memorybuffer.h +0 -0
  65. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/memorystream.h +0 -0
  66. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -0
  67. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -0
  68. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/ostreamwrapper.h +0 -0
  69. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/prettywriter.h +0 -0
  70. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/rapidjson.h +0 -0
  71. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/stream.h +0 -0
  72. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/stringbuffer.h +0 -0
  73. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/uri.h +0 -0
  74. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/include/rapidjson/writer.h +0 -0
  75. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/license.txt +0 -0
  76. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson/readme.md +0 -0
  77. {python_rapidjson-1.20 → python_rapidjson-1.21}/rapidjson.cpp +0 -0
  78. {python_rapidjson-1.20 → python_rapidjson-1.21}/setup.cfg +0 -0
  79. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/conftest.py +0 -0
  80. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_base_types.py +0 -0
  81. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_circular.py +0 -0
  82. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_dict_subclass.py +0 -0
  83. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_enum.py +0 -0
  84. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_float.py +0 -0
  85. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_memory_leaks.py +0 -0
  86. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_params.py +0 -0
  87. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_pass1.py +0 -0
  88. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_pass2.py +0 -0
  89. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_pass3.py +0 -0
  90. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_rawjson.py +0 -0
  91. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_refs_count.py +0 -0
  92. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_streams.py +0 -0
  93. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_unicode.py +0 -0
  94. {python_rapidjson-1.20 → python_rapidjson-1.21}/tests/test_validator.py +0 -0
  95. {python_rapidjson-1.20 → python_rapidjson-1.21}/tox.ini +0 -0
@@ -1,10 +1,29 @@
1
1
  Changes
2
2
  -------
3
3
 
4
+ 1.21 (2025-07-10)
5
+ ~~~~~~~~~~~~~~~~~
6
+
7
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
8
+ merge his `PR #224`__)
9
+
10
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
11
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
12
+
13
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
14
+
15
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
16
+ (`issue #215`__)
17
+
18
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
19
+
20
+ * Use more recent OS images on GH Actions to test and build wheels
21
+
22
+
4
23
  1.20 (2024-08-05)
5
24
  ~~~~~~~~~~~~~~~~~
6
25
 
7
- * Rectify type hints if ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
26
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
8
27
 
9
28
  __ https://github.com/python-rapidjson/python-rapidjson/issues/214
10
29
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-rapidjson
3
- Version: 1.20
3
+ Version: 1.21
4
4
  Summary: Python wrapper around rapidjson
5
5
  Home-page: https://github.com/python-rapidjson/python-rapidjson
6
6
  Author: Ken Robbins
@@ -11,26 +11,38 @@ License: MIT License
11
11
  Keywords: json rapidjson
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Programming Language :: C++
16
15
  Classifier: Programming Language :: Python :: 3 :: Only
17
16
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
17
  Classifier: Programming Language :: Python :: 3.9
20
18
  Classifier: Programming Language :: Python :: 3.10
21
19
  Classifier: Programming Language :: Python :: 3.11
22
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Programming Language :: Python
24
23
  Requires-Python: >=3.6
25
24
  Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE
26
+ Dynamic: author
27
+ Dynamic: author-email
28
+ Dynamic: classifier
29
+ Dynamic: description
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: maintainer
36
+ Dynamic: maintainer-email
37
+ Dynamic: requires-python
38
+ Dynamic: summary
27
39
 
28
40
  .. -*- coding: utf-8 -*-
29
41
  .. :Project: python-rapidjson -- Introduction
30
42
  .. :Author: Ken Robbins <ken@kenrobbins.com>
31
43
  .. :License: MIT License
32
44
  .. :Copyright: © 2015 Ken Robbins
33
- .. :Copyright: © 2016, 2017, 2018, 2020, 2022 Lele Gaifax
45
+ .. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
34
46
  ..
35
47
 
36
48
  ==================
@@ -135,7 +147,7 @@ Performance
135
147
  ``python-rapidjson`` tries to be as performant as possible while staying
136
148
  compatible with the ``json`` module.
137
149
 
138
- See the `this section`__ in the documentation for a comparison with other JSON libraries.
150
+ See `this section`__ in the documentation for a comparison with other JSON libraries.
139
151
 
140
152
  __ https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html
141
153
 
@@ -155,10 +167,29 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
155
167
  Changes
156
168
  -------
157
169
 
170
+ 1.21 (2025-07-10)
171
+ ~~~~~~~~~~~~~~~~~
172
+
173
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
174
+ merge his `PR #224`__)
175
+
176
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
177
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
178
+
179
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
180
+
181
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
182
+ (`issue #215`__)
183
+
184
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
185
+
186
+ * Use more recent OS images on GH Actions to test and build wheels
187
+
188
+
158
189
  1.20 (2024-08-05)
159
190
  ~~~~~~~~~~~~~~~~~
160
191
 
161
- * Rectify type hints if ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
192
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
162
193
 
163
194
  __ https://github.com/python-rapidjson/python-rapidjson/issues/214
164
195
 
@@ -3,7 +3,7 @@
3
3
  .. :Author: Ken Robbins <ken@kenrobbins.com>
4
4
  .. :License: MIT License
5
5
  .. :Copyright: © 2015 Ken Robbins
6
- .. :Copyright: © 2016, 2017, 2018, 2020, 2022 Lele Gaifax
6
+ .. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
7
7
  ..
8
8
 
9
9
  ==================
@@ -108,7 +108,7 @@ Performance
108
108
  ``python-rapidjson`` tries to be as performant as possible while staying
109
109
  compatible with the ``json`` module.
110
110
 
111
- See the `this section`__ in the documentation for a comparison with other JSON libraries.
111
+ See `this section`__ in the documentation for a comparison with other JSON libraries.
112
112
 
113
113
  __ https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html
114
114
 
@@ -5,41 +5,41 @@ Serialization
5
5
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
6
6
  | serialize | ``dumps()``\ [1]_ | ``Encoder()``\ [2]_ | ``dumps(n)``\ [3]_ | ``Encoder(n)``\ [4]_ | ``PyEncoder()``\ [5]_ | simdjson\ [6]_ | orjson\ [7]_ | ujson\ [8]_ | simplejson\ [9]_ | stdlib\ [10]_ |
7
7
  +=======================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+
8
- | 100 arrays dict | 1.00 | 1.00 | 0.73 | 0.73 | 0.99 | 2.21 | **0.17** | 0.85 | 5.93 | 2.31 |
8
+ | 100 arrays dict | 1.00 | 1.00 | 0.73 | 0.72 | 1.00 | 1.34 | **0.14** | 0.94 | 5.48 | 1.34 |
9
9
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
10
- | 100 dicts array | 1.00 | 0.99 | 0.77 | 0.74 | 1.01 | 2.27 | **0.22** | 0.84 | 6.82 | 2.27 |
10
+ | 100 dicts array | 1.00 | 1.00 | 0.79 | 0.76 | 1.00 | 1.55 | **0.20** | 0.96 | 6.73 | 1.53 |
11
11
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
12
- | 256 Trues array | 1.00 | 1.01 | 1.18 | 1.00 | 1.07 | 2.62 | **0.36** | 1.56 | 2.95 | 2.60 |
12
+ | 256 Trues array | 1.00 | 0.99 | 1.17 | 1.10 | 1.08 | 1.78 | **0.30** | 1.62 | 2.99 | 1.78 |
13
13
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
14
- | 256 ascii array | 1.00 | 1.00 | 1.01 | 1.00 | 1.00 | 0.90 | **0.09** | 0.47 | 1.05 | 0.90 |
14
+ | 256 ascii array | 1.00 | 1.00 | 1.01 | 1.00 | 1.00 | 1.04 | **0.09** | 0.54 | 1.18 | 1.04 |
15
15
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
16
- | 256 doubles array | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 0.91 | **0.04** | 0.22 | 0.95 | 0.92 |
16
+ | 256 doubles array | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 0.93 | **0.06** | 0.31 | 1.06 | 0.93 |
17
17
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
18
- | 256 unicode array | 1.00 | 0.80 | 0.79 | 0.82 | 0.80 | 0.68 | **0.02** | 0.52 | 0.66 | 0.68 |
18
+ | 256 unicode array | 1.00 | 0.99 | 1.01 | 1.00 | 0.99 | 0.77 | **0.02** | 0.62 | 0.78 | 0.77 |
19
19
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
20
- | apache.json | 1.00 | 1.00 | 1.00 | 1.00 | 1.01 | 1.70 | **0.19** | 1.02 | 3.29 | 1.68 |
20
+ | apache.json | 1.00 | 0.99 | 0.99 | 0.99 | 0.99 | 1.34 | **0.18** | 1.24 | 3.15 | 1.34 |
21
21
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
22
- | canada.json | 1.00 | 1.00 | 0.98 | 0.99 | 1.00 | 1.04 | **0.06** | 0.27 | 1.81 | 1.05 |
22
+ | canada.json | 1.00 | 1.00 | 0.99 | 0.99 | 1.01 | 1.03 | **0.09** | 0.36 | 1.91 | 1.02 |
23
23
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
24
- | complex object | 1.00 | 1.00 | 0.89 | 0.88 | 1.00 | 1.55 | **0.17** | 0.66 | 2.68 | 1.54 |
24
+ | complex object | 1.00 | 1.00 | 0.90 | 0.89 | 1.01 | 1.25 | **0.17** | 0.80 | 2.92 | 1.24 |
25
25
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
26
- | composite object | 1.00 | 0.99 | 0.68 | 0.64 | 0.98 | 1.70 | **0.21** | 0.83 | 2.48 | 1.72 |
26
+ | composite object | 1.00 | 0.98 | 0.72 | 0.70 | 0.98 | 1.43 | **0.20** | 0.97 | 2.68 | 1.43 |
27
27
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
28
- | ctm.json | 1.00 | 1.00 | 0.75 | 0.75 | 1.00 | 2.27 | **0.21** | 1.11 | 6.56 | 2.27 |
28
+ | ctm.json | 1.00 | 0.97 | 0.72 | 0.72 | 0.97 | 1.37 | **0.21** | 1.26 | 5.89 | 1.35 |
29
29
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
30
- | github.json | 1.00 | 1.00 | 0.97 | 0.96 | 1.00 | 1.38 | **0.16** | 0.86 | 2.10 | 1.39 |
30
+ | github.json | 1.00 | 1.00 | 0.97 | 0.96 | 1.00 | 1.13 | **0.14** | 1.00 | 2.13 | 1.13 |
31
31
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
32
- | instruments.json | 1.00 | 1.00 | 0.74 | 0.74 | 1.00 | 1.81 | **0.20** | 0.90 | 2.86 | 1.81 |
32
+ | instruments.json | 1.00 | 0.99 | 0.76 | 0.76 | 0.99 | 1.31 | **0.19** | 1.04 | 2.82 | 1.30 |
33
33
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
34
- | mesh.json | 1.00 | 1.00 | 0.89 | 0.89 | 1.00 | 0.94 | **0.10** | 0.28 | 1.19 | 0.94 |
34
+ | mesh.json | 1.00 | 1.00 | 0.88 | 0.88 | 1.00 | 0.92 | **0.12** | 0.38 | 1.21 | 0.93 |
35
35
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
36
- | truenull.json | 1.00 | 1.02 | 1.06 | 1.03 | 1.03 | 2.13 | **0.28** | 1.76 | 2.12 | 2.21 |
36
+ | truenull.json | 1.00 | 1.00 | 1.06 | 1.00 | 1.01 | 1.23 | **0.28** | 1.80 | 2.22 | 1.22 |
37
37
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
38
- | tweet.json | 1.00 | 1.00 | 0.99 | 0.93 | 1.00 | 1.70 | **0.20** | 0.91 | 2.70 | 1.69 |
38
+ | tweet.json | 1.00 | 1.00 | 0.98 | 0.94 | 1.00 | 1.32 | **0.19** | 1.02 | 2.73 | 1.32 |
39
39
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
40
- | twitter.json | 1.00 | 1.00 | 0.95 | 0.95 | 1.00 | 1.46 | **0.18** | 0.94 | 2.02 | 1.46 |
40
+ | twitter.json | 1.00 | 1.00 | 0.95 | 0.94 | 1.00 | 1.07 | **0.16** | 1.01 | 1.97 | 1.08 |
41
41
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
42
- | overall | 1.00 | 1.00 | 0.80 | 0.80 | 1.00 | 1.85 | **0.14** | 0.68 | 4.63 | 1.92 |
42
+ | overall | 1.00 | 1.00 | 0.79 | 0.79 | 1.00 | 1.25 | **0.13** | 0.79 | 4.46 | 1.25 |
43
43
  +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
44
44
 
45
45
  Deserialization
@@ -48,41 +48,41 @@ Deserialization
48
48
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
49
49
  | deserialize | ``loads()``\ [11]_ | ``Decoder()``\ [12]_ | ``loads(n)``\ [13]_ | ``Decoder(n)``\ [14]_ | ``PyDecoder()``\ [15]_ | simdjson | orjson | ujson | simplejson | stdlib |
50
50
  +=======================+========================+========================+========================+========================+========================+========================+========================+========================+========================+========================+
51
- | 100 arrays dict | 1.00 | 1.01 | 0.98 | 0.93 | 1.59 | 0.86 | **0.56** | 0.85 | 1.20 | 0.94 |
51
+ | 100 arrays dict | 1.00 | 1.00 | 0.89 | 0.88 | 1.29 | 0.81 | **0.52** | 0.89 | 1.06 | 0.95 |
52
52
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
53
- | 100 dicts array | 1.00 | 1.00 | 0.87 | 0.86 | 1.58 | 0.62 | **0.36** | 0.69 | 1.35 | 1.00 |
53
+ | 100 dicts array | 1.00 | 1.00 | 0.86 | 0.84 | 1.50 | 0.64 | **0.38** | 0.77 | 1.36 | 1.05 |
54
54
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
55
- | 256 Trues array | 1.00 | 1.02 | 1.08 | 0.98 | 1.14 | 0.93 | **0.42** | 0.96 | 1.53 | 1.37 |
55
+ | 256 Trues array | 1.00 | 1.01 | 1.08 | 1.05 | 1.13 | 0.93 | **0.36** | 0.93 | 1.39 | 1.31 |
56
56
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
57
- | 256 ascii array | 1.00 | 1.00 | 0.99 | 0.99 | 1.50 | 0.50 | **0.33** | 0.85 | 0.86 | 0.77 |
57
+ | 256 ascii array | 1.00 | 1.00 | 1.01 | 0.99 | 1.67 | 0.63 | **0.48** | 1.28 | 1.23 | 1.11 |
58
58
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
59
- | 256 doubles array | 1.00 | 1.00 | 0.26 | 0.26 | 1.01 | 0.21 | **0.16** | 0.61 | 1.08 | 1.03 |
59
+ | 256 doubles array | 1.00 | 1.01 | 0.23 | 0.23 | 1.01 | 0.20 | **0.17** | 0.61 | 1.08 | 1.12 |
60
60
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
61
- | 256 unicode array | 1.00 | 1.00 | 1.00 | 1.00 | 1.07 | 1.12 | **0.41** | 0.82 | 4.06 | 1.45 |
61
+ | 256 unicode array | 1.00 | 1.00 | 1.01 | 1.00 | 1.04 | 1.04 | **0.41** | 0.77 | 4.53 | 1.37 |
62
62
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
63
- | apache.json | 1.00 | 1.00 | 1.01 | 1.01 | 1.57 | 0.68 | **0.44** | 0.79 | 0.84 | 0.82 |
63
+ | apache.json | 1.00 | 1.01 | 1.00 | 1.00 | 1.45 | 0.72 | **0.49** | 0.95 | 0.98 | 0.90 |
64
64
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
65
- | canada.json | 1.00 | 1.00 | 0.33 | 0.33 | 1.12 | 0.29 | **0.25** | 0.54 | 0.97 | 0.96 |
65
+ | canada.json | 1.00 | 1.00 | 0.34 | 0.35 | 1.07 | 0.31 | **0.28** | 0.59 | 1.06 | 1.04 |
66
66
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
67
- | complex object | 1.00 | 1.00 | 0.84 | 0.83 | 1.31 | 0.68 | **0.35** | 0.78 | 1.15 | 0.96 |
67
+ | complex object | 1.00 | 1.00 | 0.81 | 0.83 | 1.25 | 0.60 | **0.38** | 0.84 | 1.10 | 0.97 |
68
68
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
69
- | composite object | 1.00 | 1.00 | 0.84 | 0.83 | 1.34 | 0.61 | **0.39** | 0.59 | 1.45 | 1.07 |
69
+ | composite object | 1.00 | 1.01 | 0.84 | 0.83 | 1.34 | 0.62 | **0.44** | 0.66 | 1.34 | 1.05 |
70
70
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
71
- | ctm.json | 1.00 | 0.99 | 0.93 | 0.93 | 1.48 | 0.80 | **0.53** | 1.13 | 1.20 | 0.97 |
71
+ | ctm.json | 1.00 | 1.00 | 0.89 | 0.89 | 1.36 | 0.81 | **0.54** | 1.21 | 1.15 | 1.32 |
72
72
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
73
- | github.json | 1.00 | 1.00 | 0.99 | 0.98 | 1.37 | 0.66 | **0.39** | 0.77 | 0.91 | 0.82 |
73
+ | github.json | 1.00 | 1.02 | 0.98 | 0.97 | 1.31 | 0.73 | **0.45** | 0.91 | 1.01 | 0.90 |
74
74
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
75
- | instruments.json | 1.00 | 1.00 | 0.87 | 0.87 | 1.23 | 0.66 | **0.36** | 0.76 | 1.17 | 0.94 |
75
+ | instruments.json | 1.00 | 1.01 | 0.83 | 0.83 | 1.19 | 0.62 | **0.35** | 0.73 | 1.02 | 0.90 |
76
76
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
77
- | mesh.json | 1.00 | 1.00 | 0.52 | 0.51 | 1.04 | 0.43 | **0.33** | 0.66 | 1.48 | 1.04 |
77
+ | mesh.json | 1.00 | 1.00 | 0.50 | 0.50 | 1.01 | 0.44 | **0.36** | 0.70 | 1.26 | 1.13 |
78
78
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
79
- | truenull.json | 1.00 | 1.01 | 1.01 | 0.99 | 1.01 | 0.58 | **0.34** | 0.87 | 0.99 | 0.95 |
79
+ | truenull.json | 1.00 | 1.01 | 1.01 | 1.00 | 1.02 | 0.95 | **0.29** | 0.88 | 0.96 | 0.92 |
80
80
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
81
- | tweet.json | 1.00 | 1.01 | 0.99 | 0.97 | 1.30 | 0.69 | **0.39** | 0.84 | 1.17 | 0.99 |
81
+ | tweet.json | 1.00 | 1.00 | 0.97 | 0.96 | 1.27 | 0.72 | **0.44** | 0.98 | 1.25 | 1.04 |
82
82
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
83
- | twitter.json | 1.00 | 1.00 | 0.97 | 0.97 | 1.25 | 0.68 | **0.39** | 0.85 | 0.99 | 0.89 |
83
+ | twitter.json | 1.00 | 1.00 | 0.96 | 0.96 | 1.20 | 0.75 | **0.44** | 0.98 | 1.04 | 1.09 |
84
84
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
85
- | overall | 1.00 | 1.01 | 0.91 | 0.87 | 1.54 | 0.80 | **0.53** | 0.82 | 1.19 | 0.94 |
85
+ | overall | 1.00 | 1.00 | 0.84 | 0.83 | 1.27 | 0.76 | **0.49** | 0.87 | 1.07 | 0.96 |
86
86
  +-----------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+------------------------+
87
87
 
88
88
  ASCII vs UTF-8 Serialization
@@ -91,11 +91,11 @@ ASCII vs UTF-8 Serialization
91
91
  +-------------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
92
92
  | serialize | ``rj ascii``\ [16]_ | ``rj utf8``\ [17]_ | ``uj ascii``\ [18]_ | ``uj utf8``\ [19]_ | ``sj ascii``\ [20]_ | ``sj utf8``\ [21]_ | ``json ascii``\ [22]_ | ``json utf8``\ [23]_ |
93
93
  +=========================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+=======================+
94
- | Long ASCII string | 1.00 | 0.43 | **0.24** | 0.29 | 0.60 | 1.24 | 0.57 | 1.00 |
94
+ | Long ASCII string | 1.00 | 0.52 | **0.29** | 0.36 | 0.73 | 0.81 | 0.73 | 1.43 |
95
95
  +-------------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
96
- | Long Unicode string | 1.00 | 0.57 | 0.64 | **0.47** | 0.72 | 0.62 | 0.76 | 0.48 |
96
+ | Long Unicode string | 1.00 | 0.57 | 0.62 | **0.47** | 0.69 | 0.53 | 0.73 | 0.57 |
97
97
  +-------------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
98
- | overall | 1.00 | 0.53 | 0.51 | **0.41** | 0.68 | 0.82 | 0.70 | 0.65 |
98
+ | overall | 1.00 | 0.56 | 0.53 | **0.44** | 0.70 | 0.61 | 0.73 | 0.80 |
99
99
  +-------------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
100
100
 
101
101
  .. [1] ``rapidjson.dumps()``
@@ -103,11 +103,11 @@ ASCII vs UTF-8 Serialization
103
103
  .. [3] ``rapidjson.dumps(number_mode=NM_NATIVE)``
104
104
  .. [4] ``rapidjson.Encoder(number_mode=NM_NATIVE)``
105
105
  .. [5] ``rapidjson.Encoder()`` subclassed in Python with *no-op* hook methods
106
- .. [6] `simdjson 3.6.4 <https://pypi.org/project/pysimdjson/>`__
107
- .. [7] `orjson 3.10.5 <https://pypi.org/project/orjson/3.10.5/>`__
106
+ .. [6] `simdjson 3.12.3 <https://pypi.org/project/pysimdjson/>`__
107
+ .. [7] `orjson 3.10.18 <https://pypi.org/project/orjson/3.10.18/>`__
108
108
  .. [8] `ujson 5.10.0 <https://pypi.org/project/ujson/5.10.0/>`__
109
- .. [9] `simplejson 3.19.2 <https://pypi.org/pypi/simplejson/3.19.2>`__
110
- .. [10] Python 3.11.9 standard library ``json``
109
+ .. [9] `simplejson 3.20.1 <https://pypi.org/pypi/simplejson/3.20.1>`__
110
+ .. [10] Python 3.13.5 standard library ``json``
111
111
  .. [11] ``rapidjson.loads()``
112
112
  .. [12] ``rapidjson.Decoder()``
113
113
  .. [13] ``rapidjson.loads(number_mode=NM_NATIVE)``
@@ -1,10 +1,29 @@
1
1
  Changes
2
2
  -------
3
3
 
4
+ 1.21 (2025-07-10)
5
+ ~~~~~~~~~~~~~~~~~
6
+
7
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
8
+ merge his `PR #224`__)
9
+
10
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
11
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
12
+
13
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
14
+
15
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
16
+ (`issue #215`__)
17
+
18
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
19
+
20
+ * Use more recent OS images on GH Actions to test and build wheels
21
+
22
+
4
23
  1.20 (2024-08-05)
5
24
  ~~~~~~~~~~~~~~~~~
6
25
 
7
- * Rectify type hints if ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
26
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
8
27
 
9
28
  __ https://github.com/python-rapidjson/python-rapidjson/issues/214
10
29
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-rapidjson
3
- Version: 1.20
3
+ Version: 1.21
4
4
  Summary: Python wrapper around rapidjson
5
5
  Home-page: https://github.com/python-rapidjson/python-rapidjson
6
6
  Author: Ken Robbins
@@ -11,26 +11,38 @@ License: MIT License
11
11
  Keywords: json rapidjson
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Programming Language :: C++
16
15
  Classifier: Programming Language :: Python :: 3 :: Only
17
16
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
17
  Classifier: Programming Language :: Python :: 3.9
20
18
  Classifier: Programming Language :: Python :: 3.10
21
19
  Classifier: Programming Language :: Python :: 3.11
22
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Programming Language :: Python
24
23
  Requires-Python: >=3.6
25
24
  Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE
26
+ Dynamic: author
27
+ Dynamic: author-email
28
+ Dynamic: classifier
29
+ Dynamic: description
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: maintainer
36
+ Dynamic: maintainer-email
37
+ Dynamic: requires-python
38
+ Dynamic: summary
27
39
 
28
40
  .. -*- coding: utf-8 -*-
29
41
  .. :Project: python-rapidjson -- Introduction
30
42
  .. :Author: Ken Robbins <ken@kenrobbins.com>
31
43
  .. :License: MIT License
32
44
  .. :Copyright: © 2015 Ken Robbins
33
- .. :Copyright: © 2016, 2017, 2018, 2020, 2022 Lele Gaifax
45
+ .. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
34
46
  ..
35
47
 
36
48
  ==================
@@ -135,7 +147,7 @@ Performance
135
147
  ``python-rapidjson`` tries to be as performant as possible while staying
136
148
  compatible with the ``json`` module.
137
149
 
138
- See the `this section`__ in the documentation for a comparison with other JSON libraries.
150
+ See `this section`__ in the documentation for a comparison with other JSON libraries.
139
151
 
140
152
  __ https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html
141
153
 
@@ -155,10 +167,29 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
155
167
  Changes
156
168
  -------
157
169
 
170
+ 1.21 (2025-07-10)
171
+ ~~~~~~~~~~~~~~~~~
172
+
173
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
174
+ merge his `PR #224`__)
175
+
176
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
177
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
178
+
179
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
180
+
181
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
182
+ (`issue #215`__)
183
+
184
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
185
+
186
+ * Use more recent OS images on GH Actions to test and build wheels
187
+
188
+
158
189
  1.20 (2024-08-05)
159
190
  ~~~~~~~~~~~~~~~~~
160
191
 
161
- * Rectify type hints if ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
192
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
162
193
 
163
194
  __ https://github.com/python-rapidjson/python-rapidjson/issues/214
164
195
 
@@ -3,13 +3,13 @@ CHANGES.rst
3
3
  LICENSE
4
4
  MANIFEST.in
5
5
  README.rst
6
+ rapidjson.cpp
6
7
  rapidjson_exact_version.txt
7
8
  requirements-test.txt
8
9
  requirements.txt
9
10
  setup.cfg
10
11
  setup.py
11
12
  tox.ini
12
- version.txt
13
13
  ./rapidjson.cpp
14
14
  benchmarks/conftest.py
15
15
  benchmarks/tablize.py
@@ -2445,13 +2445,14 @@ private:
2445
2445
  data_.f.flags = kShortStringFlag;
2446
2446
  data_.ss.SetLength(s.length);
2447
2447
  str = data_.ss.str;
2448
+ std::memmove(str, s, s.length * sizeof(Ch));
2448
2449
  } else {
2449
2450
  data_.f.flags = kCopyStringFlag;
2450
2451
  data_.s.length = s.length;
2451
2452
  str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));
2452
2453
  SetStringPointer(str);
2454
+ std::memcpy(str, s, s.length * sizeof(Ch));
2453
2455
  }
2454
- std::memcpy(str, s, s.length * sizeof(Ch));
2455
2456
  str[s.length] = '\0';
2456
2457
  }
2457
2458
 
@@ -177,10 +177,10 @@ struct UTF8 {
177
177
 
178
178
  template <typename InputStream, typename OutputStream>
179
179
  static bool Validate(InputStream& is, OutputStream& os) {
180
- #define RAPIDJSON_COPY() os.Put(c = is.Take())
180
+ #define RAPIDJSON_COPY() if (c != '\0') os.Put(c = is.Take())
181
181
  #define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)
182
182
  #define RAPIDJSON_TAIL() RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x70)
183
- Ch c;
183
+ Ch c = static_cast<Ch>(-1);
184
184
  RAPIDJSON_COPY();
185
185
  if (!(c & 0x80))
186
186
  return true;
@@ -134,7 +134,7 @@ inline bool StrtodDiyFp(const Ch* decimals, int dLen, int dExp, double* result)
134
134
  int i = 0; // 2^64 - 1 = 18446744073709551615, 1844674407370955161 = 0x1999999999999999
135
135
  for (; i < dLen; i++) {
136
136
  if (significand > RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) ||
137
- (significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] > Ch('5')))
137
+ (significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] >= Ch('5')))
138
138
  break;
139
139
  significand = significand * 10u + static_cast<unsigned>(decimals[i] - Ch('0'));
140
140
  }
@@ -28,6 +28,12 @@ RAPIDJSON_DIAG_PUSH
28
28
  RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
29
29
  #endif
30
30
 
31
+ #if defined(RAPIDJSON_CPLUSPLUS) && RAPIDJSON_CPLUSPLUS >= 201703L
32
+ #define RAPIDJSON_IF_CONSTEXPR if constexpr
33
+ #else
34
+ #define RAPIDJSON_IF_CONSTEXPR if
35
+ #endif
36
+
31
37
  RAPIDJSON_NAMESPACE_BEGIN
32
38
 
33
39
  static const SizeType kPointerInvalidIndex = ~SizeType(0); //!< Represents an invalid index in GenericPointer::Token
@@ -291,7 +297,7 @@ public:
291
297
  SizeType length = static_cast<SizeType>(end - buffer);
292
298
  buffer[length] = '\0';
293
299
 
294
- if (sizeof(Ch) == 1) {
300
+ RAPIDJSON_IF_CONSTEXPR (sizeof(Ch) == 1) {
295
301
  Token token = { reinterpret_cast<Ch*>(buffer), length, index };
296
302
  return Append(token, allocator);
297
303
  }
@@ -1584,7 +1584,7 @@ private:
1584
1584
  // Parse frac = decimal-point 1*DIGIT
1585
1585
  int expFrac = 0;
1586
1586
  size_t decimalPosition;
1587
- if (Consume(s, '.')) {
1587
+ if (!useNanOrInf && Consume(s, '.')) {
1588
1588
  decimalPosition = s.Length();
1589
1589
 
1590
1590
  if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9')))
@@ -1631,7 +1631,7 @@ private:
1631
1631
 
1632
1632
  // Parse exp = e [ minus / plus ] 1*DIGIT
1633
1633
  int exp = 0;
1634
- if (Consume(s, 'e') || Consume(s, 'E')) {
1634
+ if (!useNanOrInf && (Consume(s, 'e') || Consume(s, 'E'))) {
1635
1635
  if (!useDouble) {
1636
1636
  d = static_cast<double>(use64bit ? i64 : i);
1637
1637
  useDouble = true;
@@ -1645,8 +1645,7 @@ private:
1645
1645
  double qRounded = std::floor(q + 0.5);
1646
1646
  double scaledEpsilon = (q + qRounded) * std::numeric_limits<double>::epsilon();
1647
1647
  double difference = std::abs(qRounded - q);
1648
- bool isMultiple = (difference <= scaledEpsilon)
1649
- || (difference < std::numeric_limits<double>::min());
1648
+ bool isMultiple = difference <= scaledEpsilon || difference < (std::numeric_limits<double>::min)();
1650
1649
  if (!isMultiple) {
1651
1650
  context.error_handler.NotMultipleOf(d, multipleOf_);
1652
1651
  RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf);
@@ -1762,7 +1761,7 @@ struct TokenHelper {
1762
1761
  template <typename Stack>
1763
1762
  struct TokenHelper<Stack, char> {
1764
1763
  RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
1765
- if (sizeof(SizeType) == 4) {
1764
+ RAPIDJSON_IF_CONSTEXPR (sizeof(SizeType) == 4) {
1766
1765
  char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint
1767
1766
  *buffer++ = '/';
1768
1767
  const char* end = internal::u32toa(index, buffer);
@@ -0,0 +1 @@
1
+ v1.1.0-763-g24b5e7a8
@@ -4,10 +4,10 @@
4
4
  # :License: MIT License
5
5
  # :Copyright: © 2015 John Anderson
6
6
  # :Copyright: © 2015 Ken Robbins
7
- # :Copyright: © 2015, 2017, 2018, 2021, 2022, 2023 Lele Gaifax
7
+ # :Copyright: © 2015, 2017, 2018, 2021, 2022, 2023, 2024, 2025 Lele Gaifax
8
8
  #
9
9
 
10
- mypy==1.10.0
11
- pytest==7.4.3
12
- pytz==2023.3.post1
13
- sphinx==7.2.6
10
+ mypy==1.16.1
11
+ pytest==8.4.1
12
+ pytz==2025.2
13
+ sphinx==8.2.3
@@ -2,20 +2,20 @@
2
2
  # :Project: python-rapidjson -- Development requirements
3
3
  # :Author: Lele Gaifax <lele@metapensiero.it>
4
4
  # :License: MIT License
5
- # :Copyright: © 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Lele Gaifax
5
+ # :Copyright: © 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Lele Gaifax
6
6
  #
7
7
 
8
8
  -r requirements-test.txt
9
9
 
10
10
  # Needed by make release
11
- metapensiero.tool.bump-version==1.3
12
- readme-renderer==43.0
13
- twine==5.0.0
11
+ bump-my-version==1.2.0
12
+ readme-renderer==44.0
13
+ twine==6.1.0
14
14
 
15
15
  # Needed by make benchmarks-*
16
- pytest-benchmark==4.0.0
16
+ pytest-benchmark==5.1.0
17
17
 
18
- pysimdjson==6.0.2
19
- orjson==3.10.5
20
- simplejson==3.19.2
18
+ pysimdjson==7.0.2
19
+ orjson==3.10.18
20
+ simplejson==3.20.1
21
21
  ujson==5.10.0
@@ -3,7 +3,7 @@
3
3
  # :Author: Ken Robbins <ken@kenrobbins.com>
4
4
  # :License: MIT License
5
5
  # :Copyright: © 2015 Ken Robbins
6
- # :Copyright: © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Lele Gaifax
6
+ # :Copyright: © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Lele Gaifax
7
7
  #
8
8
 
9
9
  import os.path
@@ -43,8 +43,8 @@ else:
43
43
  " as explained in the README.rst; in all other cases you may"
44
44
  " want to report the issue.")
45
45
 
46
- with open('version.txt', encoding='utf-8') as f:
47
- VERSION = f.read()
46
+ # Automatically updated by bump-my-version at release time
47
+ VERSION = '1.21'
48
48
 
49
49
  with open('README.rst', encoding='utf-8') as f:
50
50
  LONG_DESCRIPTION = f.read()
@@ -103,15 +103,14 @@ setup(
103
103
  classifiers=[
104
104
  'Development Status :: 5 - Production/Stable',
105
105
  'Intended Audience :: Developers',
106
- 'License :: OSI Approved :: MIT License',
107
106
  'Programming Language :: C++',
108
107
  'Programming Language :: Python :: 3 :: Only',
109
108
  'Programming Language :: Python :: 3',
110
- 'Programming Language :: Python :: 3.8',
111
109
  'Programming Language :: Python :: 3.9',
112
110
  'Programming Language :: Python :: 3.10',
113
111
  'Programming Language :: Python :: 3.11',
114
112
  'Programming Language :: Python :: 3.12',
113
+ 'Programming Language :: Python :: 3.13',
115
114
  'Programming Language :: Python',
116
115
  ],
117
116
  ext_modules=[Extension('rapidjson', **extension_options)],
@@ -215,7 +215,7 @@ class Encoder:
215
215
  def __call__(
216
216
  self,
217
217
  obj: t.Any,
218
- stream: t.Optional[t.IO],
218
+ stream: t.Optional[t.IO] = None,
219
219
  chunk_size: t.Optional[int] = 65536,
220
220
  ) -> t.Optional[str]: ...
221
221
 
@@ -1 +0,0 @@
1
- v1.1.0-752-gab1842a2
@@ -1 +0,0 @@
1
- 1.20
File without changes
File without changes