openlineage-python 1.24.0__tar.gz → 1.24.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.
Files changed (86) hide show
  1. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/PKG-INFO +1 -1
  2. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/client.py +10 -2
  3. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/constants.py +1 -1
  4. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/pyproject.toml +1 -1
  5. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_client.py +16 -21
  6. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/.gitignore +0 -0
  7. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/README.md +0 -0
  8. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/Makefile +0 -0
  9. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/conf.py +0 -0
  10. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/convert.py +0 -0
  11. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/index.rst +0 -0
  12. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/make.bat +0 -0
  13. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/docs/source/openlineage.client.rst +0 -0
  14. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/__init__.py +0 -0
  15. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/event_v2.py +0 -0
  16. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/facet.py +0 -0
  17. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/facet_v2.py +0 -0
  18. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/facets.py +0 -0
  19. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/filter.py +0 -0
  20. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/base.py +0 -0
  21. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/column_lineage_dataset.py +0 -0
  22. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/data_quality_assertions_dataset.py +0 -0
  23. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/data_quality_metrics_input_dataset.py +0 -0
  24. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/dataset_version_dataset.py +0 -0
  25. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/datasource_dataset.py +0 -0
  26. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/documentation_dataset.py +0 -0
  27. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/documentation_job.py +0 -0
  28. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/environment_variables_run.py +0 -0
  29. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/error_message_run.py +0 -0
  30. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/external_query_run.py +0 -0
  31. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/extraction_error_run.py +0 -0
  32. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/job_type_job.py +0 -0
  33. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/lifecycle_state_change_dataset.py +0 -0
  34. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/nominal_time_run.py +0 -0
  35. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/output_statistics_output_dataset.py +0 -0
  36. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/ownership_dataset.py +0 -0
  37. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/ownership_job.py +0 -0
  38. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/parent_run.py +0 -0
  39. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/processing_engine_run.py +0 -0
  40. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/schema_dataset.py +0 -0
  41. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/source_code_job.py +0 -0
  42. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/source_code_location_job.py +0 -0
  43. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/sql_job.py +0 -0
  44. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/storage_dataset.py +0 -0
  45. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/generated/symlinks_dataset.py +0 -0
  46. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/py.typed +0 -0
  47. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/run.py +0 -0
  48. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/serde.py +0 -0
  49. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/__init__.py +0 -0
  50. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/composite.py +0 -0
  51. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/console.py +0 -0
  52. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/factory.py +0 -0
  53. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/file.py +0 -0
  54. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/http.py +0 -0
  55. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/kafka.py +0 -0
  56. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/msk_iam.py +0 -0
  57. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/noop.py +0 -0
  58. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/transport/transport.py +0 -0
  59. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/utils.py +0 -0
  60. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/openlineage/client/uuid.py +0 -0
  61. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/redact_fields.yml +0 -0
  62. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/__init__.py +0 -0
  63. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/config/config.yml +0 -0
  64. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/config/exact_filter.yml +0 -0
  65. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/config/http.yml +0 -0
  66. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/config/openlineage.yml +0 -0
  67. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/config/regex_filter.yml +0 -0
  68. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/conftest.py +0 -0
  69. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/example_full_event.json +0 -0
  70. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/nominal_time_without_end.json +0 -0
  71. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/serde_example_dataset_event.json +0 -0
  72. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/serde_example_job_event.json +0 -0
  73. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/serde_example_run_event.json +0 -0
  74. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_composite.py +0 -0
  75. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_events.py +0 -0
  76. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_facet.py +0 -0
  77. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_facet_v2.py +0 -0
  78. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_factory.py +0 -0
  79. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_file.py +0 -0
  80. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_http.py +0 -0
  81. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_kafka.py +0 -0
  82. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_msk_iam.py +0 -0
  83. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_utils.py +0 -0
  84. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/test_uuid.py +0 -0
  85. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tests/transport.py +0 -0
  86. {openlineage_python-1.24.0 → openlineage_python-1.24.1}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openlineage-python
3
- Version: 1.24.0
3
+ Version: 1.24.1
4
4
  Summary: OpenLineage Python Client
5
5
  Author-email: OpenLineage <info@openlineage.io>
6
6
  Keywords: openlineage
@@ -82,7 +82,7 @@ class OpenLineageClient:
82
82
  transport: Transport | None = None,
83
83
  factory: TransportFactory | None = None,
84
84
  *,
85
- config: dict[str, str] | None = None,
85
+ config: dict[str, Any] | None = None,
86
86
  ) -> None:
87
87
  # Set parent's logging level if environment variable is present
88
88
  custom_logging_level = os.getenv("OPENLINEAGE_CLIENT_LOGGING", None)
@@ -126,7 +126,15 @@ class OpenLineageClient:
126
126
 
127
127
  @classmethod
128
128
  def from_dict(cls: type[_T], config: dict[str, str]) -> _T:
129
- return cls(config=config)
129
+ warnings.warn(
130
+ message=(
131
+ "Using `from_dict` to set transport is deprecated. "
132
+ "Use `config` parameter to fully configure OpenLineageClient."
133
+ ),
134
+ category=DeprecationWarning,
135
+ stacklevel=2,
136
+ )
137
+ return cls(transport=get_default_factory().create(config=config), config={"transport": config})
130
138
 
131
139
  def filter_event(
132
140
  self,
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "1.24.0"
5
+ __version__ = "1.24.1"
6
6
 
7
7
  DEFAULT_TIMEOUT_MS = 5000
8
8
  DEFAULT_NAMESPACE_NAME = "default"
@@ -6,7 +6,7 @@ requires = [
6
6
 
7
7
  [project]
8
8
  name = "openlineage-python"
9
- version = "1.24.0"
9
+ version = "1.24.1"
10
10
  description = "OpenLineage Python Client"
11
11
  readme = "README.md"
12
12
  keywords = [
@@ -402,8 +402,8 @@ def test_config(mocker: MockerFixture, root: Path) -> None:
402
402
 
403
403
 
404
404
  def test_openlineage_client_from_dict() -> None:
405
- config_dict = {"transport": {"type": "http", "url": "http://localhost:5050"}}
406
- client = OpenLineageClient.from_dict(config_dict)
405
+ transport_dict = {"type": "http", "url": "http://localhost:5050"}
406
+ client = OpenLineageClient.from_dict(transport_dict)
407
407
  assert client.transport.url == "http://localhost:5050"
408
408
 
409
409
 
@@ -680,7 +680,7 @@ def test_config_property_loads_user_defined_config() -> None:
680
680
  )
681
681
  def test_client_from_empty_dict_with_dynamic_env_vars() -> None:
682
682
  client = OpenLineageClient.from_dict({})
683
- assert client.transport.url == "http://localhost:5050"
683
+ assert client.transport.kind == ConsoleTransport.kind
684
684
 
685
685
 
686
686
  @patch.dict(
@@ -691,7 +691,7 @@ def test_client_from_empty_dict_with_dynamic_env_vars() -> None:
691
691
  )
692
692
  def test_client_from_empty_dict_with_url_env_var() -> None:
693
693
  client = OpenLineageClient.from_dict({})
694
- assert client.transport.url == "http://example.com"
694
+ assert client.transport.kind == ConsoleTransport.kind
695
695
 
696
696
 
697
697
  @patch.dict(
@@ -701,15 +701,14 @@ def test_client_from_empty_dict_with_url_env_var() -> None:
701
701
  "OPENLINEAGE__TRANSPORT__URL": "http://localhost:5050",
702
702
  },
703
703
  )
704
- def test_client_from_facets_config_in_dict_and_env_vars() -> None:
705
- user_defined_config = {
704
+ def test_client_raises_from_wrong_dict() -> None:
705
+ config_without_transport = {
706
706
  "facets": {
707
707
  "environment_variables": ["VAR1", "VAR2"],
708
708
  }
709
709
  }
710
- client = OpenLineageClient.from_dict(user_defined_config)
711
- assert client.config.facets.environment_variables == ["VAR1", "VAR2"]
712
- assert client.transport.url == "http://localhost:5050"
710
+ with pytest.raises(KeyError):
711
+ OpenLineageClient.from_dict(config_without_transport)
713
712
 
714
713
 
715
714
  @patch.dict(
@@ -719,13 +718,11 @@ def test_client_from_facets_config_in_dict_and_env_vars() -> None:
719
718
  },
720
719
  )
721
720
  def test_client_from_facets_config_in_env_vars_and_transport_in_config() -> None:
722
- user_defined_config = {
723
- "transport": {
724
- "type": "http",
725
- "url": "http://localhost:5050",
726
- }
721
+ transport_config = {
722
+ "type": "http",
723
+ "url": "http://localhost:5050",
727
724
  }
728
- client = OpenLineageClient.from_dict(user_defined_config)
725
+ client = OpenLineageClient.from_dict(transport_config)
729
726
  assert client.config.facets.environment_variables == ["VAR1", "VAR2"]
730
727
  assert client.transport.url == "http://localhost:5050"
731
728
 
@@ -739,11 +736,9 @@ def test_client_from_facets_config_in_env_vars_and_transport_in_config() -> None
739
736
  @patch("openlineage.client.client.OpenLineageClient._find_yaml_config_path")
740
737
  @patch("openlineage.client.client.OpenLineageClient._get_config_file_content")
741
738
  def test_config_merge_precedence(mock_get_config_content, mock_find_yaml) -> None:
742
- user_defined_config = {
743
- "transport": {
744
- "type": "http",
745
- "url": "http://localhost:5050",
746
- }
739
+ transport_config = {
740
+ "type": "http",
741
+ "url": "http://localhost:5050",
747
742
  }
748
743
  mock_find_yaml.return_value = "config.yml"
749
744
  mock_get_config_content.return_value = {
@@ -752,7 +747,7 @@ def test_config_merge_precedence(mock_get_config_content, mock_find_yaml) -> Non
752
747
  "auth": {"api_key": "another_token"},
753
748
  }
754
749
  }
755
- client = OpenLineageClient.from_dict(user_defined_config)
750
+ client = OpenLineageClient.from_dict(transport_config)
756
751
  config = client.config
757
752
  assert config.transport["type"] == "http"
758
753
  assert config.transport["url"] == "http://localhost:5050"