Skip to content

Commit 3868ce2

Browse files
Fix int marshalling (#383)
* Fix integer marshalling in python client * Increase version * Add deeper stacklevel * tox.ini: restore to main --------- Co-authored-by: Gavin Mendel-Gleason <gavin@terminusdb.com>
1 parent 1953ddb commit 3868ce2

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# TerminusDB Python Client Release Notes
22

3+
## v10.2.1
4+
5+
### Bug fixes
6+
7+
- Fix integer marshalling in schema with TerminusDB 11
8+
39
## v10.2.0
410

511
### New

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "terminusdb-client"
3-
version = "10.2.0"
3+
version = "10.2.1"
44
description = "Python client for Terminus DB"
55
authors = ["TerminusDB group"]
66
license = "Apache Software License"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
setuptools.setup(
3131
name="terminusdb-client",
32-
version="10.2.0",
32+
version="10.2.1",
3333
author="TerminusDB group",
3434
author_email="terminusdatabase@gmail.com",
3535
description="Python client for Terminus DB",

terminusdb_client/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__title__ = "woqlClient"
22
__description__ = "woqlClient library for accessing the Terminus DB API"
33
__url__ = ""
4-
__version__ = "10.2.0"
4+
__version__ = "10.2.1"
55
__build__ = 00
66
__author__ = "TerminusDB group"
77
__author_email__ = "team@terminusdb.com"

terminusdb_client/client/Client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,8 @@ def delete_database(
757757
self.db = dbid
758758
if team is None:
759759
warnings.warn(
760-
f"Delete Database Warning: You have not specify the team, assuming {self.team}/{self.db}"
760+
f"Delete Database Warning: You have not specify the team, assuming {self.team}/{self.db}",
761+
stacklevel=2,
761762
)
762763
else:
763764
self.team = team
@@ -1218,7 +1219,8 @@ def insert_document(
12181219
else:
12191220
if new_doc[0].get("@type") == "@context":
12201221
warnings.warn(
1221-
"To replace context, need to use `full_replace` or `replace_document`, skipping context object now."
1222+
"To replace context, need to use `full_replace` or `replace_document`, skipping context object now.",
1223+
stacklevel=2,
12221224
)
12231225
new_doc.pop(0)
12241226

terminusdb_client/schema/schema.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def _check_mismatch_type(prop, prop_value, prop_type):
6767
f"Property {prop} should be of type {prop_type_id} but got value of type {prop_value_id}"
6868
)
6969
else:
70+
if prop_type == int:
71+
prop_value = int(prop_value)
7072
check_type(prop, prop_value, prop_type)
7173

7274

terminusdb_client/woqlquery/woql_query.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,8 @@ def substr(self, string, length, substring, before=0, after=0):
12771277

12781278
def update_object(self, docjson):
12791279
warnings.warn(
1280-
DeprecationWarning("update_object() is deprecated; use update_document()")
1280+
DeprecationWarning("update_object() is deprecated; use update_document()"),
1281+
stacklevel=2,
12811282
)
12821283
return self.update_document(docjson)
12831284
# if docjson and docjson == "args":
@@ -1350,7 +1351,8 @@ def insert_document(self, docjson, json_or_iri=None):
13501351

13511352
def delete_object(self, json_or_iri):
13521353
warnings.warn(
1353-
DeprecationWarning("delete_object() is deprecated; use delete_document()")
1354+
DeprecationWarning("delete_object() is deprecated; use delete_document()"),
1355+
stacklevel=2,
13541356
)
13551357
return self.delete_document(json_or_iri)
13561358

@@ -1378,7 +1380,8 @@ def delete_document(self, json_or_iri):
13781380

13791381
def read_object(self, iri, output_var):
13801382
warnings.warn(
1381-
DeprecationWarning("read_object() is deprecated; use read_document()")
1383+
DeprecationWarning("read_object() is deprecated; use read_document()"),
1384+
stacklevel=2,
13821385
)
13831386
return self.read_document(iri, output_var)
13841387
# if iri and iri == "args":
@@ -2521,7 +2524,8 @@ def limit(self, limit, query=None):
25212524

25222525
def re(self, pattern, reg_str, reg_list):
25232526
warnings.warn(
2524-
DeprecationWarning("re() is deprecated; use regexp()")
2527+
DeprecationWarning("re() is deprecated; use regexp()"),
2528+
stacklevel=2,
25252529
)
25262530
return self.regexp(pattern, reg_str, reg_list)
25272531

0 commit comments

Comments
 (0)