drb 2.4.2__tar.gz → 2.4.3__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.
- {drb-2.4.2/drb.egg-info → drb-2.4.3}/PKG-INFO +1 -3
- {drb-2.4.2 → drb-2.4.3}/README.md +0 -2
- {drb-2.4.2 → drb-2.4.3}/drb/core/_version.py +3 -3
- {drb-2.4.2 → drb-2.4.3}/drb/topics/resolver.py +18 -0
- {drb-2.4.2 → drb-2.4.3/drb.egg-info}/PKG-INFO +1 -3
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/SOURCES.txt +1 -0
- drb-2.4.3/tests/test_scheme_force_url.py +81 -0
- {drb-2.4.2 → drb-2.4.3}/LICENCE.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/MANIFEST.in +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/addons/addon.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/context.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/cortex_validator.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/events.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/factory.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/impls.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/item.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/path.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/predicate.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/core/signature.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/file/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/file/cortex.ttl +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/file/file.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/xml/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/xml/cortex.ttl +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/xml/factory.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/drivers/xml/node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/exceptions/core.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/exceptions/file.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/keyring/bitwarden/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/keyring/bitwarden/bitwarden.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/nodes/abstract_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/nodes/logical_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/nodes/mutable_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/nodes/url_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/signatures/core.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/signatures/hierarchy.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/signatures/xquery.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/manager_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/rdf_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/topic_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/topic_schema.yml +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/dao/xml_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/file/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/file/cortex.ttl +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/topic.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/xml/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/topics/xml/cortex.ttl +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/utils/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/utils/drb_python_script.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/utils/plugins.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/utils/url_security.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/utils/utils.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/XQueryLexer.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/XQueryParser.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/XQueryParserListener.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/XQueryParserVisitor.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/__init__.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_cmd.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_context.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_func.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_item.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_res_to_string.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_utils.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_variable.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/drb_xquery_visitor.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb/xquery/exceptions.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/dependency_links.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/entry_points.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/not-zip-safe +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/requires.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/drb.egg-info/top_level.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/pyproject.toml +0 -0
- {drb-2.4.2 → drb-2.4.3}/requirements.txt +0 -0
- {drb-2.4.2 → drb-2.4.3}/setup.cfg +0 -0
- {drb-2.4.2 → drb-2.4.3}/setup.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_abstract_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_addon.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_children_unresolved.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_core_topic_ttl.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_cortex_validator.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_drb_node_list.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_drb_python_script.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_event.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_factory.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_factory_resolver.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_implementation_coupling.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_implementation_manager.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_keyring_bitwarden.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_logical_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_manager_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_manager_get_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_node_context.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_node_descendant.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_path.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_protocol_dispatch.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_rdf_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_rdf_dao_multi_url.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_rdf_dao_scheme.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_rdf_dao_signatures.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_scheme_force_impl.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_signature_exact.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_signature_hierarchy.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_signatures.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_topic.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_topic_descriptor_discovery.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_url_node.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_url_security.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/tests/test_xml_dao.py +0 -0
- {drb-2.4.2 → drb-2.4.3}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drb
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Data Request Broker
|
|
5
5
|
Author: GAEL Systems
|
|
6
6
|
Author-email: drb-python@gael.fr
|
|
@@ -65,8 +65,6 @@ You can also join the moderators team. Please contact me.
|
|
|
65
65
|
|
|
66
66
|
Contribution process is based on gitlab best practice and processes the following schema:
|
|
67
67
|
|
|
68
|
-

|
|
69
|
-
|
|
70
68
|
### How to contribute
|
|
71
69
|
Contributor shall work in its own fork of the project and provides its contributions via the merge request process.
|
|
72
70
|
The merge request shall be approved and merged by a maintainers. So the step-by-step procedure to contribute is:
|
|
@@ -36,8 +36,6 @@ You can also join the moderators team. Please contact me.
|
|
|
36
36
|
|
|
37
37
|
Contribution process is based on gitlab best practice and processes the following schema:
|
|
38
38
|
|
|
39
|
-

|
|
40
|
-
|
|
41
39
|
### How to contribute
|
|
42
40
|
Contributor shall work in its own fork of the project and provides its contributions via the merge request process.
|
|
43
41
|
The merge request shall be approved and merged by a maintainers. So the step-by-step procedure to contribute is:
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2026-06-
|
|
11
|
+
"date": "2026-06-26T23:35:37+0000",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.4.
|
|
14
|
+
"full-revisionid": "3fe10812b0582229d483dc9325051d2e70c16653",
|
|
15
|
+
"version": "2.4.3"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -283,6 +283,24 @@ class _DrbFactoryResolver(DrbFactory):
|
|
|
283
283
|
pp = urlparse(url)
|
|
284
284
|
|
|
285
285
|
if curl is None and path is None:
|
|
286
|
+
# Chained scheme "<base>+<forced>://": resolve the base URL
|
|
287
|
+
# normally -- walking the path through any container (e.g. a zip
|
|
288
|
+
# inside an S3 object) -- then apply each forced driver to the
|
|
289
|
+
# descended leaf. Without this, the forced token is crammed onto
|
|
290
|
+
# the whole-path base resource (e.g. an S3 object key that
|
|
291
|
+
# includes the in-archive path), which cannot be opened.
|
|
292
|
+
if pp.scheme and '+' in pp.scheme:
|
|
293
|
+
base, *tokens = pp.scheme.split('+')
|
|
294
|
+
if base == '' or any(t == '' for t in tokens):
|
|
295
|
+
raise DrbFactoryException(
|
|
296
|
+
f'Invalid scheme "{pp.scheme}": empty segment')
|
|
297
|
+
clean_url = base + url[len(pp.scheme):]
|
|
298
|
+
node = self.__create_from_url(clean_url)
|
|
299
|
+
for token in tokens:
|
|
300
|
+
_, factory = _resolve_token(token)
|
|
301
|
+
node = factory.create(node)
|
|
302
|
+
return node
|
|
303
|
+
|
|
286
304
|
try:
|
|
287
305
|
return self.create(UrlNode(url))
|
|
288
306
|
except (DrbFactoryException, DrbException,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drb
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Data Request Broker
|
|
5
5
|
Author: GAEL Systems
|
|
6
6
|
Author-email: drb-python@gael.fr
|
|
@@ -65,8 +65,6 @@ You can also join the moderators team. Please contact me.
|
|
|
65
65
|
|
|
66
66
|
Contribution process is based on gitlab best practice and processes the following schema:
|
|
67
67
|
|
|
68
|
-

|
|
69
|
-
|
|
70
68
|
### How to contribute
|
|
71
69
|
Contributor shall work in its own fork of the project and provides its contributions via the merge request process.
|
|
72
70
|
The merge request shall be approved and merged by a maintainers. So the step-by-step procedure to contribute is:
|
|
@@ -101,6 +101,7 @@ tests/test_rdf_dao_multi_url.py
|
|
|
101
101
|
tests/test_rdf_dao_scheme.py
|
|
102
102
|
tests/test_rdf_dao_signatures.py
|
|
103
103
|
tests/test_scheme_force_impl.py
|
|
104
|
+
tests/test_scheme_force_url.py
|
|
104
105
|
tests/test_signature_exact.py
|
|
105
106
|
tests/test_signature_hierarchy.py
|
|
106
107
|
tests/test_signatures.py
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from unittest.mock import patch, MagicMock
|
|
3
|
+
|
|
4
|
+
import drb.topics.resolver as resolver_mod
|
|
5
|
+
from drb.core.factory import DrbFactory
|
|
6
|
+
from drb.core.node import DrbNode
|
|
7
|
+
from drb.nodes.logical_node import DrbLogicalNode
|
|
8
|
+
from drb.nodes.url_node import UrlNode
|
|
9
|
+
from drb.exceptions.core import DrbFactoryException
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class _WrapFactory(DrbFactory):
|
|
13
|
+
"""Wraps the received node and records the call order on a shared list."""
|
|
14
|
+
def __init__(self, tag, order):
|
|
15
|
+
self.tag = tag
|
|
16
|
+
self.order = order
|
|
17
|
+
|
|
18
|
+
def _create(self, node: DrbNode) -> DrbNode:
|
|
19
|
+
self.order.append(self.tag)
|
|
20
|
+
wrapped = DrbLogicalNode(self.tag)
|
|
21
|
+
wrapped.append_child(node)
|
|
22
|
+
return wrapped
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class TestForcedSchemeUrl(unittest.TestCase):
|
|
26
|
+
"""``__create_from_url`` on a chained ``<base>+<forced>://`` scheme must
|
|
27
|
+
resolve the *base* URL (token stripped, so the existing path-walking can
|
|
28
|
+
descend any container) and then apply each forced driver to the resulting
|
|
29
|
+
leaf -- not cram the forced driver onto the whole-path base resource.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def _from_url(self, url, base_leaf, token_factories):
|
|
33
|
+
r = resolver_mod._DrbFactoryResolver()
|
|
34
|
+
with patch.object(r, 'create', return_value=base_leaf) as create, \
|
|
35
|
+
patch.object(resolver_mod, '_resolve_token',
|
|
36
|
+
side_effect=lambda tok: (MagicMock(),
|
|
37
|
+
token_factories[tok])):
|
|
38
|
+
result = r._DrbFactoryResolver__create_from_url(url)
|
|
39
|
+
return result, create
|
|
40
|
+
|
|
41
|
+
def test_base_url_resolved_with_token_stripped(self):
|
|
42
|
+
leaf = DrbLogicalNode('base-leaf')
|
|
43
|
+
order = []
|
|
44
|
+
result, create = self._from_url(
|
|
45
|
+
's3+xml://bucket/a.zip/inner', leaf,
|
|
46
|
+
{'xml': _WrapFactory('xml', order)})
|
|
47
|
+
# The base resolution must receive the clean s3:// URL.
|
|
48
|
+
self.assertEqual(1, create.call_count)
|
|
49
|
+
received = create.call_args[0][0]
|
|
50
|
+
self.assertIsInstance(received, UrlNode)
|
|
51
|
+
self.assertEqual('s3', received.path.scheme)
|
|
52
|
+
self.assertEqual('s3://bucket/a.zip/inner', received.path.name)
|
|
53
|
+
|
|
54
|
+
def test_forced_driver_applied_to_base_leaf(self):
|
|
55
|
+
leaf = DrbLogicalNode('base-leaf')
|
|
56
|
+
order = []
|
|
57
|
+
result, _ = self._from_url(
|
|
58
|
+
's3+xml://bucket/a.zip/inner', leaf,
|
|
59
|
+
{'xml': _WrapFactory('xml', order)})
|
|
60
|
+
self.assertEqual('xml', result.name) # forced driver on top
|
|
61
|
+
self.assertEqual('base-leaf', result[0].name) # wrapping the leaf
|
|
62
|
+
self.assertEqual(['xml'], order)
|
|
63
|
+
|
|
64
|
+
def test_multiple_tokens_applied_in_order(self):
|
|
65
|
+
leaf = DrbLogicalNode('base-leaf')
|
|
66
|
+
order = []
|
|
67
|
+
result, _ = self._from_url(
|
|
68
|
+
'https+odata+xml://host/x', leaf,
|
|
69
|
+
{'odata': _WrapFactory('odata', order),
|
|
70
|
+
'xml': _WrapFactory('xml', order)})
|
|
71
|
+
self.assertEqual(['odata', 'xml'], order)
|
|
72
|
+
self.assertEqual('xml', result.name)
|
|
73
|
+
|
|
74
|
+
def test_empty_scheme_segment_raises(self):
|
|
75
|
+
r = resolver_mod._DrbFactoryResolver()
|
|
76
|
+
with self.assertRaises(DrbFactoryException):
|
|
77
|
+
r._DrbFactoryResolver__create_from_url('s3++xml://host/x')
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
if __name__ == '__main__':
|
|
81
|
+
unittest.main()
|
|
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
|
{drb-2.4.2 → drb-2.4.3}/setup.py
RENAMED
|
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
|