dotted-notation 0.44.4__tar.gz → 0.44.5__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.4 → dotted_notation-0.44.5}/CHANGELOG.md +8 -0
- {dotted_notation-0.44.4/dotted_notation.egg-info → dotted_notation-0.44.5}/PKG-INFO +1 -1
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/api.py +7 -1
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/results.py +6 -5
- {dotted_notation-0.44.4 → dotted_notation-0.44.5/dotted_notation.egg-info}/PKG-INFO +1 -1
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/pyproject.toml +1 -1
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/LICENSE +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/MANIFEST.in +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/README.md +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/__init__.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/__main__.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/access.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/base.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/cli/__init__.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/cli/_compat.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/cli/formats.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/cli/main.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/containers.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/engine.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/filters.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/grammar.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/groups.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/matchers.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/predicates.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/recursive.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/sql/__init__.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/sql/core.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/sql/pg.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/transforms.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/utils.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/utypes.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted/wrappers.py +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/SOURCES.txt +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/dependency_links.txt +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/entry_points.txt +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/requires.txt +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/top_level.txt +0 -0
- {dotted_notation-0.44.4 → dotted_notation-0.44.5}/setup.cfg +0 -0
|
@@ -3,6 +3,14 @@
|
|
|
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.5]
|
|
7
|
+
|
|
8
|
+
### Performance
|
|
9
|
+
- Transforms no longer disqualify the get() fast path: `a.b|int`
|
|
10
|
+
resolves via the direct-lookup chain and applies transforms on the
|
|
11
|
+
hit (~7x faster than walk). Plain paths are unaffected; `is_simple()`
|
|
12
|
+
semantics unchanged (still requires no transforms).
|
|
13
|
+
|
|
6
14
|
## [0.44.4]
|
|
7
15
|
|
|
8
16
|
### Added
|
|
@@ -287,6 +287,8 @@ def is_simple(path):
|
|
|
287
287
|
False
|
|
288
288
|
"""
|
|
289
289
|
parsed = path if isinstance(path, results.Dotted) else parse(path)
|
|
290
|
+
if parsed.transforms:
|
|
291
|
+
return False
|
|
290
292
|
return parsed.simple_chain is not None
|
|
291
293
|
|
|
292
294
|
|
|
@@ -451,7 +453,11 @@ def get(obj, path, default=None, pattern_default=(), apply_transforms=True, stri
|
|
|
451
453
|
if chain is not None:
|
|
452
454
|
val = engine.simple_get(chain, obj, strict=strict)
|
|
453
455
|
if val is not engine.SIMPLE_BAIL:
|
|
454
|
-
|
|
456
|
+
if val is base.marker:
|
|
457
|
+
return default
|
|
458
|
+
if apply_transforms and ops.transforms:
|
|
459
|
+
return ops.apply(val)
|
|
460
|
+
return val
|
|
455
461
|
vals = engine.iter_until_cut(engine.gets(ops, obj, strict=strict))
|
|
456
462
|
if apply_transforms:
|
|
457
463
|
vals = ( ops.apply(v) for v in vals )
|
|
@@ -113,13 +113,14 @@ class Dotted:
|
|
|
113
113
|
@lazyprop
|
|
114
114
|
def simple_chain(self):
|
|
115
115
|
"""
|
|
116
|
-
Tuple of (kind, key) pairs when
|
|
117
|
-
of concrete Key/Attr/Slot accesses with no patterns,
|
|
118
|
-
references, guards,
|
|
119
|
-
|
|
116
|
+
Tuple of (kind, key) pairs when the access chain is simple — a plain
|
|
117
|
+
chain of concrete Key/Attr/Slot accesses with no patterns,
|
|
118
|
+
substitutions, references, guards, or filters — else None. Transforms
|
|
119
|
+
are permitted (they apply after the lookup). Computed once and
|
|
120
|
+
cached; drives the fast path in get() that skips walk().
|
|
120
121
|
kind is 'key', 'attr', or 'slot'.
|
|
121
122
|
"""
|
|
122
|
-
if self.
|
|
123
|
+
if self.guard is not None:
|
|
123
124
|
return None
|
|
124
125
|
chain = []
|
|
125
126
|
for op in self.ops:
|
|
@@ -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.5"
|
|
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.4 → dotted_notation-0.44.5}/dotted_notation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|