dbt-common 1.0.2__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.
Files changed (102) hide show
  1. {dbt_common-1.0.2 → dbt_common-1.0.4}/PKG-INFO +3 -3
  2. dbt_common-1.0.4/dbt_common/__about__.py +1 -0
  3. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/config/properties.py +5 -5
  4. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/dataclass_schema.py +12 -4
  5. {dbt_common-1.0.2 → dbt_common-1.0.4}/pyproject.toml +2 -2
  6. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/models.pyi +2 -2
  7. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/dict.pyi +3 -3
  8. dbt_common-1.0.2/dbt_common/__about__.py +0 -1
  9. {dbt_common-1.0.2 → dbt_common-1.0.4}/.gitignore +0 -0
  10. {dbt_common-1.0.2 → dbt_common-1.0.4}/CHANGELOG.md +0 -0
  11. {dbt_common-1.0.2 → dbt_common-1.0.4}/LICENSE +0 -0
  12. {dbt_common-1.0.2 → dbt_common-1.0.4}/README.md +0 -0
  13. {dbt_common-1.0.2 → dbt_common-1.0.4}/codecov.yml +0 -0
  14. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/__init__.py +0 -0
  15. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/clients/__init__.py +0 -0
  16. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/clients/_jinja_blocks.py +0 -0
  17. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/clients/agate_helper.py +0 -0
  18. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/clients/jinja.py +0 -0
  19. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/clients/system.py +0 -0
  20. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/constants.py +0 -0
  21. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/context.py +0 -0
  22. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/__init__.py +0 -0
  23. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/config/__init__.py +0 -0
  24. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/config/base.py +0 -0
  25. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/config/materialization.py +0 -0
  26. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/config/metadata.py +0 -0
  27. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/constraints.py +0 -0
  28. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/contracts/util.py +0 -0
  29. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/README.md +0 -0
  30. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/__init__.py +0 -0
  31. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/base_types.py +0 -0
  32. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/contextvars.py +0 -0
  33. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/event_handler.py +0 -0
  34. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/event_manager.py +0 -0
  35. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/event_manager_client.py +0 -0
  36. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/format.py +0 -0
  37. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/functions.py +0 -0
  38. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/helpers.py +0 -0
  39. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/interfaces.py +0 -0
  40. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/logger.py +0 -0
  41. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/types.proto +0 -0
  42. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/types.py +0 -0
  43. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/events/types_pb2.py +0 -0
  44. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/__init__.py +0 -0
  45. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/base.py +0 -0
  46. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/cache.py +0 -0
  47. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/connection.py +0 -0
  48. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/contracts.py +0 -0
  49. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/events.py +0 -0
  50. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/jinja.py +0 -0
  51. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/macros.py +0 -0
  52. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/exceptions/system.py +0 -0
  53. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/helper_types.py +0 -0
  54. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/invocation.py +0 -0
  55. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/py.typed +0 -0
  56. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/record.py +0 -0
  57. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/semver.py +0 -0
  58. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/tests.py +0 -0
  59. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/ui.py +0 -0
  60. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/__init__.py +0 -0
  61. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/casting.py +0 -0
  62. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/connection.py +0 -0
  63. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/dict.py +0 -0
  64. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/encoding.py +0 -0
  65. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/executor.py +0 -0
  66. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/formatting.py +0 -0
  67. {dbt_common-1.0.2 → dbt_common-1.0.4}/dbt_common/utils/jinja.py +0 -0
  68. {dbt_common-1.0.2 → dbt_common-1.0.4}/docs/arch/adr-0001-build-tooling.md +0 -0
  69. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/agate/__init__.pyi +0 -0
  70. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/agate/data_types.pyi +0 -0
  71. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/colorama/__init__.pyi +0 -0
  72. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/isodate/__init__.pyi +0 -0
  73. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/__init__.pyi +0 -0
  74. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/config.pyi +0 -0
  75. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/__init__.pyi +0 -0
  76. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/const.pyi +0 -0
  77. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/helpers.pyi +0 -0
  78. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/__init__.pyi +0 -0
  79. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/__init__.pyi +0 -0
  80. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/builder.pyi +0 -0
  81. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/code/lines.pyi +0 -0
  82. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/helpers.pyi +0 -0
  83. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/mixin.pyi +0 -0
  84. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/__init__.pyi +0 -0
  85. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/common.pyi +0 -0
  86. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/pack.pyi +0 -0
  87. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/core/meta/types/unpack.pyi +0 -0
  88. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/dialect.pyi +0 -0
  89. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/exceptions.pyi +0 -0
  90. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/helper.pyi +0 -0
  91. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/__init__.pyi +0 -0
  92. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/annotations.pyi +0 -0
  93. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/builder.pyi +0 -0
  94. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/dialects.pyi +0 -0
  95. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/jsonschema/schema.pyi +0 -0
  96. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/__init__.pyi +0 -0
  97. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/json.pyi +0 -0
  98. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/msgpack.pyi +0 -0
  99. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/orjson.pyi +0 -0
  100. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/toml.pyi +0 -0
  101. {dbt_common-1.0.2 → dbt_common-1.0.4}/third-party-stubs/mashumaro/mixins/yaml.pyi +0 -0
  102. {dbt_common-1.0.2 → 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.2
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
@@ -24,13 +24,13 @@ Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
25
  Classifier: Programming Language :: Python :: Implementation :: PyPy
26
26
  Requires-Python: >=3.8
27
- Requires-Dist: agate<1.8,>=1.7.0
27
+ Requires-Dist: agate<1.10,>=1.7.0
28
28
  Requires-Dist: colorama<0.5,>=0.3.9
29
29
  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.12,>=0.9
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 DataClassDictMixin
11
- from mashumaro.config import TO_DICT_ADD_OMIT_NONE_FLAG, BaseConfig as MashBaseConfig
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
- class dbtClassMixin(DataClassDictMixin):
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
@@ -28,13 +28,13 @@ classifiers = [
28
28
  "Programming Language :: Python :: Implementation :: PyPy",
29
29
  ]
30
30
  dependencies = [
31
- "agate>=1.7.0,<1.8",
31
+ "agate>=1.7.0,<1.10",
32
32
  "colorama>=0.3.9,<0.5",
33
33
  "isodate>=0.6,<0.7",
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.12",
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.2"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes