uesleilima commented on code in PR #2372:
URL: https://github.com/apache/age/pull/2372#discussion_r3066356821


##########
drivers/python/test_agtypes.py:
##########
@@ -127,6 +127,168 @@ def test_path(self):
         self.assertEqual(vertexEnd.label,  "Person")
         self.assertEqual(vertexEnd["name"],  "Joe")
 
+    def test_vertex_large_array_properties(self):
+        """Issue #2367: Parser should handle vertices with large array 
properties."""
+        vertexExp = (
+            '{"id": 1125899906842625, "label": "TestNode", '
+            '"properties": {"name": "test", '
+            '"tags": ["tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7", '
+            '"tag8", "tag9", "tag10", "tag11", "tag12"]}}::vertex'
+        )
+        vertex = self.parse(vertexExp)
+        self.assertEqual(vertex.id, 1125899906842625)
+        self.assertEqual(vertex.label, "TestNode")
+        self.assertEqual(vertex["name"], "test")
+        self.assertEqual(len(vertex["tags"]), 12)
+        self.assertEqual(vertex["tags"][0], "tag1")
+        self.assertEqual(vertex["tags"][11], "tag12")
+
+    def test_vertex_special_characters_in_properties(self):
+        """Issue #2367: Parser should handle properties with special 
characters."""
+        vertexExp = (
+            '{"id": 1125899906842626, "label": "TestNode", '
+            '"properties": {"name": "test", '
+            '"description": "A long description with unicode chars"}}::vertex'
+        )
+        vertex = self.parse(vertexExp)
+        self.assertEqual(vertex.id, 1125899906842626)
+        self.assertEqual(vertex["name"], "test")
+        self.assertIn("unicode", vertex["description"])

Review Comment:
   Done in 4d0fb3b: the test now builds `properties` with `json.dumps` so we 
exercise embedded quotes, backslashes, newlines, and non-ASCII (e.g. café / 雪) 
and assert full round-trip equality.



##########
drivers/python/pyproject.toml:
##########
@@ -37,7 +37,9 @@ classifiers = [
 ]
 dependencies = [
     "psycopg",
-    "antlr4-python3-runtime==4.11.1",
+    # ANTLR4 runtime is format-compatible within major versions;
+    # tested on 4.11.1–4.13.2 with Python 3.9–3.14.
+    "antlr4-python3-runtime>=4.11.1,<5.0",

Review Comment:
   Added the `Programming Language :: Python :: 3.9` classifier so metadata 
matches `requires-python = ">=3.9"` and the ANTLR runtime comment (same commit).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to