crate 2.0.0.dev6__py3-none-any.whl → 2.1.0.dev1__py3-none-any.whl
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.
- crate/client/__init__.py +1 -1
- crate/client/connection.py +10 -1
- {crate-2.0.0.dev6.dist-info → crate-2.1.0.dev1.dist-info}/METADATA +9 -11
- {crate-2.0.0.dev6.dist-info → crate-2.1.0.dev1.dist-info}/RECORD +7 -8
- {crate-2.0.0.dev6.dist-info → crate-2.1.0.dev1.dist-info}/WHEEL +1 -1
- crate-2.0.0.dev6.dist-info/NOTICE +0 -24
- {crate-2.0.0.dev6.dist-info → crate-2.1.0.dev1.dist-info/licenses}/LICENSE +0 -0
- {crate-2.0.0.dev6.dist-info → crate-2.1.0.dev1.dist-info}/top_level.txt +0 -0
crate/client/__init__.py
CHANGED
crate/client/connection.py
CHANGED
@@ -18,8 +18,10 @@
|
|
18
18
|
# However, if you have executed another commercial license agreement
|
19
19
|
# with Crate these terms will supersede the license and you may use the
|
20
20
|
# software solely pursuant to the terms of the relevant commercial agreement.
|
21
|
+
import json
|
21
22
|
|
22
23
|
from verlib2 import Version
|
24
|
+
from verlib2.packaging.version import InvalidVersion
|
23
25
|
|
24
26
|
from .blob import BlobContainer
|
25
27
|
from .cursor import Cursor
|
@@ -197,14 +199,21 @@ class Connection:
|
|
197
199
|
|
198
200
|
def _lowest_server_version(self):
|
199
201
|
lowest = None
|
202
|
+
server_count = len(self.client.active_servers)
|
203
|
+
connection_errors = []
|
200
204
|
for server in self.client.active_servers:
|
201
205
|
try:
|
202
206
|
_, _, version = self.client.server_infos(server)
|
203
207
|
version = Version(version)
|
204
|
-
except
|
208
|
+
except ConnectionError as ex:
|
209
|
+
connection_errors.append(ex)
|
210
|
+
continue
|
211
|
+
except (ValueError, InvalidVersion):
|
205
212
|
continue
|
206
213
|
if not lowest or version < lowest:
|
207
214
|
lowest = version
|
215
|
+
if connection_errors and len(connection_errors) == server_count:
|
216
|
+
raise ConnectionError(json.dumps(list(map(str, connection_errors))))
|
208
217
|
return lowest or Version("0.0.0")
|
209
218
|
|
210
219
|
def __repr__(self):
|
@@ -1,16 +1,15 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: crate
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.1.0.dev1
|
4
4
|
Summary: CrateDB Python Client
|
5
5
|
Home-page: https://github.com/crate/crate-python
|
6
6
|
Author: Crate.io
|
7
7
|
Author-email: office@crate.io
|
8
|
-
License: Apache
|
8
|
+
License: Apache-2.0
|
9
9
|
Keywords: cratedb db api dbapi database sql http rdbms olap
|
10
10
|
Platform: any
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
12
12
|
Classifier: Intended Audience :: Developers
|
13
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
14
13
|
Classifier: Operating System :: OS Independent
|
15
14
|
Classifier: Programming Language :: Python
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
@@ -28,10 +27,9 @@ Classifier: Topic :: Database
|
|
28
27
|
Requires-Python: >=3.6
|
29
28
|
Description-Content-Type: text/x-rst
|
30
29
|
License-File: LICENSE
|
31
|
-
License-File: NOTICE
|
32
30
|
Requires-Dist: orjson<4
|
33
31
|
Requires-Dist: urllib3
|
34
|
-
Requires-Dist: verlib2
|
32
|
+
Requires-Dist: verlib2>=0.3
|
35
33
|
Provides-Extra: doc
|
36
34
|
Requires-Dist: crate-docs-theme>=0.26.5; extra == "doc"
|
37
35
|
Requires-Dist: sphinx<9,>=3.5; extra == "doc"
|
@@ -39,15 +37,14 @@ Provides-Extra: test
|
|
39
37
|
Requires-Dist: backports.zoneinfo<1; python_version < "3.9" and extra == "test"
|
40
38
|
Requires-Dist: certifi; extra == "test"
|
41
39
|
Requires-Dist: createcoverage<2,>=1; extra == "test"
|
42
|
-
Requires-Dist: mypy<1.
|
43
|
-
Requires-Dist: poethepoet<
|
44
|
-
Requires-Dist: ruff<0.
|
40
|
+
Requires-Dist: mypy<1.16; extra == "test"
|
41
|
+
Requires-Dist: poethepoet<1; extra == "test"
|
42
|
+
Requires-Dist: ruff<0.12; extra == "test"
|
45
43
|
Requires-Dist: stopit<2,>=1.1.2; extra == "test"
|
46
|
-
Requires-Dist: tox<5,>=3; extra == "test"
|
47
44
|
Requires-Dist: pytz; extra == "test"
|
48
45
|
Requires-Dist: zc.customdoctests<2,>=1.0.1; extra == "test"
|
49
46
|
Requires-Dist: zope.testing<6,>=4; extra == "test"
|
50
|
-
Requires-Dist: zope.testrunner<
|
47
|
+
Requires-Dist: zope.testrunner<8,>=5; extra == "test"
|
51
48
|
Dynamic: author
|
52
49
|
Dynamic: author-email
|
53
50
|
Dynamic: classifier
|
@@ -56,6 +53,7 @@ Dynamic: description-content-type
|
|
56
53
|
Dynamic: home-page
|
57
54
|
Dynamic: keywords
|
58
55
|
Dynamic: license
|
56
|
+
Dynamic: license-file
|
59
57
|
Dynamic: platform
|
60
58
|
Dynamic: provides-extra
|
61
59
|
Dynamic: requires-dist
|
@@ -1,7 +1,7 @@
|
|
1
|
-
crate/client/__init__.py,sha256=
|
1
|
+
crate/client/__init__.py,sha256=X01lNOlWwb_syAJuq9pcrC-fAchGQf7ngO5I2RE_rqg,1349
|
2
2
|
crate/client/_pep440.py,sha256=iwY5wopxbgbwsT0ImANrwN3V_ZYQHhSr7lEdVT5dQRM,42
|
3
3
|
crate/client/blob.py,sha256=aMo6ZNHGT3Zq_yR3gcpd3CKrJvfqUAhExhKtHUwC5Io,3460
|
4
|
-
crate/client/connection.py,sha256=
|
4
|
+
crate/client/connection.py,sha256=uA-r_HLo4mjbouYirV0xIF6rp9GAtK-PtAJlyNxpvHA,8514
|
5
5
|
crate/client/converter.py,sha256=Qci0MNcpz1jAnjquG8Ld9LI84_iHVInrv4HMb8r5zzg,4313
|
6
6
|
crate/client/cursor.py,sha256=Mlk-TVLzM4zSSr7GxcHK4Mjbt1KQeMfNFNrPBtGjk-c,10741
|
7
7
|
crate/client/exceptions.py,sha256=wMyJmOB3RP5kuPeW9f0fEb-1AKZcGSTyIGvN0HqpqUw,2557
|
@@ -9,9 +9,8 @@ crate/client/http.py,sha256=wNTlFOwYv9R4dMWvaZ7b-U-uzUwLNJB7pknwiE_QGkE,23270
|
|
9
9
|
crate/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
crate/testing/layer.py,sha256=jvHRWTRE4Zal211UO0HWPFcbprAcaGB3WyAUDR7BKFQ,13376
|
11
11
|
crate/testing/util.py,sha256=BPEZ8DavXwyOTCmOQnP5QjQlapEw3harzKK4w2HOTA4,3264
|
12
|
-
crate-2.
|
13
|
-
crate-2.
|
14
|
-
crate-2.
|
15
|
-
crate-2.
|
16
|
-
crate-2.
|
17
|
-
crate-2.0.0.dev6.dist-info/RECORD,,
|
12
|
+
crate-2.1.0.dev1.dist-info/licenses/LICENSE,sha256=s_w3FXmAYQuatqsgvyYLnGyC_13KOqp3W1DUEXO9RpY,10175
|
13
|
+
crate-2.1.0.dev1.dist-info/METADATA,sha256=I8EACwqsgmLKF4mqElYWHoB9sWDMJqTr6tAOOeVPtFA,5545
|
14
|
+
crate-2.1.0.dev1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
15
|
+
crate-2.1.0.dev1.dist-info/top_level.txt,sha256=2wP2HlpxdhgTLMl9ipi168xkm6FMq9_2bf0xGGxF_OI,6
|
16
|
+
crate-2.1.0.dev1.dist-info/RECORD,,
|
@@ -1,24 +0,0 @@
|
|
1
|
-
CrateDB Python Adapter
|
2
|
-
Copyright 2013-2024 Crate.IO GmbH ("Crate")
|
3
|
-
|
4
|
-
|
5
|
-
Licensed to Crate.IO GmbH (referred to in this notice as "Crate") under one or
|
6
|
-
more contributor license agreements.
|
7
|
-
|
8
|
-
Unless otherwise stated, every component of the CrateDB Python Adapter is
|
9
|
-
licensed under the Apache License, Version 2.0.
|
10
|
-
|
11
|
-
Third-party components bundled with the CrateDB Python Adapter are listed in
|
12
|
-
the LICENSE file along with their respective licenses. Any additional mandatory
|
13
|
-
notices pertaining to those dependencies will be reproduced in this file.
|
14
|
-
|
15
|
-
Crate provides pre-built releases for convenience, also known as convenience
|
16
|
-
releases. Building the CrateDB Python Adapter from source pulls in a number of
|
17
|
-
additional third-party dependencies. Hence, convenience releases will contain a
|
18
|
-
mix of CrateDB Python Adapter source code and third-party build-time
|
19
|
-
dependencies not listed in the LICENSE file or in this file.
|
20
|
-
|
21
|
-
Crate is committed to only using permissively licensed third-party code.
|
22
|
-
However, for the time being, if you make use of convenience releases, it is
|
23
|
-
your responsibility to check the licensing status of the bundled third-party
|
24
|
-
build-time dependencies.
|
File without changes
|
File without changes
|