crate 2.0.0.dev2__tar.gz → 2.0.0.dev3__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.
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/PKG-INFO +1 -1
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/__init__.py +1 -1
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/http.py +2 -21
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate.egg-info/PKG-INFO +1 -1
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/CHANGES.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/CONTRIBUTING.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/DEVELOP.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/LICENSE +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/MANIFEST.in +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/NOTICE +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/README.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/_extra/robots.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/backlog.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/blobs.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/blob.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/client.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/connection.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/cursor.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/http.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/https.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/by-example/index.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/conf.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/connect.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/data-types.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/docutils.conf +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/getting-started.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/index-all.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/index.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/other-options.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/query.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/requirements.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/docs/sqlalchemy.rst +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/pyproject.toml +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/requirements.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/setup.cfg +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/setup.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/_pep440.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/blob.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/connection.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/converter.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/cursor.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/client/exceptions.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/testing/__init__.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/testing/layer.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate/testing/util.py +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate.egg-info/SOURCES.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate.egg-info/dependency_links.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate.egg-info/requires.txt +0 -0
- {crate-2.0.0.dev2 → crate-2.0.0.dev3}/src/crate.egg-info/top_level.txt +0 -0
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
# software solely pursuant to the terms of the relevant commercial agreement.
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
import calendar
|
|
24
23
|
import heapq
|
|
25
24
|
import io
|
|
26
25
|
import logging
|
|
@@ -30,11 +29,9 @@ import socket
|
|
|
30
29
|
import ssl
|
|
31
30
|
import threading
|
|
32
31
|
from base64 import b64encode
|
|
33
|
-
from datetime import date, datetime, timezone
|
|
34
32
|
from decimal import Decimal
|
|
35
33
|
from time import time
|
|
36
34
|
from urllib.parse import urlparse
|
|
37
|
-
from uuid import UUID
|
|
38
35
|
|
|
39
36
|
import orjson
|
|
40
37
|
import urllib3
|
|
@@ -86,30 +83,14 @@ def super_len(o):
|
|
|
86
83
|
return None
|
|
87
84
|
|
|
88
85
|
|
|
89
|
-
epoch_aware = datetime(1970, 1, 1, tzinfo=timezone.utc)
|
|
90
|
-
epoch_naive = datetime(1970, 1, 1)
|
|
91
|
-
|
|
92
|
-
|
|
93
86
|
def cratedb_json_encoder(obj):
|
|
94
87
|
"""
|
|
95
88
|
Encoder function for orjson.
|
|
96
89
|
|
|
97
90
|
https://github.com/ijl/orjson#default
|
|
98
|
-
https://github.com/ijl/orjson#opt_passthrough_datetime
|
|
99
91
|
"""
|
|
100
|
-
if isinstance(obj, (Decimal,
|
|
92
|
+
if isinstance(obj, (Decimal,)):
|
|
101
93
|
return str(obj)
|
|
102
|
-
if isinstance(obj, datetime):
|
|
103
|
-
if obj.tzinfo is not None:
|
|
104
|
-
delta = obj - epoch_aware
|
|
105
|
-
else:
|
|
106
|
-
delta = obj - epoch_naive
|
|
107
|
-
return int(
|
|
108
|
-
delta.microseconds / 1000.0
|
|
109
|
-
+ (delta.seconds + delta.days * 24 * 3600) * 1000.0
|
|
110
|
-
)
|
|
111
|
-
if isinstance(obj, date):
|
|
112
|
-
return calendar.timegm(obj.timetuple()) * 1000
|
|
113
94
|
return obj
|
|
114
95
|
|
|
115
96
|
|
|
@@ -117,7 +98,7 @@ def json_dumps(obj):
|
|
|
117
98
|
return orjson.dumps(
|
|
118
99
|
obj,
|
|
119
100
|
default=cratedb_json_encoder,
|
|
120
|
-
option=
|
|
101
|
+
option=orjson.OPT_SERIALIZE_NUMPY,
|
|
121
102
|
)
|
|
122
103
|
|
|
123
104
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|