dotted-notation 0.44.9__tar.gz → 0.44.10__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.
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/CHANGELOG.md +30 -0
- {dotted_notation-0.44.9/dotted_notation.egg-info → dotted_notation-0.44.10}/PKG-INFO +7 -1
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/README.md +6 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/api.py +20 -2
- {dotted_notation-0.44.9 → dotted_notation-0.44.10/dotted_notation.egg-info}/PKG-INFO +7 -1
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/pyproject.toml +1 -1
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/LICENSE +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/MANIFEST.in +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/__init__.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/__main__.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/access.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/base.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/cli/__init__.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/cli/_compat.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/cli/formats.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/cli/main.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/containers.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/engine.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/filters.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/grammar.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/groups.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/matchers.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/predicates.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/recursive.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/results.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/sql/__init__.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/sql/core.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/sql/pg.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/transforms.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/utils.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/utypes.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted/wrappers.py +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/SOURCES.txt +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/dependency_links.txt +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/entry_points.txt +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/requires.txt +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/top_level.txt +0 -0
- {dotted_notation-0.44.9 → dotted_notation-0.44.10}/setup.cfg +0 -0
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to `dotted` are recorded here. Versions prior to
|
|
4
4
|
the ones listed are omitted — browse git history for earlier entries.
|
|
5
5
|
|
|
6
|
+
## [0.44.10]
|
|
7
|
+
|
|
8
|
+
### Performance
|
|
9
|
+
- `build()` and `build_multi()` keep the parsed paths they expand
|
|
10
|
+
instead of assembling each one to a string and parsing it again. A
|
|
11
|
+
pattern matching more paths than the parse cache holds (300) used to
|
|
12
|
+
miss on every one; `build` over 1000 matches is about 35x faster.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Three edge cases of `build()` change with the string round trip gone:
|
|
16
|
+
with `strict=True`, a trailing `[]` or `[:]` now creates the empty
|
|
17
|
+
list where it was a no-op, and raises `TypeError` on a list root; a
|
|
18
|
+
wildcard over keys that cannot be written as a path, such as `None` or
|
|
19
|
+
`True`, now succeeds where it raised `AttributeError`.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Benchmark suite: `python -m benchmarks` or `make bench`. Times reads
|
|
23
|
+
and writes at two data sizes, and the copying cases under both
|
|
24
|
+
`copy.deepcopy` and copium. Results can be saved and compared.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- `make` targets failed because the install rule depended on
|
|
28
|
+
`setup.py`, removed in the move to `pyproject.toml`.
|
|
29
|
+
|
|
30
|
+
### Documentation
|
|
31
|
+
- README caveat for the `copium` extra: copium 0.1.0 gets slower at
|
|
32
|
+
copying small objects once it has copied a large one in the same
|
|
33
|
+
process. Reported upstream as
|
|
34
|
+
[copium#54](https://github.com/percolab/copium/issues/54).
|
|
35
|
+
|
|
6
36
|
## [0.44.9]
|
|
7
37
|
|
|
8
38
|
### Performance
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotted_notation
|
|
3
|
-
Version: 0.44.
|
|
3
|
+
Version: 0.44.10
|
|
4
4
|
Summary: Dotted notation for safe nested data traversal with optional chaining, pattern matching, and transforms
|
|
5
5
|
Author-email: Frey Waid <logophage1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -83,6 +83,12 @@ For faster `mutable=False` updates and removes, install the
|
|
|
83
83
|
|
|
84
84
|
pip install dotted-notation[copium]
|
|
85
85
|
|
|
86
|
+
> **Caveat (copium 0.1.0):** after copium copies a large object, its copies of
|
|
87
|
+
> small objects in the same process become slower than `copy.deepcopy` and stay
|
|
88
|
+
> that way. Copying whole documents is 3-9x faster, but a long-running process
|
|
89
|
+
> that mixes one large copy with many small ones can come out slower overall.
|
|
90
|
+
> Tracked upstream in [copium#54](https://github.com/percolab/copium/issues/54).
|
|
91
|
+
|
|
86
92
|
## Table of Contents
|
|
87
93
|
|
|
88
94
|
- [Safe Traversal (Optional Chaining)](#safe-traversal-optional-chaining)
|
|
@@ -37,6 +37,12 @@ For faster `mutable=False` updates and removes, install the
|
|
|
37
37
|
|
|
38
38
|
pip install dotted-notation[copium]
|
|
39
39
|
|
|
40
|
+
> **Caveat (copium 0.1.0):** after copium copies a large object, its copies of
|
|
41
|
+
> small objects in the same process become slower than `copy.deepcopy` and stay
|
|
42
|
+
> that way. Copying whole documents is 3-9x faster, but a long-running process
|
|
43
|
+
> that mixes one large copy with many small ones can come out slower overall.
|
|
44
|
+
> Tracked upstream in [copium#54](https://github.com/percolab/copium/issues/54).
|
|
45
|
+
|
|
40
46
|
## Table of Contents
|
|
41
47
|
|
|
42
48
|
- [Safe Traversal (Optional Chaining)](#safe-traversal-optional-chaining)
|
|
@@ -396,6 +396,23 @@ _mutable = mutable
|
|
|
396
396
|
is_mutable = mutable
|
|
397
397
|
|
|
398
398
|
|
|
399
|
+
def _pluck_parsed(obj, ops, strict=False):
|
|
400
|
+
"""
|
|
401
|
+
Yield deduped (parsed path, value) pairs from obj matching `ops`.
|
|
402
|
+
Like pluck_multi, but the paths stay parsed so callers that hand them
|
|
403
|
+
straight back to dotted skip the assemble and re-parse.
|
|
404
|
+
"""
|
|
405
|
+
seen = set()
|
|
406
|
+
for path, val in engine.walk(ops, obj, paths=True, strict=strict):
|
|
407
|
+
if path is utypes.CUT_SENTINEL:
|
|
408
|
+
break
|
|
409
|
+
found = results.Dotted({'ops': path, 'transforms': ops.transforms})
|
|
410
|
+
if found in seen:
|
|
411
|
+
continue
|
|
412
|
+
seen.add(found)
|
|
413
|
+
yield (found, val)
|
|
414
|
+
|
|
415
|
+
|
|
399
416
|
def build_multi(obj, paths, strict=False, bindings=None):
|
|
400
417
|
"""
|
|
401
418
|
Build a subset/default obj based on concrete path fields
|
|
@@ -406,8 +423,9 @@ def build_multi(obj, paths, strict=False, bindings=None):
|
|
|
406
423
|
if obj is AUTO:
|
|
407
424
|
obj = _auto_root(((p, None) for p in paths))
|
|
408
425
|
for path in paths:
|
|
409
|
-
|
|
410
|
-
|
|
426
|
+
ops = parse(path, bindings=bindings, partial=False)
|
|
427
|
+
built = engine.build(ops, obj, strict=strict)
|
|
428
|
+
obj = update_multi(obj, _pluck_parsed(built, ops, strict=strict), strict=strict)
|
|
411
429
|
return obj
|
|
412
430
|
|
|
413
431
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotted_notation
|
|
3
|
-
Version: 0.44.
|
|
3
|
+
Version: 0.44.10
|
|
4
4
|
Summary: Dotted notation for safe nested data traversal with optional chaining, pattern matching, and transforms
|
|
5
5
|
Author-email: Frey Waid <logophage1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -83,6 +83,12 @@ For faster `mutable=False` updates and removes, install the
|
|
|
83
83
|
|
|
84
84
|
pip install dotted-notation[copium]
|
|
85
85
|
|
|
86
|
+
> **Caveat (copium 0.1.0):** after copium copies a large object, its copies of
|
|
87
|
+
> small objects in the same process become slower than `copy.deepcopy` and stay
|
|
88
|
+
> that way. Copying whole documents is 3-9x faster, but a long-running process
|
|
89
|
+
> that mixes one large copy with many small ones can come out slower overall.
|
|
90
|
+
> Tracked upstream in [copium#54](https://github.com/percolab/copium/issues/54).
|
|
91
|
+
|
|
86
92
|
## Table of Contents
|
|
87
93
|
|
|
88
94
|
- [Safe Traversal (Optional Chaining)](#safe-traversal-optional-chaining)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dotted_notation"
|
|
7
|
-
version = "0.44.
|
|
7
|
+
version = "0.44.10"
|
|
8
8
|
description = "Dotted notation for safe nested data traversal with optional chaining, pattern matching, and transforms"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.6"
|
|
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
|
{dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{dotted_notation-0.44.9 → dotted_notation-0.44.10}/dotted_notation.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|