Skip to content

Commit

Permalink
Merge pull request #327 from andrewwhitehead/upd/py-deps
Browse files Browse the repository at this point in the history
Update Python dependencies, use `orjson` if available
  • Loading branch information
andrewwhitehead authored Nov 27, 2024
2 parents 83a24f1 + a601fe6 commit 8a9f501
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
6 changes: 5 additions & 1 deletion wrappers/python/aries_askar/bindings/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
"""Low-level interaction with the aries-askar library."""

import asyncio
import json
import logging

try:
import orjson as json
except ImportError:
import json

from ctypes import POINTER, byref, c_int8, c_int32, c_int64
from typing import Optional, Sequence, Union

Expand Down
6 changes: 5 additions & 1 deletion wrappers/python/aries_askar/bindings/handle.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
"""Handles for allocated resources."""

import json
import logging

try:
import orjson as json
except ImportError:
import json

from ctypes import (
POINTER,
Structure,
Expand Down
6 changes: 5 additions & 1 deletion wrappers/python/aries_askar/bindings/lib.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
"""Library instance and allocated buffer handling."""

import asyncio
import json
import itertools
import logging
import os
import sys
import threading
import time

try:
import orjson as json
except ImportError:
import json

from ctypes import (
Array,
CDLL,
Expand Down
5 changes: 4 additions & 1 deletion wrappers/python/aries_askar/store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Handling of Store instances."""

import json
try:
import orjson as json
except ImportError:
import json

from typing import Optional, Sequence, Union

Expand Down
4 changes: 2 additions & 2 deletions wrappers/python/requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest~=8.2.2
pytest-asyncio~=0.23.7
pytest~=8.3.3
pytest-asyncio~=0.24.0
2 changes: 1 addition & 1 deletion wrappers/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cached_property~=1.5.2
cached_property~=2.0.0

0 comments on commit 8a9f501

Please sign in to comment.