sqlalchemy-cratedb 0.39.0__tar.gz → 0.40.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 (45) hide show
  1. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/CHANGES.md +11 -1
  2. {sqlalchemy_cratedb-0.39.0/src/sqlalchemy_cratedb.egg-info → sqlalchemy_cratedb-0.40.1}/PKG-INFO +10 -9
  3. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/pyproject.toml +9 -8
  4. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/dialect.py +24 -0
  5. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1/src/sqlalchemy_cratedb.egg-info}/PKG-INFO +10 -9
  6. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb.egg-info/SOURCES.txt +1 -0
  7. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb.egg-info/requires.txt +10 -8
  8. sqlalchemy_cratedb-0.40.1/tests/test_error_handling.py +21 -0
  9. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/CODE_OF_CONDUCT.md +0 -0
  10. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/CONTRIBUTING.md +0 -0
  11. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/DEVELOP.md +0 -0
  12. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/LICENSE +0 -0
  13. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/MANIFEST.in +0 -0
  14. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/NOTICE +0 -0
  15. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/README.md +0 -0
  16. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/backlog.md +0 -0
  17. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/docs/_extra/robots.txt +0 -0
  18. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/docs/requirements.txt +0 -0
  19. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/setup.cfg +0 -0
  20. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/setup.py +0 -0
  21. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/__init__.py +0 -0
  22. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compat/__init__.py +0 -0
  23. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compat/api13.py +0 -0
  24. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compat/core10.py +0 -0
  25. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compat/core14.py +0 -0
  26. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compat/core20.py +0 -0
  27. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/compiler.py +0 -0
  28. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/predicate.py +0 -0
  29. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/sa_version.py +0 -0
  30. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/support/__init__.py +0 -0
  31. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/support/pandas.py +0 -0
  32. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/support/polyfill.py +0 -0
  33. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/support/util.py +0 -0
  34. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/type/__init__.py +0 -0
  35. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/type/array.py +0 -0
  36. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/type/geo.py +0 -0
  37. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/type/object.py +0 -0
  38. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb/type/vector.py +0 -0
  39. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb.egg-info/dependency_links.txt +0 -0
  40. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb.egg-info/entry_points.txt +0 -0
  41. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/src/sqlalchemy_cratedb.egg-info/top_level.txt +0 -0
  42. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/tests/test_schema.py +0 -0
  43. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/tests/test_support_pandas.py +0 -0
  44. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/tests/test_support_polyfill.py +0 -0
  45. {sqlalchemy_cratedb-0.39.0 → sqlalchemy_cratedb-0.40.1}/tests/test_support_util.py +0 -0
@@ -2,8 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2024/11/04 0.40.1
6
+ - CI: Verified support on Python 3.13
7
+ - Dependencies: Updated to `crate-1.0.0.dev2`
8
+
9
+ ## 2024/10/07 0.40.0
10
+ - Propagate error traces properly, using the `error_trace` `connect_args` option,
11
+ by using `crate-1.0.0.dev1`
12
+ - Use slightly amended `do_execute`, `do_execute_no_params`, `do_executemany`
13
+ to store their responses into the request context instance
14
+
5
15
  ## 2024/08/29 0.39.0
6
- Added `quote_relation_name` support utility function
16
+ - Added `quote_relation_name` support utility function
7
17
 
8
18
  ## 2024/06/25 0.38.0
9
19
  - Added/reactivated documentation as `sqlalchemy-cratedb`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlalchemy-cratedb
3
- Version: 0.39.0
3
+ Version: 0.40.1
4
4
  Summary: SQLAlchemy dialect for CrateDB.
5
5
  Author-email: "Crate.io" <office@crate.io>
6
6
  License: Apache License 2.0
@@ -33,6 +33,7 @@ Classifier: Programming Language :: Python :: 3.9
33
33
  Classifier: Programming Language :: Python :: 3.10
34
34
  Classifier: Programming Language :: Python :: 3.11
35
35
  Classifier: Programming Language :: Python :: 3.12
36
+ Classifier: Programming Language :: Python :: 3.13
36
37
  Classifier: Programming Language :: Python :: Implementation :: CPython
37
38
  Classifier: Programming Language :: Python :: Implementation :: PyPy
38
39
  Classifier: Programming Language :: SQL
@@ -63,7 +64,7 @@ Description-Content-Type: text/markdown
63
64
  License-File: LICENSE
64
65
  License-File: NOTICE
65
66
  Requires-Dist: backports.zoneinfo<1; python_version < "3.9"
66
- Requires-Dist: crate==1.0.0.dev0
67
+ Requires-Dist: crate<2,>=1.0.0.dev2
67
68
  Requires-Dist: geojson<4,>=2.5
68
69
  Requires-Dist: importlib-resources; python_version < "3.9"
69
70
  Requires-Dist: sqlalchemy<2.1,>=1
@@ -71,11 +72,11 @@ Requires-Dist: verlib2==0.2
71
72
  Provides-Extra: all
72
73
  Requires-Dist: sqlalchemy-cratedb[vector]; extra == "all"
73
74
  Provides-Extra: develop
74
- Requires-Dist: mypy<1.12; extra == "develop"
75
- Requires-Dist: poethepoet<0.28; extra == "develop"
76
- Requires-Dist: pyproject-fmt<2.3; extra == "develop"
77
- Requires-Dist: ruff<0.7; extra == "develop"
78
- Requires-Dist: validate-pyproject<0.20; extra == "develop"
75
+ Requires-Dist: mypy<1.14; extra == "develop"
76
+ Requires-Dist: poethepoet<0.30; extra == "develop"
77
+ Requires-Dist: pyproject-fmt<2.6; extra == "develop"
78
+ Requires-Dist: ruff<0.8; extra == "develop"
79
+ Requires-Dist: validate-pyproject<0.23; extra == "develop"
79
80
  Provides-Extra: doc
80
81
  Requires-Dist: crate-docs-theme>=0.26.5; extra == "doc"
81
82
  Requires-Dist: sphinx<9,>=3.5; extra == "doc"
@@ -84,11 +85,11 @@ Requires-Dist: build<2; extra == "release"
84
85
  Requires-Dist: twine<6; extra == "release"
85
86
  Provides-Extra: test
86
87
  Requires-Dist: cratedb-toolkit[testing]; extra == "test"
87
- Requires-Dist: dask[dataframe]; extra == "test"
88
+ Requires-Dist: dask[dataframe]; python_version < "3.13" and extra == "test"
88
89
  Requires-Dist: pandas<2.3; extra == "test"
89
90
  Requires-Dist: pueblo>=0.0.7; extra == "test"
90
91
  Requires-Dist: pytest<9; extra == "test"
91
- Requires-Dist: pytest-cov<6; extra == "test"
92
+ Requires-Dist: pytest-cov<7; extra == "test"
92
93
  Requires-Dist: pytest-mock<4; extra == "test"
93
94
  Provides-Extra: vector
94
95
  Requires-Dist: numpy; extra == "vector"
@@ -50,6 +50,7 @@ classifiers = [
50
50
  "Programming Language :: Python :: 3.10",
51
51
  "Programming Language :: Python :: 3.11",
52
52
  "Programming Language :: Python :: 3.12",
53
+ "Programming Language :: Python :: 3.13",
53
54
  "Programming Language :: Python :: Implementation :: CPython",
54
55
  "Programming Language :: Python :: Implementation :: PyPy",
55
56
  "Programming Language :: SQL",
@@ -81,7 +82,7 @@ dynamic = [
81
82
  ]
82
83
  dependencies = [
83
84
  "backports.zoneinfo<1; python_version<'3.9'",
84
- "crate==1.0.0.dev0",
85
+ "crate>=1.0.0.dev2,<2",
85
86
  "geojson<4,>=2.5",
86
87
  "importlib-resources; python_version<'3.9'",
87
88
  "sqlalchemy<2.1,>=1",
@@ -91,11 +92,11 @@ optional-dependencies.all = [
91
92
  "sqlalchemy-cratedb[vector]",
92
93
  ]
93
94
  optional-dependencies.develop = [
94
- "mypy<1.12",
95
- "poethepoet<0.28",
96
- "pyproject-fmt<2.3",
97
- "ruff<0.7",
98
- "validate-pyproject<0.20",
95
+ "mypy<1.14",
96
+ "poethepoet<0.30",
97
+ "pyproject-fmt<2.6",
98
+ "ruff<0.8",
99
+ "validate-pyproject<0.23",
99
100
  ]
100
101
  optional-dependencies.doc = [
101
102
  "crate-docs-theme>=0.26.5",
@@ -107,11 +108,11 @@ optional-dependencies.release = [
107
108
  ]
108
109
  optional-dependencies.test = [
109
110
  "cratedb-toolkit[testing]",
110
- "dask[dataframe]",
111
+ "dask[dataframe]; python_version<'3.13'",
111
112
  "pandas<2.3",
112
113
  "pueblo>=0.0.7",
113
114
  "pytest<9",
114
- "pytest-cov<6",
115
+ "pytest-cov<7",
115
116
  "pytest-mock<4",
116
117
  ]
117
118
  optional-dependencies.vector = [
@@ -233,6 +233,30 @@ class CrateDialect(default.DefaultDialect):
233
233
  return self.dbapi.connect(servers=servers, **kwargs)
234
234
  return self.dbapi.connect(**kwargs)
235
235
 
236
+ def do_execute(self, cursor, statement, parameters, context=None):
237
+ """
238
+ Slightly amended to store its response into the request context instance.
239
+ """
240
+ result = cursor.execute(statement, parameters)
241
+ if context is not None:
242
+ context.last_result = result
243
+
244
+ def do_execute_no_params(self, cursor, statement, context=None):
245
+ """
246
+ Slightly amended to store its response into the request context instance.
247
+ """
248
+ result = cursor.execute(statement)
249
+ if context is not None:
250
+ context.last_result = result
251
+
252
+ def do_executemany(self, cursor, statement, parameters, context=None):
253
+ """
254
+ Slightly amended to store its response into the request context instance.
255
+ """
256
+ result = cursor.executemany(statement, parameters)
257
+ if context is not None:
258
+ context.last_result = result
259
+
236
260
  def _get_default_schema_name(self, connection):
237
261
  return "doc"
238
262
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlalchemy-cratedb
3
- Version: 0.39.0
3
+ Version: 0.40.1
4
4
  Summary: SQLAlchemy dialect for CrateDB.
5
5
  Author-email: "Crate.io" <office@crate.io>
6
6
  License: Apache License 2.0
@@ -33,6 +33,7 @@ Classifier: Programming Language :: Python :: 3.9
33
33
  Classifier: Programming Language :: Python :: 3.10
34
34
  Classifier: Programming Language :: Python :: 3.11
35
35
  Classifier: Programming Language :: Python :: 3.12
36
+ Classifier: Programming Language :: Python :: 3.13
36
37
  Classifier: Programming Language :: Python :: Implementation :: CPython
37
38
  Classifier: Programming Language :: Python :: Implementation :: PyPy
38
39
  Classifier: Programming Language :: SQL
@@ -63,7 +64,7 @@ Description-Content-Type: text/markdown
63
64
  License-File: LICENSE
64
65
  License-File: NOTICE
65
66
  Requires-Dist: backports.zoneinfo<1; python_version < "3.9"
66
- Requires-Dist: crate==1.0.0.dev0
67
+ Requires-Dist: crate<2,>=1.0.0.dev2
67
68
  Requires-Dist: geojson<4,>=2.5
68
69
  Requires-Dist: importlib-resources; python_version < "3.9"
69
70
  Requires-Dist: sqlalchemy<2.1,>=1
@@ -71,11 +72,11 @@ Requires-Dist: verlib2==0.2
71
72
  Provides-Extra: all
72
73
  Requires-Dist: sqlalchemy-cratedb[vector]; extra == "all"
73
74
  Provides-Extra: develop
74
- Requires-Dist: mypy<1.12; extra == "develop"
75
- Requires-Dist: poethepoet<0.28; extra == "develop"
76
- Requires-Dist: pyproject-fmt<2.3; extra == "develop"
77
- Requires-Dist: ruff<0.7; extra == "develop"
78
- Requires-Dist: validate-pyproject<0.20; extra == "develop"
75
+ Requires-Dist: mypy<1.14; extra == "develop"
76
+ Requires-Dist: poethepoet<0.30; extra == "develop"
77
+ Requires-Dist: pyproject-fmt<2.6; extra == "develop"
78
+ Requires-Dist: ruff<0.8; extra == "develop"
79
+ Requires-Dist: validate-pyproject<0.23; extra == "develop"
79
80
  Provides-Extra: doc
80
81
  Requires-Dist: crate-docs-theme>=0.26.5; extra == "doc"
81
82
  Requires-Dist: sphinx<9,>=3.5; extra == "doc"
@@ -84,11 +85,11 @@ Requires-Dist: build<2; extra == "release"
84
85
  Requires-Dist: twine<6; extra == "release"
85
86
  Provides-Extra: test
86
87
  Requires-Dist: cratedb-toolkit[testing]; extra == "test"
87
- Requires-Dist: dask[dataframe]; extra == "test"
88
+ Requires-Dist: dask[dataframe]; python_version < "3.13" and extra == "test"
88
89
  Requires-Dist: pandas<2.3; extra == "test"
89
90
  Requires-Dist: pueblo>=0.0.7; extra == "test"
90
91
  Requires-Dist: pytest<9; extra == "test"
91
- Requires-Dist: pytest-cov<6; extra == "test"
92
+ Requires-Dist: pytest-cov<7; extra == "test"
92
93
  Requires-Dist: pytest-mock<4; extra == "test"
93
94
  Provides-Extra: vector
94
95
  Requires-Dist: numpy; extra == "vector"
@@ -37,6 +37,7 @@ src/sqlalchemy_cratedb/type/array.py
37
37
  src/sqlalchemy_cratedb/type/geo.py
38
38
  src/sqlalchemy_cratedb/type/object.py
39
39
  src/sqlalchemy_cratedb/type/vector.py
40
+ tests/test_error_handling.py
40
41
  tests/test_schema.py
41
42
  tests/test_support_pandas.py
42
43
  tests/test_support_polyfill.py
@@ -1,4 +1,4 @@
1
- crate==1.0.0.dev0
1
+ crate<2,>=1.0.0.dev2
2
2
  geojson<4,>=2.5
3
3
  sqlalchemy<2.1,>=1
4
4
  verlib2==0.2
@@ -11,11 +11,11 @@ importlib-resources
11
11
  sqlalchemy-cratedb[vector]
12
12
 
13
13
  [develop]
14
- mypy<1.12
15
- poethepoet<0.28
16
- pyproject-fmt<2.3
17
- ruff<0.7
18
- validate-pyproject<0.20
14
+ mypy<1.14
15
+ poethepoet<0.30
16
+ pyproject-fmt<2.6
17
+ ruff<0.8
18
+ validate-pyproject<0.23
19
19
 
20
20
  [doc]
21
21
  crate-docs-theme>=0.26.5
@@ -27,12 +27,14 @@ twine<6
27
27
 
28
28
  [test]
29
29
  cratedb-toolkit[testing]
30
- dask[dataframe]
31
30
  pandas<2.3
32
31
  pueblo>=0.0.7
33
32
  pytest<9
34
- pytest-cov<6
33
+ pytest-cov<7
35
34
  pytest-mock<4
36
35
 
36
+ [test:python_version < "3.13"]
37
+ dask[dataframe]
38
+
37
39
  [vector]
38
40
  numpy
@@ -0,0 +1,21 @@
1
+ import re
2
+
3
+ import pytest
4
+ import sqlalchemy as sa
5
+
6
+
7
+ def test_statement_with_error_trace(cratedb_service):
8
+ """
9
+ Verify that the `error_trace` option works correctly.
10
+ """
11
+ engine = sa.create_engine(cratedb_service.database.dburi, connect_args={"error_trace": True})
12
+ with engine.connect() as connection:
13
+ with pytest.raises(sa.exc.ProgrammingError) as ex:
14
+ connection.execute(sa.text("CREATE TABLE foo AS SELECT 1 AS _foo"))
15
+ assert ex.match(
16
+ re.escape('InvalidColumnNameException["_foo" conflicts with system column pattern]')
17
+ )
18
+ assert ex.match(
19
+ "io.crate.exceptions.InvalidColumnNameException: "
20
+ '"_foo" conflicts with system column pattern'
21
+ )