cefast 0.2.0__tar.gz → 0.2.1__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.
- {cefast-0.2.0 → cefast-0.2.1}/PKG-INFO +1 -1
- {cefast-0.2.0 → cefast-0.2.1}/docs/cpp.rst +1 -1
- {cefast-0.2.0 → cefast-0.2.1}/docs/history.rst +7 -0
- {cefast-0.2.0 → cefast-0.2.1}/meson.build +1 -1
- {cefast-0.2.0 → cefast-0.2.1}/pycefast/_cefast.cpp +14 -8
- {cefast-0.2.0 → cefast-0.2.1}/tests/python/test_cefast.py +13 -0
- {cefast-0.2.0 → cefast-0.2.1}/.clang-format +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/.github/dependabot.yml +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/.github/workflows/tests.yml +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/.github/workflows/wheels.yml +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/.gitignore +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/.readthedocs.yaml +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/COPYING +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/README.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/cefast/__init__.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/cefast/_repr.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/cefast/_version.py.in +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/cefast/meson.build +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/_static/playground.css +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/_static/playground.js +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/accepted-deviations.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/api.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/cef.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/check_examples.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/conf.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/contributing.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/cookbook.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/deviations.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/faq.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/images/cefast_logo.png +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/index.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/installation.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/perf/2026-11-round1-profile.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/perf/2026-11-round5-parallel.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/perf/2026-11-round6-small-files.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/perf/2026-11-round7.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/performance.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/quickstart.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/reading.rst +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/requirements.txt +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-cefast-reader.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-cefast-speed-round2.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-cefast-speed-round3.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-cefast-speed.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-cpp-utils-python.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-05-plan-review-opencode.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-06-cefast-speed-round4.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-06-cefast-speed-round5.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-06-cefast-speed-round6.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/plans/2026-11-06-cefast-speed-round7.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/specs/2026-11-05-cef-facts.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/specs/2026-11-05-cefast-design.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/docs/superpowers/specs/2026-11-05-csa-cef-probe.md +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/cefast.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/data/parallel.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/data/records.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/data/structural.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/data/workers.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/errors.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/gzip.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/header/attributes.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/header/lexer.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/header/parser.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/input.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/model.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/time.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/include/cefast/values.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/meson_options.txt +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/pycefast/meson.build +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/pyproject.toml +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/catch2.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/cpp_utils.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/fast_float.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/hedley.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/pybind11.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/subprojects/zlib.wrap +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_corpus.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_header.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_input.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_lexer.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_records.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_time.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/cpp/test_values.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/meson.build +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/python/test_vs_ceflib.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/csa_manifest.json +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/codif-header.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/hello.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/hello.cef.gz +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/broken.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/broken.ceh +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/common.ceh +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/cycle-a.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/cycle-b.ceh +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/main.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/include/nested.ceh +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/trailing_zeros.cef.gz +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/truncated.cef.gz +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/two_members.cef.gz +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/fixtures/whi-header.cef +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/resources/make_gz.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tests/wheel/test_wheel.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/bench/bench_load.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/bench/meson.build +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/ceflib/benchmark.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/ceflib/build_ceflib.sh +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fetch_csa_corpus.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/cef.dict +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/compare.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_float.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_lexer.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_lexer_diff.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_load.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_records_diff.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/fuzz_time.cpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/make_corpus.py +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/meson.build +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/reference_lexer.hpp +0 -0
- {cefast-0.2.0 → cefast-0.2.1}/tools/fuzz/reference_records.hpp +0 -0
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
History
|
|
3
3
|
=======
|
|
4
4
|
|
|
5
|
+
0.2.1 (2026-11-08)
|
|
6
|
+
==================
|
|
7
|
+
|
|
8
|
+
- A key that is not text is missing, as in a :class:`dict`: ``None in f`` is false,
|
|
9
|
+
``f.get(None)`` returns the default and ``f[None]`` raises :class:`KeyError`. They used to
|
|
10
|
+
raise :class:`TypeError`.
|
|
11
|
+
|
|
5
12
|
0.2.0 (2026-11-08)
|
|
6
13
|
==================
|
|
7
14
|
|
|
@@ -193,22 +193,28 @@ struct py_cef
|
|
|
193
193
|
{
|
|
194
194
|
std::shared_ptr<cefast::cef_file> file;
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
// Keys of any type, like a dict: a key that is not text is simply not there.
|
|
197
|
+
[[nodiscard]] std::optional<std::size_t> find(const py::handle& key) const
|
|
197
198
|
{
|
|
199
|
+
if (!py::isinstance<py::str>(key))
|
|
200
|
+
return std::nullopt;
|
|
201
|
+
const auto name = key.cast<std::string>();
|
|
198
202
|
for (std::size_t index = 0; index < file->variables.size(); ++index)
|
|
199
203
|
if (file->variables[index].name == name)
|
|
200
|
-
return
|
|
201
|
-
|
|
204
|
+
return index;
|
|
205
|
+
return std::nullopt;
|
|
202
206
|
}
|
|
203
207
|
|
|
204
|
-
[[nodiscard]]
|
|
208
|
+
[[nodiscard]] py_variable getitem(const py::object& key) const
|
|
205
209
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
if (const auto index = find(key))
|
|
211
|
+
return py_variable { file, *index };
|
|
212
|
+
PyErr_SetObject(PyExc_KeyError, key.ptr());
|
|
213
|
+
throw py::error_already_set();
|
|
210
214
|
}
|
|
211
215
|
|
|
216
|
+
[[nodiscard]] bool contains(const py::object& key) const { return find(key).has_value(); }
|
|
217
|
+
|
|
212
218
|
[[nodiscard]] std::size_t len() const { return file->variables.size(); }
|
|
213
219
|
[[nodiscard]] py::dict attributes() const { return attributes_of(file->globals); }
|
|
214
220
|
|
|
@@ -340,6 +340,19 @@ class TestMapping(unittest.TestCase):
|
|
|
340
340
|
def test_dict_conversion(self):
|
|
341
341
|
self.assertEqual(list(dict(self.f)), ["time_tags", "B_vec", "label"])
|
|
342
342
|
|
|
343
|
+
def test_keys_that_are_not_text_are_missing_like_in_a_dict(self):
|
|
344
|
+
for key in (None, 1, b"B_vec"):
|
|
345
|
+
self.assertNotIn(key, self.f)
|
|
346
|
+
self.assertIsNone(self.f.get(key))
|
|
347
|
+
self.assertEqual(self.f.get(key, 42), 42)
|
|
348
|
+
with self.assertRaises(KeyError):
|
|
349
|
+
self.f[key]
|
|
350
|
+
|
|
351
|
+
def test_missing_key_error_holds_the_key(self):
|
|
352
|
+
with self.assertRaises(KeyError) as caught:
|
|
353
|
+
self.f["missing"]
|
|
354
|
+
self.assertEqual(caught.exception.args, ("missing",))
|
|
355
|
+
|
|
343
356
|
def test_still_read_only(self):
|
|
344
357
|
with self.assertRaises(TypeError):
|
|
345
358
|
self.f["x"] = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|