nvidia-nat-mysql 1.3.dev0__py3-none-any.whl → 1.3.0.dev2__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.
@@ -14,7 +14,6 @@
14
14
  # limitations under the License.
15
15
 
16
16
  import logging
17
- import pickle
18
17
 
19
18
  import aiomysql
20
19
  from aiomysql.pool import Pool
@@ -57,8 +56,10 @@ class MySQLObjectStore(ObjectStore):
57
56
  )
58
57
  assert self._conn_pool is not None
59
58
 
60
- logger.info(
61
- f"Created connection pool for {self._config.bucket_name} at {self._config.host}:{self._config.port}")
59
+ logger.info("Created connection pool for %s at %s:%s",
60
+ self._config.bucket_name,
61
+ self._config.host,
62
+ self._config.port)
62
63
 
63
64
  async with self._conn_pool.acquire() as conn:
64
65
  async with conn.cursor() as cur:
@@ -88,8 +89,10 @@ class MySQLObjectStore(ObjectStore):
88
89
 
89
90
  await conn.commit()
90
91
 
91
- logger.info(
92
- f"Created schema and tables for {self._config.bucket_name} at {self._config.host}:{self._config.port}")
92
+ logger.info("Created schema and tables for %s at %s:%s",
93
+ self._config.bucket_name,
94
+ self._config.host,
95
+ self._config.port)
93
96
 
94
97
  return self
95
98
 
@@ -123,8 +126,7 @@ class MySQLObjectStore(ObjectStore):
123
126
  key=key, additional_message=f"MySQL table {self._config.bucket_name} already has key {key}")
124
127
  await cur.execute("SELECT id FROM object_meta WHERE path=%s FOR UPDATE;", (key, ))
125
128
  (obj_id, ) = await cur.fetchone()
126
-
127
- blob = pickle.dumps(item)
129
+ blob = item.model_dump_json()
128
130
  await cur.execute("INSERT INTO object_data (id, data) VALUES (%s, %s)", (obj_id, blob))
129
131
  await conn.commit()
130
132
  except Exception:
@@ -151,7 +153,7 @@ class MySQLObjectStore(ObjectStore):
151
153
  await cur.execute("SELECT id FROM object_meta WHERE path=%s FOR UPDATE;", (key, ))
152
154
  (obj_id, ) = await cur.fetchone()
153
155
 
154
- blob = pickle.dumps(item)
156
+ blob = item.model_dump_json()
155
157
  await cur.execute("REPLACE INTO object_data (id, data) VALUES (%s, %s)", (obj_id, blob))
156
158
  await conn.commit()
157
159
  except Exception:
@@ -178,7 +180,7 @@ class MySQLObjectStore(ObjectStore):
178
180
  if not row:
179
181
  raise NoSuchKeyError(
180
182
  key=key, additional_message=f"MySQL table {self._config.bucket_name} does not have key {key}")
181
- return pickle.loads(row[0])
183
+ return ObjectStoreItem.model_validate_json(row[0].decode("utf-8"))
182
184
 
183
185
  @override
184
186
  async def delete_object(self, key: str):
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-mysql
3
- Version: 1.3.dev0
3
+ Version: 1.3.0.dev2
4
4
  Summary: Subpackage for MySQL integration in NeMo Agent toolkit
5
5
  Keywords: ai,agents,memory,data store
6
6
  Classifier: Programming Language :: Python
7
- Requires-Python: >=3.12
7
+ Requires-Python: <3.13,>=3.11
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: nvidia-nat==v1.3-dev
9
+ Requires-Dist: nvidia-nat==v1.3.0-dev2
10
10
  Requires-Dist: aiomysql>=0.2.0
@@ -0,0 +1,9 @@
1
+ nat/plugins/mysql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ nat/plugins/mysql/mysql_object_store.py,sha256=wgsX797j21gw9ZFt9ZCrRHRT5GDrqPHywwFmc1HxdD4,8178
3
+ nat/plugins/mysql/object_store.py,sha256=IWMJFKBhn0lH7UGHuYkYht82TwIe5KXS7VUhQrlNRyI,2600
4
+ nat/plugins/mysql/register.py,sha256=7gqnwyDrYttIlEaa7lo9AASYt-2GrZJE0YT2jpKjepo,845
5
+ nvidia_nat_mysql-1.3.0.dev2.dist-info/METADATA,sha256=0nDmPlYVNyo6YJtSCIC8ADmgiENEe8k7uXdLH1-ZuMM,350
6
+ nvidia_nat_mysql-1.3.0.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ nvidia_nat_mysql-1.3.0.dev2.dist-info/entry_points.txt,sha256=ZI7ielmDX-k_OPXGvpRB5tKFVR5kMCHmHGwLWqxRKh0,56
8
+ nvidia_nat_mysql-1.3.0.dev2.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
9
+ nvidia_nat_mysql-1.3.0.dev2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- nat/plugins/mysql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- nat/plugins/mysql/mysql_object_store.py,sha256=EXHuA6z28__lH6qhSyGuIPWLPZ-5BzH9EHVCkpDYyvE,8042
3
- nat/plugins/mysql/object_store.py,sha256=IWMJFKBhn0lH7UGHuYkYht82TwIe5KXS7VUhQrlNRyI,2600
4
- nat/plugins/mysql/register.py,sha256=7gqnwyDrYttIlEaa7lo9AASYt-2GrZJE0YT2jpKjepo,845
5
- nvidia_nat_mysql-1.3.dev0.dist-info/METADATA,sha256=g11nXToNcwBEvbspx29N-29LrI_sGnp3Z0h2z2Wh7XI,339
6
- nvidia_nat_mysql-1.3.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- nvidia_nat_mysql-1.3.dev0.dist-info/entry_points.txt,sha256=ZI7ielmDX-k_OPXGvpRB5tKFVR5kMCHmHGwLWqxRKh0,56
8
- nvidia_nat_mysql-1.3.dev0.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
9
- nvidia_nat_mysql-1.3.dev0.dist-info/RECORD,,