dotted-notation 0.48.0__tar.gz → 0.48.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.
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/CHANGELOG.md +10 -0
- {dotted_notation-0.48.0/dotted_notation.egg-info → dotted_notation-0.48.1}/PKG-INFO +9 -1
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/README.md +8 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/grammar.py +6 -2
- {dotted_notation-0.48.0 → dotted_notation-0.48.1/dotted_notation.egg-info}/PKG-INFO +9 -1
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/pyproject.toml +1 -1
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/LICENSE +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/MANIFEST.in +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/__init__.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/__main__.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/access.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/access.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/api.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/base.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/base.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/cli/__init__.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/cli/_compat.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/cli/formats.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/cli/main.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/containers.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/engine.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/engine.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/filters.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/filters.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/groups.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/groups.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/matchers.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/matchers.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/native.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/predicates.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/recursive.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/recursive.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/results.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/sql/__init__.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/sql/core.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/sql/pg.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/transforms.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/utils.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/utypes.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/wrappers.pxd +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted/wrappers.py +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/SOURCES.txt +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/dependency_links.txt +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/entry_points.txt +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/requires.txt +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/top_level.txt +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/setup.cfg +0 -0
- {dotted_notation-0.48.0 → dotted_notation-0.48.1}/setup.py +0 -0
|
@@ -3,6 +3,16 @@
|
|
|
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.48.1]
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- A sigil token in a transform argument, guard value or filter value may
|
|
10
|
+
carry a dotted path: `|min:$amount.value`, `=^lots.taken`. It is one
|
|
11
|
+
string, offered whole to a resolver with `literals = True`, and the
|
|
12
|
+
literal string without one. `$amount.value` was a `ParseError` there
|
|
13
|
+
and `^lots.taken` a raw string no resolver saw, so the transform
|
|
14
|
+
failed silently (#60). In a segment the dot still separates segments.
|
|
15
|
+
|
|
6
16
|
## [0.48.0]
|
|
7
17
|
|
|
8
18
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotted_notation
|
|
3
|
-
Version: 0.48.
|
|
3
|
+
Version: 0.48.1
|
|
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-Expression: MIT
|
|
@@ -1728,6 +1728,14 @@ A `$` before a word is not a substitution at all: `$str` is the plain string
|
|
|
1728
1728
|
>>> dotted.get({'$amount': {'value': 2}}, '$amount.value')
|
|
1729
1729
|
2
|
|
1730
1730
|
|
|
1731
|
+
In a guard value or transform argument the token may carry dots,
|
|
1732
|
+
`|min:$amount.value` or `=^lots.taken`, and is still one string; a
|
|
1733
|
+
[custom resolver](#custom-resolvers) reads it whole. In a segment the dot
|
|
1734
|
+
separates segments, so there `$amount.value` is two:
|
|
1735
|
+
|
|
1736
|
+
>>> dotted.get({'a': None}, 'a|coalesce:$amount.value')
|
|
1737
|
+
'$amount.value'
|
|
1738
|
+
|
|
1731
1739
|
<a id="type-restrictions"></a>
|
|
1732
1740
|
## Type Restrictions
|
|
1733
1741
|
|
|
@@ -1681,6 +1681,14 @@ A `$` before a word is not a substitution at all: `$str` is the plain string
|
|
|
1681
1681
|
>>> dotted.get({'$amount': {'value': 2}}, '$amount.value')
|
|
1682
1682
|
2
|
|
1683
1683
|
|
|
1684
|
+
In a guard value or transform argument the token may carry dots,
|
|
1685
|
+
`|min:$amount.value` or `=^lots.taken`, and is still one string; a
|
|
1686
|
+
[custom resolver](#custom-resolvers) reads it whole. In a segment the dot
|
|
1687
|
+
separates segments, so there `$amount.value` is two:
|
|
1688
|
+
|
|
1689
|
+
>>> dotted.get({'a': None}, 'a|coalesce:$amount.value')
|
|
1690
|
+
'$amount.value'
|
|
1691
|
+
|
|
1684
1692
|
<a id="type-restrictions"></a>
|
|
1685
1693
|
## Type Restrictions
|
|
1686
1694
|
|
|
@@ -279,6 +279,10 @@ _raw_subst = pp.Regex(r'\$[0-9]+').set_parse_action(
|
|
|
279
279
|
# $str, a $ before a word: a plain string, as ^str is. Not $0, $(name) or $$(path).
|
|
280
280
|
_dollar_word = pp.Regex(r'\$(?![0-9($])[^' + re.escape(reserved) + r' \t\n\r]+').set_parse_action(matchers.Word)
|
|
281
281
|
var = _escaped_dollar | _reference | _paren_subst | _raw_subst | _dollar_word
|
|
282
|
+
# In an argument or value position a sigil token may carry a dotted path,
|
|
283
|
+
# |min:$amount.value or =^lots.taken: one string, for a resolver to read
|
|
284
|
+
# whole. In a segment position the . separates segments, so not there.
|
|
285
|
+
_arg_sigil = pp.Regex(r'(?:\$(?![0-9($])|\^)[^' + re.escape(reserved.replace('.', '')) + r' \t\n\r]+').set_parse_action(matchers.Word)
|
|
282
286
|
slice = pp.Optional(integer | plus) + ':' + pp.Optional(integer | plus) \
|
|
283
287
|
+ pp.Optional(':') + pp.Optional(integer | plus)
|
|
284
288
|
|
|
@@ -535,7 +539,7 @@ concrete_value <<= (
|
|
|
535
539
|
value = pp.Forward()
|
|
536
540
|
_value_group_inner = value + OM(_ccomma + value)
|
|
537
541
|
value_group = (S('(') + _value_group_inner + S(')')).set_parse_action(lambda t: [ct.ValueGroup(*t)])
|
|
538
|
-
value <<= value_group | container_value | string_glob | bytes_literal | string | wildcard | var | regex | numeric_quoted | none | true | false | numeric_extended | numeric_slot
|
|
542
|
+
value <<= value_group | container_value | string_glob | bytes_literal | string | wildcard | _arg_sigil | var | regex | numeric_quoted | none | true | false | numeric_extended | numeric_slot
|
|
539
543
|
# ---------------------------------------------------------------------------
|
|
540
544
|
# Concat: part+part for key construction using Python's native + operator.
|
|
541
545
|
# Each part can carry per-part transforms: part|xform+part|xform
|
|
@@ -545,7 +549,7 @@ _key_atom = _commons | numeric_extended | non_integer | numeric_key | word
|
|
|
545
549
|
_slot_atom = _commons | numeric_extended | numeric_slot
|
|
546
550
|
|
|
547
551
|
# Transform: |name or |name:param — defined early so filters and guards can reference it
|
|
548
|
-
targ = concrete_value | var | quoted | ppc.number | none | true | false | pp.CharsNotIn('|:')
|
|
552
|
+
targ = concrete_value | _arg_sigil | var | quoted | ppc.number | none | true | false | pp.CharsNotIn('|:')
|
|
549
553
|
param = (colon + targ) | colon.copy().set_parse_action(lambda: [None])
|
|
550
554
|
transform = (transform_name.copy() + ZM(param)).set_parse_action(lambda s, loc, t: base.Transform(*t))
|
|
551
555
|
transforms = ZM(pipe + transform)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotted_notation
|
|
3
|
-
Version: 0.48.
|
|
3
|
+
Version: 0.48.1
|
|
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-Expression: MIT
|
|
@@ -1728,6 +1728,14 @@ A `$` before a word is not a substitution at all: `$str` is the plain string
|
|
|
1728
1728
|
>>> dotted.get({'$amount': {'value': 2}}, '$amount.value')
|
|
1729
1729
|
2
|
|
1730
1730
|
|
|
1731
|
+
In a guard value or transform argument the token may carry dots,
|
|
1732
|
+
`|min:$amount.value` or `=^lots.taken`, and is still one string; a
|
|
1733
|
+
[custom resolver](#custom-resolvers) reads it whole. In a segment the dot
|
|
1734
|
+
separates segments, so there `$amount.value` is two:
|
|
1735
|
+
|
|
1736
|
+
>>> dotted.get({'a': None}, 'a|coalesce:$amount.value')
|
|
1737
|
+
'$amount.value'
|
|
1738
|
+
|
|
1731
1739
|
<a id="type-restrictions"></a>
|
|
1732
1740
|
## Type Restrictions
|
|
1733
1741
|
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "dotted_notation"
|
|
9
|
-
version = "0.48.
|
|
9
|
+
version = "0.48.1"
|
|
10
10
|
description = "Dotted notation for safe nested data traversal with optional chaining, pattern matching, and transforms"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
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
|
|
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.48.0 → dotted_notation-0.48.1}/dotted_notation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|