Skip to content

Commit

Permalink
Remove pyrsistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Yan committed Oct 31, 2023
1 parent cdf72fd commit 63232fb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
6 changes: 0 additions & 6 deletions deltacat/tests/utils/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,3 @@ def test_metrics_config_immutability(self):
metrics_config.metrics_target = MetricsTarget.CLOUDWATCH
with self.assertRaises(Exception):
metrics_config.metrics_namespace = "test_namespace"
with self.assertRaises(Exception):
metrics_config.metrics_dimensions = []
with self.assertRaises(Exception):
metrics_config.metrics_dimensions[0] = {"Name": "Value"}
with self.assertRaises(Exception):
metrics_config.metrics_kwargs["test"] = "test"
5 changes: 2 additions & 3 deletions deltacat/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Dict, Any, List, Callable
from deltacat.aws.clients import resource_cache
from datetime import datetime
import pyrsistent

from ray.util import get_node_ip_address

Expand Down Expand Up @@ -45,8 +44,8 @@ def __init__(

# Pyrsistent is unable to enforce immutability on nested objects
# Please avoid modifying stored objects to preserve read-only status
self.metrics_dimensions = pyrsistent.v(*metrics_dimensions)
self.metrics_kwargs = pyrsistent.m(**metrics_kwargs)
self.metrics_dimensions = metrics_dimensions
self.metrics_kwargs = metrics_kwargs

# Enforce fields to be read-only after initialization
def __setattr__(self, __name: str, __value: Any) -> None:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pandas == 1.3.5
pyarrow == 12.0.1
pydantic == 1.10.4
pymemcache == 4.0.0
pyrsistent == 0.19.3
ray[default] ~= 2.0
redis == 4.6.0
s3fs == 2022.2.0
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def find_version(*paths):
"pyarrow == 12.0.1",
"pydantic == 1.10.4",
"pymemcache == 4.0.0",
"pyrsistent == 0.19.3",
"ray[default] ~= 2.0",
"s3fs == 2022.2.0",
"tenacity == 8.1.0",
Expand Down

0 comments on commit 63232fb

Please sign in to comment.