python-rapidjson 1.18__tar.gz → 1.19__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.18 → python-rapidjson-1.19}/CHANGES.rst +8 -0
  2. {python-rapidjson-1.18 → python-rapidjson-1.19}/PKG-INFO +9 -1
  3. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/changes.rst +8 -0
  4. {python-rapidjson-1.18 → python-rapidjson-1.19}/python_rapidjson.egg-info/PKG-INFO +9 -1
  5. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson.cpp +2 -5
  6. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_float.py +13 -1
  7. python-rapidjson-1.19/version.txt +1 -0
  8. python-rapidjson-1.18/version.txt +0 -1
  9. {python-rapidjson-1.18 → python-rapidjson-1.19}/.dir-locals.el +0 -0
  10. {python-rapidjson-1.18 → python-rapidjson-1.19}/LICENSE +0 -0
  11. {python-rapidjson-1.18 → python-rapidjson-1.19}/MANIFEST.in +0 -0
  12. {python-rapidjson-1.18 → python-rapidjson-1.19}/README.rst +0 -0
  13. {python-rapidjson-1.18 → python-rapidjson-1.19}/benchmarks/conftest.py +0 -0
  14. {python-rapidjson-1.18 → python-rapidjson-1.19}/benchmarks/tablize.py +0 -0
  15. {python-rapidjson-1.18 → python-rapidjson-1.19}/benchmarks/test_benchmark.py +0 -0
  16. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/Makefile +0 -0
  17. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/api.rst +0 -0
  18. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/benchmarks-tables.rst +0 -0
  19. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/benchmarks.rst +0 -0
  20. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/conf.py +0 -0
  21. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/decoder.rst +0 -0
  22. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/dump.rst +0 -0
  23. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/dumps.rst +0 -0
  24. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/encoder.rst +0 -0
  25. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/index.rst +0 -0
  26. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/load.rst +0 -0
  27. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/loads.rst +0 -0
  28. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/quickstart.rst +0 -0
  29. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/rawjson.rst +0 -0
  30. {python-rapidjson-1.18 → python-rapidjson-1.19}/docs/validator.rst +0 -0
  31. {python-rapidjson-1.18 → python-rapidjson-1.19}/python_rapidjson.egg-info/SOURCES.txt +0 -0
  32. {python-rapidjson-1.18 → python-rapidjson-1.19}/python_rapidjson.egg-info/dependency_links.txt +0 -0
  33. {python-rapidjson-1.18 → python-rapidjson-1.19}/python_rapidjson.egg-info/top_level.txt +0 -0
  34. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/allocators.h +0 -0
  35. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -0
  36. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/document.h +0 -0
  37. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/encodedstream.h +0 -0
  38. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/encodings.h +0 -0
  39. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/error/en.h +0 -0
  40. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/error/error.h +0 -0
  41. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/filereadstream.h +0 -0
  42. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/filewritestream.h +0 -0
  43. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/fwd.h +0 -0
  44. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/biginteger.h +0 -0
  45. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/clzll.h +0 -0
  46. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/diyfp.h +0 -0
  47. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/dtoa.h +0 -0
  48. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/ieee754.h +0 -0
  49. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/itoa.h +0 -0
  50. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/meta.h +0 -0
  51. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/pow10.h +0 -0
  52. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/regex.h +0 -0
  53. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/stack.h +0 -0
  54. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/strfunc.h +0 -0
  55. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/strtod.h +0 -0
  56. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/internal/swap.h +0 -0
  57. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/istreamwrapper.h +0 -0
  58. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/memorybuffer.h +0 -0
  59. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/memorystream.h +0 -0
  60. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -0
  61. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -0
  62. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/ostreamwrapper.h +0 -0
  63. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/pointer.h +0 -0
  64. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/prettywriter.h +0 -0
  65. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/rapidjson.h +0 -0
  66. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/reader.h +0 -0
  67. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/schema.h +0 -0
  68. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/stream.h +0 -0
  69. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/stringbuffer.h +0 -0
  70. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/uri.h +0 -0
  71. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/include/rapidjson/writer.h +0 -0
  72. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/license.txt +0 -0
  73. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson/readme.md +0 -0
  74. {python-rapidjson-1.18 → python-rapidjson-1.19}/rapidjson_exact_version.txt +0 -0
  75. {python-rapidjson-1.18 → python-rapidjson-1.19}/requirements-test.txt +0 -0
  76. {python-rapidjson-1.18 → python-rapidjson-1.19}/requirements.txt +0 -0
  77. {python-rapidjson-1.18 → python-rapidjson-1.19}/setup.cfg +0 -0
  78. {python-rapidjson-1.18 → python-rapidjson-1.19}/setup.py +0 -0
  79. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/conftest.py +0 -0
  80. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_base_types.py +0 -0
  81. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_circular.py +0 -0
  82. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_dict_subclass.py +0 -0
  83. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_enum.py +0 -0
  84. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_memory_leaks.py +0 -0
  85. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_params.py +0 -0
  86. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_pass1.py +0 -0
  87. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_pass2.py +0 -0
  88. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_pass3.py +0 -0
  89. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_rawjson.py +0 -0
  90. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_refs_count.py +0 -0
  91. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_streams.py +0 -0
  92. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_unicode.py +0 -0
  93. {python-rapidjson-1.18 → python-rapidjson-1.19}/tests/test_validator.py +0 -0
  94. {python-rapidjson-1.18 → python-rapidjson-1.19}/tox.ini +0 -0
  95. {python-rapidjson-1.18 → python-rapidjson-1.19}/typings/rapidjson/__init__.pyi +0 -0
@@ -1,6 +1,14 @@
1
1
  Changes
2
2
  -------
3
3
 
4
+ 1.19 (2024-07-28)
5
+ ~~~~~~~~~~~~~~~~~
6
+
7
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
8
+
9
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
10
+
11
+
4
12
  1.18 (2024-06-29)
5
13
  ~~~~~~~~~~~~~~~~~
6
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-rapidjson
3
- Version: 1.18
3
+ Version: 1.19
4
4
  Summary: Python wrapper around rapidjson
5
5
  Home-page: https://github.com/python-rapidjson/python-rapidjson
6
6
  Author: Ken Robbins
@@ -155,6 +155,14 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
155
155
  Changes
156
156
  -------
157
157
 
158
+ 1.19 (2024-07-28)
159
+ ~~~~~~~~~~~~~~~~~
160
+
161
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
162
+
163
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
164
+
165
+
158
166
  1.18 (2024-06-29)
159
167
  ~~~~~~~~~~~~~~~~~
160
168
 
@@ -1,6 +1,14 @@
1
1
  Changes
2
2
  -------
3
3
 
4
+ 1.19 (2024-07-28)
5
+ ~~~~~~~~~~~~~~~~~
6
+
7
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
8
+
9
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
10
+
11
+
4
12
  1.18 (2024-06-29)
5
13
  ~~~~~~~~~~~~~~~~~
6
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-rapidjson
3
- Version: 1.18
3
+ Version: 1.19
4
4
  Summary: Python wrapper around rapidjson
5
5
  Home-page: https://github.com/python-rapidjson/python-rapidjson
6
6
  Author: Ken Robbins
@@ -155,6 +155,14 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
155
155
  Changes
156
156
  -------
157
157
 
158
+ 1.19 (2024-07-28)
159
+ ~~~~~~~~~~~~~~~~~
160
+
161
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
162
+
163
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
164
+
165
+
158
166
  1.18 (2024-06-29)
159
167
  ~~~~~~~~~~~~~~~~~
160
168
 
@@ -2443,10 +2443,7 @@ dumps_internal(
2443
2443
  Py_DECREF(intStrObj);
2444
2444
  }
2445
2445
  } else if (PyFloat_Check(object)) {
2446
- double d = PyFloat_AsDouble(object);
2447
- if (d == -1.0 && PyErr_Occurred())
2448
- return false;
2449
-
2446
+ double d = PyFloat_AS_DOUBLE(object);
2450
2447
  if (IS_NAN(d)) {
2451
2448
  if (numberMode & NM_NAN) {
2452
2449
  writer->RawValue("NaN", 3, kNumberType);
@@ -2469,7 +2466,7 @@ dumps_internal(
2469
2466
  // The RJ dtoa() produces "strange" results for particular values, see #101:
2470
2467
  // use Python's repr() to emit a raw value instead of writer->Double(d)
2471
2468
 
2472
- PyObject* dr = PyObject_Repr(object);
2469
+ PyObject* dr = PyFloat_Type.tp_repr(object);
2473
2470
 
2474
2471
  if (dr == NULL)
2475
2472
  return false;
@@ -3,7 +3,7 @@
3
3
  # :Author: John Anderson <sontek@gmail.com>
4
4
  # :License: MIT License
5
5
  # :Copyright: © 2015 John Anderson
6
- # :Copyright: © 2016, 2017, 2020 Lele Gaifax
6
+ # :Copyright: © 2016, 2017, 2020, 2024 Lele Gaifax
7
7
  #
8
8
 
9
9
  from decimal import Decimal
@@ -159,3 +159,15 @@ def test_nan_c():
159
159
  dumped = rj.Encoder(number_mode=rj.NM_DECIMAL|rj.NM_NAN)(d)
160
160
  loaded = rj.Decoder(number_mode=rj.NM_DECIMAL|rj.NM_NAN)(dumped)
161
161
  assert loaded.is_nan()
162
+
163
+
164
+ def test_issue_213():
165
+ class CustomRepr(float):
166
+ def __repr__(self):
167
+ stdrepr = super().__repr__()
168
+ return f'CustomRepr({stdrepr})'
169
+
170
+ f = CustomRepr(123.45)
171
+ dumped = rj.dumps(f)
172
+ loaded = rj.loads(dumped)
173
+ assert loaded == 123.45
@@ -0,0 +1 @@
1
+ 1.19
@@ -1 +0,0 @@
1
- 1.18
File without changes
File without changes