confluent-sql 0.5.3__tar.gz → 0.5.5__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 (67) hide show
  1. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/CHANGELOG.md +13 -0
  2. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/PKG-INFO +1 -1
  3. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/pyproject.toml +1 -1
  4. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/connection.py +3 -2
  5. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/tableflow.py +7 -2
  6. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connection_unit.py +26 -20
  7. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_tableflow_unit.py +16 -4
  8. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/uv.lock +1 -1
  9. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/.github/CODEOWNERS +0 -0
  10. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/.gitignore +0 -0
  11. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/.semaphore/publish_to_pypi.yml +0 -0
  12. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/.semaphore/semaphore.yml +0 -0
  13. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/ARCHITECTURE.md +0 -0
  14. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/CLAUDE.md +0 -0
  15. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/DBAPI_EXTENSIONS.md +0 -0
  16. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/LICENSE.txt +0 -0
  17. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/Makefile +0 -0
  18. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/README.md +0 -0
  19. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/STREAMING.md +0 -0
  20. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/TYPES.md +0 -0
  21. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/byoidc_bearer_token_example.py +0 -0
  22. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/errors.py +0 -0
  23. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/simple_append_only_streaming_query_example.py +0 -0
  24. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/snapshot_mode_tuple_cursor_simple_example.py +0 -0
  25. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/statement_properties_example.py +0 -0
  26. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/examples/tableflow_lifecycle_example.py +0 -0
  27. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/service.yml +0 -0
  28. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/__init__.py +0 -0
  29. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/__version__.py +0 -0
  30. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/auth.py +0 -0
  31. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/changelog_compressor.py +0 -0
  32. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/connectors.py +0 -0
  33. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/cursor.py +0 -0
  34. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/exceptions.py +0 -0
  35. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/execution_mode.py +0 -0
  36. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/polling.py +0 -0
  37. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/result_readers.py +0 -0
  38. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/retry.py +0 -0
  39. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/statement.py +0 -0
  40. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/statement_properties.py +0 -0
  41. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/src/confluent_sql/types.py +0 -0
  42. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/__init__.py +0 -0
  43. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/conftest.py +0 -0
  44. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/conftest.py +0 -0
  45. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/test_connection.py +0 -0
  46. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/test_connector.py +0 -0
  47. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/test_cursor.py +0 -0
  48. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/test_fetch.py +0 -0
  49. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/integration/test_tableflow.py +0 -0
  50. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/conftest.py +0 -0
  51. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_auth_unit.py +0 -0
  52. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_changelog_compressor_unit.py +0 -0
  53. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_changelog_unit.py +0 -0
  54. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connection_byoidc_unit.py +0 -0
  55. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connection_connector_unit.py +0 -0
  56. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connection_unit_properties.py +0 -0
  57. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connectors_connection_unit.py +0 -0
  58. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_connectors_unit.py +0 -0
  59. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_cursor_unit.py +0 -0
  60. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_execution_mode_unit.py +0 -0
  61. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_polling_unit.py +0 -0
  62. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_result_readers_unit.py +0 -0
  63. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_retry_unit.py +0 -0
  64. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_statement_properties_unit.py +0 -0
  65. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_statement_unit.py +0 -0
  66. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_tableflow_connection_unit.py +0 -0
  67. {confluent_sql-0.5.3 → confluent_sql-0.5.5}/tests/unit/test_types_unit.py +0 -0
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this dbapi driver will be documented in this file.
4
4
 
5
+
6
+ ## 0.5.5, 2026-09-09
7
+
8
+ ### Fixed
9
+
10
+ - Fix TableflowTopicConfig.to_spec() serialization of retention_ms/data_retention_ms -- must be strings, not ints.
11
+
12
+ ## 0.5.4, 2026-09-08
13
+
14
+ ### Changed
15
+
16
+ - `connect()` no longer raises `InterfaceError` when both `endpoint` and `cloud_provider`/`cloud_region` are provided. A provided `endpoint` simply makes `cloud_provider`/`cloud_region` unnecessary rather than actually conflicting with it, so this now logs a warning ("No need to provide cloud_provider or cloud_region when also providing endpoint. Only using endpoint.") and proceeds using `endpoint`. (#210)
17
+
5
18
  ## 0.5.3, 2026-08-27
6
19
 
7
20
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: confluent-sql
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: DB-API v2 compliant driver for Confluent Cloud Flink SQL
5
5
  Project-URL: Repository, https://github.com/confluentinc/confluent-sql
6
6
  Project-URL: Documentation, https://github.com/confluentinc/confluent-sql?tab=readme-ov-file#confluent-sql
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "confluent-sql"
7
- version = "0.5.3"
7
+ version = "0.5.5"
8
8
  description = "DB-API v2 compliant driver for Confluent Cloud Flink SQL"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -386,8 +386,9 @@ def connect( # noqa: PLR0913
386
386
 
387
387
  if endpoint:
388
388
  if cloud_provider or cloud_region:
389
- raise InterfaceError(
390
- "cloud_provider and cloud_region should not be provided when endpoint is specified"
389
+ logger.warning(
390
+ "No need to provide cloud_provider or cloud_region when also providing "
391
+ "endpoint. Only using endpoint."
391
392
  )
392
393
  else:
393
394
  if not cloud_provider:
@@ -224,11 +224,16 @@ class TableflowTopicConfig:
224
224
  error_handling: TableflowErrorHandling | None = None
225
225
 
226
226
  def to_spec(self) -> StrAnyDict:
227
+ """Render to the wire `config` object.
228
+
229
+ `retention_ms`/`data_retention_ms` accept `int` here for caller convenience, but the API
230
+ schema types both as `string` (`format: int64`) on every request and response.
231
+ """
227
232
  spec: StrAnyDict = {}
228
233
  if self.retention_ms is not None:
229
- spec["retention_ms"] = self.retention_ms
234
+ spec["retention_ms"] = str(self.retention_ms)
230
235
  if self.data_retention_ms is not None:
231
- spec["data_retention_ms"] = self.data_retention_ms
236
+ spec["data_retention_ms"] = str(self.data_retention_ms)
232
237
  if self.error_handling is not None:
233
238
  spec["error_handling"] = self.error_handling.to_spec()
234
239
  return spec
@@ -911,17 +911,14 @@ class TestConnectChecks:
911
911
  == "https://custom.example.com/sql/v1/organizations/org-456/environments/env-123/"
912
912
  )
913
913
 
914
- def test_endpoint_raises_error_when_cloud_provider_also_provided(
915
- self, connection_factory: ConnectionFactory
914
+ def test_endpoint_warns_when_cloud_provider_also_provided(
915
+ self, connection_factory: ConnectionFactory, caplog
916
916
  ):
917
- """Test that providing endpoint with cloud_provider raises an error."""
918
- with pytest.raises(
919
- InterfaceError,
920
- match=(
921
- "cloud_provider and cloud_region should not be provided when endpoint is specified"
922
- ),
923
- ):
924
- connection_factory(
917
+ """Providing endpoint with cloud_provider is not an error (#210) -- endpoint wins and
918
+ we just warn, since a provided endpoint makes cloud_provider/cloud_region moot rather
919
+ than actually breaking anything."""
920
+ with caplog.at_level("WARNING", logger=connection_module_logger.name):
921
+ conn = connection_factory(
925
922
  environment_id="env-123",
926
923
  organization_id="org-456",
927
924
  compute_pool_id="cp-789",
@@ -930,18 +927,21 @@ class TestConnectChecks:
930
927
  endpoint="https://custom.example.com",
931
928
  cloud_provider="aws",
932
929
  )
930
+ assert "custom.example.com" in str(conn._get_flink_client().base_url)
931
+ assert any(
932
+ "No need to provide cloud_provider or cloud_region" in record.getMessage()
933
+ and record.levelname == "WARNING"
934
+ for record in caplog.records
935
+ )
933
936
 
934
- def test_endpoint_raises_error_when_cloud_region_also_provided(
935
- self, connection_factory: ConnectionFactory
937
+ def test_endpoint_warns_when_cloud_region_also_provided(
938
+ self, connection_factory: ConnectionFactory, caplog
936
939
  ):
937
- """Test that providing endpoint with cloud_region raises an error."""
938
- with pytest.raises(
939
- InterfaceError,
940
- match=(
941
- "cloud_provider and cloud_region should not be provided when endpoint is specified"
942
- ),
943
- ):
944
- connection_factory(
940
+ """Providing endpoint with cloud_region is not an error (#210) -- endpoint wins and
941
+ we just warn, since a provided endpoint makes cloud_provider/cloud_region moot rather
942
+ than actually breaking anything."""
943
+ with caplog.at_level("WARNING", logger=connection_module_logger.name):
944
+ conn = connection_factory(
945
945
  environment_id="env-123",
946
946
  organization_id="org-456",
947
947
  compute_pool_id="cp-789",
@@ -950,6 +950,12 @@ class TestConnectChecks:
950
950
  endpoint="https://custom.example.com",
951
951
  cloud_region="us-east-1",
952
952
  )
953
+ assert "custom.example.com" in str(conn._get_flink_client().base_url)
954
+ assert any(
955
+ "No need to provide cloud_provider or cloud_region" in record.getMessage()
956
+ and record.levelname == "WARNING"
957
+ for record in caplog.records
958
+ )
953
959
 
954
960
 
955
961
  @pytest.mark.unit
@@ -187,14 +187,26 @@ class TestTableflowTopicConfig:
187
187
  assert TableflowTopicConfig().to_spec() == {}
188
188
 
189
189
  def test_retention_only(self) -> None:
190
- assert TableflowTopicConfig(retention_ms="604800000").to_spec() == {
190
+ # int in, str out: the API schema types retention_ms as string (int64, string-encoded
191
+ # to dodge JS/IEEE-754 double precision loss) on every request, even when this dataclass
192
+ # is constructed with a plain int for caller convenience -- confirmed against the live
193
+ # API, which rejects a non-string value outright.
194
+ assert TableflowTopicConfig(retention_ms=604800000).to_spec() == {
191
195
  "retention_ms": "604800000"
192
196
  }
193
197
 
198
+ def test_data_retention_only(self) -> None:
199
+ # Same string-encoded int64 wire format as retention_ms (see test_retention_only),
200
+ # applied independently here since data_retention_ms has its own coercion branch
201
+ # in to_spec().
202
+ assert TableflowTopicConfig(data_retention_ms=2592000000).to_spec() == {
203
+ "data_retention_ms": "2592000000"
204
+ }
205
+
194
206
  def test_all_fields(self) -> None:
195
207
  config = TableflowTopicConfig(
196
- retention_ms="604800000",
197
- data_retention_ms="2592000000",
208
+ retention_ms=604800000,
209
+ data_retention_ms=2592000000,
198
210
  error_handling=TableflowErrorHandlingLog(target="dlq"),
199
211
  )
200
212
  assert config.to_spec() == {
@@ -231,7 +243,7 @@ class TestBuildCreatePayload:
231
243
  table_name="orders",
232
244
  table_formats=["ICEBERG", "DELTA"],
233
245
  storage=ManagedStorage(),
234
- config=TableflowTopicConfig(retention_ms="604800000"),
246
+ config=TableflowTopicConfig(retention_ms=604800000),
235
247
  environment_id="env-1",
236
248
  kafka_cluster_id="lkc-1",
237
249
  )
@@ -36,7 +36,7 @@ wheels = [
36
36
 
37
37
  [[package]]
38
38
  name = "confluent-sql"
39
- version = "0.5.3"
39
+ version = "0.5.5"
40
40
  source = { editable = "." }
41
41
  dependencies = [
42
42
  { name = "httpx" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes