dbt-common 1.0.3__tar.gz → 1.0.4__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.
- {dbt_common-1.0.3 → dbt_common-1.0.4}/PKG-INFO +2 -2
- dbt_common-1.0.4/dbt_common/__about__.py +1 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/config/properties.py +5 -5
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/dataclass_schema.py +12 -4
- {dbt_common-1.0.3 → dbt_common-1.0.4}/pyproject.toml +1 -1
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/models.pyi +2 -2
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/dict.pyi +3 -3
- dbt_common-1.0.3/dbt_common/__about__.py +0 -1
- {dbt_common-1.0.3 → dbt_common-1.0.4}/.gitignore +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/CHANGELOG.md +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/LICENSE +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/README.md +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/codecov.yml +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/clients/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/clients/_jinja_blocks.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/clients/agate_helper.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/clients/jinja.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/clients/system.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/constants.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/context.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/config/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/config/base.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/config/materialization.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/config/metadata.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/constraints.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/contracts/util.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/README.md +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/base_types.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/contextvars.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/event_handler.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/event_manager.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/event_manager_client.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/format.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/functions.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/helpers.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/interfaces.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/logger.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/types.proto +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/types.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/events/types_pb2.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/base.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/cache.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/connection.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/contracts.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/events.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/jinja.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/macros.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/exceptions/system.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/helper_types.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/invocation.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/py.typed +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/record.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/semver.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/tests.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/ui.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/__init__.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/casting.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/connection.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/dict.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/encoding.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/executor.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/formatting.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/dbt_common/utils/jinja.py +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/docs/arch/adr-0001-build-tooling.md +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/agate/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/agate/data_types.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/colorama/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/isodate/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/config.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/const.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/helpers.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/builder.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/lines.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/helpers.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/mixin.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/common.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/pack.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/unpack.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/dialect.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/exceptions.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/helper.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/annotations.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/builder.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/dialects.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/schema.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/__init__.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/json.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/msgpack.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/orjson.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/toml.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/yaml.pyi +0 -0
- {dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/types.pyi +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: dbt-common
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: The shared common utilities that dbt-core and adapter implementations use
|
5
5
|
Project-URL: Homepage, https://github.com/dbt-labs/dbt-common
|
6
6
|
Project-URL: Repository, https://github.com/dbt-labs/dbt-common.git
|
@@ -30,7 +30,7 @@ Requires-Dist: isodate<0.7,>=0.6
|
|
30
30
|
Requires-Dist: jinja2<4,>=3.1.3
|
31
31
|
Requires-Dist: jsonschema<5.0,>=4.0
|
32
32
|
Requires-Dist: mashumaro[msgpack]<4.0,>=3.9
|
33
|
-
Requires-Dist: pathspec<0.
|
33
|
+
Requires-Dist: pathspec<0.13,>=0.9
|
34
34
|
Requires-Dist: protobuf<5.0.0,>=4.0.0
|
35
35
|
Requires-Dist: python-dateutil<3.0,>=2.0
|
36
36
|
Requires-Dist: requests<3.0.0
|
@@ -0,0 +1 @@
|
|
1
|
+
version = "1.0.4"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from dataclasses import dataclass, field
|
2
|
-
from typing import Dict, Any
|
2
|
+
from typing import Dict, Any, Optional
|
3
3
|
|
4
|
-
from dbt_common.dataclass_schema import ExtensibleDbtClassMixin
|
4
|
+
from dbt_common.dataclass_schema import ExtensibleDbtClassMixin, dbtClassMixin
|
5
5
|
|
6
6
|
|
7
|
-
class AdditionalPropertiesMixin:
|
7
|
+
class AdditionalPropertiesMixin(dbtClassMixin):
|
8
8
|
"""Make this class an extensible property.
|
9
9
|
|
10
10
|
The underlying class definition must include a type definition for a field
|
@@ -41,8 +41,8 @@ class AdditionalPropertiesMixin:
|
|
41
41
|
data = super().__pre_deserialize__(data)
|
42
42
|
return data
|
43
43
|
|
44
|
-
def __post_serialize__(self, dct):
|
45
|
-
data = super().__post_serialize__(dct)
|
44
|
+
def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None):
|
45
|
+
data = super().__post_serialize__(dct, context)
|
46
46
|
data.update(self.extra)
|
47
47
|
if "_extra" in data:
|
48
48
|
del data["_extra"]
|
@@ -7,11 +7,17 @@ from datetime import datetime
|
|
7
7
|
from dateutil.parser import parse
|
8
8
|
|
9
9
|
# type: ignore
|
10
|
-
from mashumaro import
|
11
|
-
|
10
|
+
from mashumaro.config import (
|
11
|
+
TO_DICT_ADD_OMIT_NONE_FLAG,
|
12
|
+
ADD_SERIALIZATION_CONTEXT,
|
13
|
+
BaseConfig as MashBaseConfig,
|
14
|
+
)
|
12
15
|
from mashumaro.types import SerializableType, SerializationStrategy
|
13
16
|
from mashumaro.jsonschema import build_json_schema
|
14
17
|
|
18
|
+
# following includes DataClassDictMixin
|
19
|
+
from mashumaro.mixins.msgpack import DataClassMessagePackMixin
|
20
|
+
|
15
21
|
import functools
|
16
22
|
|
17
23
|
|
@@ -34,6 +40,7 @@ class DateTimeSerialization(SerializationStrategy):
|
|
34
40
|
class dbtMashConfig(MashBaseConfig):
|
35
41
|
code_generation_options = [
|
36
42
|
TO_DICT_ADD_OMIT_NONE_FLAG,
|
43
|
+
ADD_SERIALIZATION_CONTEXT,
|
37
44
|
]
|
38
45
|
serialization_strategy = {
|
39
46
|
datetime: DateTimeSerialization(),
|
@@ -47,7 +54,8 @@ class dbtMashConfig(MashBaseConfig):
|
|
47
54
|
|
48
55
|
# This class pulls in DataClassDictMixin from Mashumaro. The 'to_dict'
|
49
56
|
# and 'from_dict' methods come from Mashumaro.
|
50
|
-
|
57
|
+
# Note: DataClassMessagePackMixin inherits from DataClassDictMixin
|
58
|
+
class dbtClassMixin(DataClassMessagePackMixin):
|
51
59
|
"""Convert and validate JSON schemas.
|
52
60
|
|
53
61
|
The Mixin adds methods to generate a JSON schema and
|
@@ -73,7 +81,7 @@ class dbtClassMixin(DataClassDictMixin):
|
|
73
81
|
# This is called by the mashumaro to_dict in order to handle
|
74
82
|
# nested classes. We no longer do any munging here, but leaving here
|
75
83
|
# so that subclasses can leave super() in place for possible future needs.
|
76
|
-
def __post_serialize__(self, data):
|
84
|
+
def __post_serialize__(self, data, context: Optional[Dict]):
|
77
85
|
return data
|
78
86
|
|
79
87
|
@classmethod
|
@@ -34,7 +34,7 @@ dependencies = [
|
|
34
34
|
"jsonschema>=4.0,<5.0",
|
35
35
|
"Jinja2>=3.1.3,<4",
|
36
36
|
"mashumaro[msgpack]>=3.9,<4.0",
|
37
|
-
"pathspec>=0.9,<0.
|
37
|
+
"pathspec>=0.9,<0.13",
|
38
38
|
"protobuf>=4.0.0,<5.0.0",
|
39
39
|
"python-dateutil>=2.0,<3.0",
|
40
40
|
"requests<3.0.0", # needs to match dbt-core
|
@@ -106,8 +106,8 @@ class JSONSchema(DataClassJSONMixin):
|
|
106
106
|
serialize_by_alias: bool
|
107
107
|
aliases: Incomplete
|
108
108
|
serialization_strategy: Incomplete
|
109
|
-
def __pre_serialize__(self) -> JSONSchema: ...
|
110
|
-
def __post_serialize__(self, d: Dict[Any, Any]) -> Dict[Any, Any]: ...
|
109
|
+
def __pre_serialize__(self, context: Optional[Dict]) -> JSONSchema: ...
|
110
|
+
def __post_serialize__(self, d: Dict[Any, Any], context: Optional[Dict]) -> Dict[Any, Any]: ...
|
111
111
|
def __init__(
|
112
112
|
self,
|
113
113
|
schema,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any, Dict, Mapping, Type, TypeVar
|
1
|
+
from typing import Any, Dict, Mapping, Type, TypeVar, Optional
|
2
2
|
|
3
3
|
T = TypeVar("T", bound="DataClassDictMixin")
|
4
4
|
|
@@ -11,5 +11,5 @@ class DataClassDictMixin:
|
|
11
11
|
def __pre_deserialize__(cls: Type[T], d: Dict[Any, Any]) -> Dict[Any, Any]: ...
|
12
12
|
@classmethod
|
13
13
|
def __post_deserialize__(cls: Type[T], obj: T) -> T: ...
|
14
|
-
def __pre_serialize__(self: T) -> T: ...
|
15
|
-
def __post_serialize__(self, d: Dict[Any, Any]) -> Dict[Any, Any]: ...
|
14
|
+
def __pre_serialize__(self: T, context: Optional[Dict]) -> T: ...
|
15
|
+
def __post_serialize__(self, d: Dict[Any, Any], context: Optional[Dict]) -> Dict[Any, Any]: ...
|
@@ -1 +0,0 @@
|
|
1
|
-
version = "1.0.3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/__init__.pyi
RENAMED
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/builder.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/__init__.pyi
RENAMED
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/common.pyi
RENAMED
File without changes
|
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/unpack.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.3 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/annotations.pyi
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
|