Skip to content

Commit

Permalink
DynamoDB: Update PyPartiqlParser version (#7683)
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers committed May 11, 2024
1 parent 408126a commit cf8e560
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
9 changes: 3 additions & 6 deletions moto/dynamodb/models/table_import.py
Expand Up @@ -100,18 +100,15 @@ def _process_s3_files(self, s3_backend: "S3Backend", bucket: "FakeBucket") -> No
max_keys=None,
)

from py_partiql_parser._internal.json_parser import JsonParser

parser = JsonParser()
from py_partiql_parser import JsonParser

for key in keys:
if self.compression_type == "GZIP":
content = gzip_decompress(key.value).decode("utf-8")
else:
content = key.value.decode("utf-8")
result = parser.parse(original=content)
if not isinstance(result, list):
result = [result]
result = JsonParser.parse(original=content)

for json_object in result:
try:
self.processed_count += 1
Expand Down
18 changes: 9 additions & 9 deletions setup.cfg
Expand Up @@ -54,7 +54,7 @@ all =
openapi-spec-validator>=0.5.0
pyparsing>=3.0.7
jsondiff>=1.1.2
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
aws-xray-sdk!=0.96,>=0.93
setuptools
multipart
Expand All @@ -69,7 +69,7 @@ proxy =
openapi-spec-validator>=0.5.0
pyparsing>=3.0.7
jsondiff>=1.1.2
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
aws-xray-sdk!=0.96,>=0.93
setuptools
multipart
Expand All @@ -84,7 +84,7 @@ server =
openapi-spec-validator>=0.5.0
pyparsing>=3.0.7
jsondiff>=1.1.2
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
aws-xray-sdk!=0.96,>=0.93
setuptools
flask!=2.2.0,!=2.2.1
Expand Down Expand Up @@ -119,7 +119,7 @@ cloudformation =
openapi-spec-validator>=0.5.0
pyparsing>=3.0.7
jsondiff>=1.1.2
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
aws-xray-sdk!=0.96,>=0.93
setuptools
cloudfront =
Expand All @@ -141,10 +141,10 @@ dms =
ds =
dynamodb =
docker>=3.0.0
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
dynamodbstreams =
docker>=3.0.0
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
ebs =
ec2 =
ec2instanceconnect =
Expand Down Expand Up @@ -208,15 +208,15 @@ resourcegroupstaggingapi =
openapi-spec-validator>=0.5.0
pyparsing>=3.0.7
jsondiff>=1.1.2
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
route53 =
route53resolver =
s3 =
PyYAML>=5.1
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
s3crc32c =
PyYAML>=5.1
py-partiql-parser==0.5.4
py-partiql-parser==0.5.5
crc32c
s3control =
sagemaker =
Expand Down

0 comments on commit cf8e560

Please sign in to comment.