quasardb 3.14.2.dev0__cp311-cp311-macosx_11_0_arm64.whl → 3.14.2.dev4__cp311-cp311-macosx_11_0_arm64.whl

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.

Potentially problematic release.


This version of quasardb might be problematic. Click here for more details.

Files changed (95) hide show
  1. quasardb/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  2. quasardb/Makefile +20 -20
  3. quasardb/__init__.py +33 -4
  4. quasardb/cmake_install.cmake +7 -1
  5. quasardb/date/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  6. quasardb/date/CMakeFiles/Export/a52b05f964b070ee926bcad51d3288af/dateTargets.cmake +13 -13
  7. quasardb/date/Makefile +20 -20
  8. quasardb/date/cmake_install.cmake +7 -1
  9. quasardb/date/dateConfigVersion.cmake +9 -2
  10. quasardb/date/dateTargets.cmake +4 -8
  11. quasardb/libqdb_api.dylib +0 -0
  12. quasardb/numpy/__init__.py +58 -10
  13. quasardb/pandas/__init__.py +58 -102
  14. quasardb/pybind11/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  15. quasardb/pybind11/Makefile +20 -20
  16. quasardb/pybind11/cmake_install.cmake +7 -1
  17. quasardb/quasardb.cpython-311-darwin.so +0 -0
  18. quasardb/range-v3/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  19. quasardb/range-v3/CMakeFiles/Export/d94ef200eca10a819b5858b33e808f5b/range-v3-targets.cmake +13 -13
  20. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/DependInfo.cmake +6 -2
  21. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/build.make +7 -4
  22. quasardb/range-v3/Makefile +20 -20
  23. quasardb/range-v3/cmake_install.cmake +19 -1
  24. quasardb/range-v3/range-v3-config-version.cmake +9 -2
  25. quasardb/range-v3/range-v3-config.cmake +4 -8
  26. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev4.dist-info}/METADATA +15 -10
  27. quasardb-3.14.2.dev4.dist-info/RECORD +45 -0
  28. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev4.dist-info}/WHEEL +1 -1
  29. quasardb/CMakeLists.txt +0 -500
  30. quasardb/batch_column.hpp +0 -80
  31. quasardb/batch_inserter.hpp +0 -248
  32. quasardb/blob.hpp +0 -150
  33. quasardb/cluster.cpp +0 -89
  34. quasardb/cluster.hpp +0 -551
  35. quasardb/concepts.hpp +0 -278
  36. quasardb/continuous.cpp +0 -149
  37. quasardb/continuous.hpp +0 -106
  38. quasardb/convert/array.hpp +0 -282
  39. quasardb/convert/point.hpp +0 -330
  40. quasardb/convert/range.hpp +0 -282
  41. quasardb/convert/unicode.hpp +0 -598
  42. quasardb/convert/util.hpp +0 -22
  43. quasardb/convert/value.hpp +0 -711
  44. quasardb/convert.hpp +0 -38
  45. quasardb/detail/qdb_resource.hpp +0 -129
  46. quasardb/detail/ts_column.hpp +0 -224
  47. quasardb/direct_blob.hpp +0 -108
  48. quasardb/direct_handle.hpp +0 -83
  49. quasardb/direct_integer.hpp +0 -94
  50. quasardb/dispatch.hpp +0 -157
  51. quasardb/double.hpp +0 -87
  52. quasardb/entry.hpp +0 -273
  53. quasardb/error.hpp +0 -318
  54. quasardb/handle.cpp +0 -29
  55. quasardb/handle.hpp +0 -98
  56. quasardb/integer.hpp +0 -88
  57. quasardb/logger.cpp +0 -106
  58. quasardb/logger.hpp +0 -228
  59. quasardb/masked_array.hpp +0 -651
  60. quasardb/metrics.cpp +0 -103
  61. quasardb/metrics.hpp +0 -112
  62. quasardb/module.cpp +0 -76
  63. quasardb/module.hpp +0 -24
  64. quasardb/node.hpp +0 -123
  65. quasardb/numpy.cpp +0 -6
  66. quasardb/numpy.hpp +0 -489
  67. quasardb/object_tracker.hpp +0 -283
  68. quasardb/options.hpp +0 -244
  69. quasardb/perf.hpp +0 -336
  70. quasardb/pytypes.hpp +0 -221
  71. quasardb/query.cpp +0 -420
  72. quasardb/query.hpp +0 -92
  73. quasardb/reader/ts_row.hpp +0 -281
  74. quasardb/reader/ts_value.hpp +0 -245
  75. quasardb/remove_cvref.hpp +0 -31
  76. quasardb/string.hpp +0 -160
  77. quasardb/table.cpp +0 -289
  78. quasardb/table.hpp +0 -325
  79. quasardb/table_reader.hpp +0 -220
  80. quasardb/tag.hpp +0 -77
  81. quasardb/timestamp.hpp +0 -97
  82. quasardb/traits.hpp +0 -619
  83. quasardb/ts_iterator.hpp +0 -193
  84. quasardb/utils/blob_deque.hpp +0 -96
  85. quasardb/utils/ostream.hpp +0 -17
  86. quasardb/utils/permutation.hpp +0 -50
  87. quasardb/utils/stable_sort.hpp +0 -25
  88. quasardb/utils/unzip_view.hpp +0 -89
  89. quasardb/utils.cpp +0 -28
  90. quasardb/utils.hpp +0 -174
  91. quasardb/writer.cpp +0 -534
  92. quasardb/writer.hpp +0 -396
  93. quasardb-3.14.2.dev0.dist-info/RECORD +0 -109
  94. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev4.dist-info}/LICENSE.md +0 -0
  95. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev4.dist-info}/top_level.txt +0 -0
quasardb/logger.hpp DELETED
@@ -1,228 +0,0 @@
1
- /*
2
- *
3
- * Official Python API
4
- *
5
- * Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
6
- * All rights reserved.
7
- *
8
- * Redistribution and use in source and binary forms, with or without
9
- * modification, are permitted provided that the following conditions are met:
10
- *
11
- * * Redistributions of source code must retain the above copyright
12
- * notice, this list of conditions and the following disclaimer.
13
- * * Redistributions in binary form must reproduce the above copyright
14
- * notice, this list of conditions and the following disclaimer in the
15
- * documentation and/or other materials provided with the distribution.
16
- * * Neither the name of quasardb nor the names of its contributors may
17
- * be used to endorse or promote products derived from this software
18
- * without specific prior written permission.
19
- *
20
- * THIS SOFTWARE IS PROVIDED BY QUASARDB AND CONTRIBUTORS ``AS IS'' AND ANY
21
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
24
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- */
31
- #pragma once
32
-
33
- #include <qdb/log.h>
34
- #include <pybind11/pybind11.h>
35
- #include <atomic>
36
- #include <mutex>
37
-
38
- namespace qdb
39
- {
40
- namespace py = pybind11;
41
-
42
- /**
43
- * Utility class that wraps around Python's logging module. Should *not*
44
- * be used from Python directly, and as such is not registered as a Python
45
- * class.
46
- *
47
- * Note that every log invocations calls a python function, causes a bunch
48
- * of reflections, and is generally as slow as you expect it to be. This cannot
49
- * be optimized.
50
- *
51
- * As such, try to keep this logging out of the critical performance path.
52
- */
53
- class logger
54
- {
55
- public:
56
- /**
57
- * Default constructor, invoking any .debug() etc on a default initialized
58
- * instantiation of this class leads to undefined behavior, but it's needed
59
- * for certain situations.
60
- */
61
- logger(){};
62
-
63
- /**
64
- * Simple logger instance, all complexity is handled in the logging handlers.
65
- */
66
- logger(const std::string & module_name)
67
- : _module_name(module_name)
68
- {}
69
-
70
- public:
71
- /**
72
- * Wraps logger.debug
73
- */
74
- template <typename... Args>
75
- void debug(Args &&... args) const
76
- {
77
- _log("debug", std::forward<Args>(args)...);
78
- }
79
-
80
- /**
81
- * Wraps logger.info
82
- */
83
- template <typename... Args>
84
- void info(Args &&... args) const
85
- {
86
- _log("info", std::forward<Args>(args)...);
87
- }
88
-
89
- /**
90
- * Wraps logger.warn
91
- */
92
- template <typename... Args>
93
- void warn(Args &&... args) const
94
- {
95
- _log("warning", std::forward<Args>(args)...);
96
- }
97
-
98
- /**
99
- * Wraps logger.error
100
- */
101
- template <typename... Args>
102
- void error(Args &&... args) const
103
- {
104
- _log("error", std::forward<Args>(args)...);
105
- }
106
-
107
- /**
108
- * Wraps logger.critical
109
- */
110
- template <typename... Args>
111
- void critical(Args &&... args) const
112
- {
113
- _log("critical", std::forward<Args>(args)...);
114
- }
115
-
116
- private:
117
- template <typename... Args>
118
- void _log(Args &&... args) const
119
- {
120
- _do_log(_module_name, std::forward<Args>(args)...);
121
- }
122
-
123
- template <typename... Args>
124
- static void _do_log(
125
- std::string const & module_name, char const * level, const std::string & msg, Args &&... args)
126
- {
127
- /**
128
- * Calls Python imports, functions, etc, reflection kicks in, relatively slow.
129
- *
130
- * BUGFIX(leon) 2021-02-08
131
- *
132
- * We were observing crashes upon process exit, which were related to persistent
133
- * references to this logger being kept in logger.cpp. We got a double-free, due
134
- * to an incorrect reference count being observed.
135
- *
136
- * We now do all the reflection / lookups inside this function, which causes
137
- * a performance degradation, but makes reasoning over object ownership /
138
- * lifecycle much easier, thus no more double-free reference-counted issues.
139
- *
140
- * A future improvement would be to figure out how to properly deal with
141
- * Python's reference counting + persistent object ownership, possibly by
142
- * installing a cleanup handler.
143
- */
144
- py::module logging = py::module::import("logging");
145
- py::object get_logger = logging.attr("getLogger");
146
- py::object logger = get_logger(module_name);
147
- py::object logfn = logger.attr(level);
148
-
149
- char const * errors = NULL;
150
- PyObject * buf = PyUnicode_DecodeLatin1(msg.data(), msg.size(), errors);
151
- assert(buf != NULL);
152
- assert(errors == NULL);
153
-
154
- py::str buf_ = py::reinterpret_steal<py::str>(buf);
155
-
156
- logfn(buf_, std::forward<Args>(args)...);
157
- }
158
-
159
- private:
160
- std::string _module_name;
161
- };
162
-
163
- /**
164
- * QuasarDB's logging handler works with callbacks, and unfortunately is fairly
165
- * error prone to 'just keep exactly one callback': if there are no active
166
- * sessions left, the callback is removed.
167
- *
168
- * As such, the only way to bridge this logging API with QuasarDB's is to:
169
- *
170
- * - frequently (i.e. every new connection) remove any existing callbacks and
171
- * set our new callback.
172
- *
173
- * - when a callback is invoked, keep a local container with buffered logs.
174
- *
175
- * - from all other functions, basically after every native qdb call, flush all
176
- * buffered logs.
177
- *
178
- * - unfortunately, QuasarDB also buffers the logs before triggering callbacks,
179
- * so it is unlikely that relevant logs are already present here right after an
180
- * error. :'(
181
- *
182
- */
183
-
184
- namespace native
185
- {
186
-
187
- typedef struct
188
- {
189
- int year;
190
- int mon;
191
- int day;
192
- int hour;
193
- int min;
194
- int sec;
195
- } message_time_t;
196
-
197
- typedef struct
198
- {
199
- qdb_log_level_t level;
200
- message_time_t timestamp;
201
-
202
- int pid;
203
- int tid;
204
- std::string message;
205
-
206
- } message_t;
207
-
208
- void swap_callback();
209
-
210
- void flush();
211
-
212
- void _callback( //
213
- qdb_log_level_t log_level, // qdb log level
214
- const unsigned long * date, // [years, months, day, hours, minute, seconds] (valid only in the
215
- // context of the callback)
216
- unsigned long pid, // process id
217
- unsigned long tid, // thread id
218
- const char * message_buffer, // message buffer (valid only in the context of the callback)
219
- size_t message_size); // message buffer size
220
-
221
- /**
222
- * Implementation function of flush(), which assumes that locks have been
223
- * acquired and buffer actually contains logs.
224
- */
225
- void _do_flush();
226
- } // namespace native
227
-
228
- } // namespace qdb