Skip to content

Commit 39286a5

Browse files
authored
Merge pull request #824 from CitrineInformatics/remove-deprecated-deserialization-except
Remove unnecessary deserialization protection.
2 parents c660047 + 0f8da87 commit 39286a5

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

src/citrine/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.2.0'
1+
__version__ = '2.2.1'

src/citrine/_rest/collection.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,4 @@ def _build_collection_elements(self,
125125
126126
"""
127127
for element in collection:
128-
try:
129-
yield self.build(element)
130-
except(KeyError, ValueError) as e:
131-
# TODO(PLA-9109): This is a patch to handle deprecated predictors client side
132-
# Remove when predictors are migrated
133-
logger.warning(f"Building element skipped due to error: {e}")
134-
pass
128+
yield self.build(element)

tests/resources/test_project.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,6 @@ def test_list_no_team(session):
350350
assert 5 == len(projects)
351351

352352

353-
def test_list_projects_filters_non_projects(collection, session, caplog):
354-
# Given
355-
projects_data = ProjectDataFactory.create_batch(5)
356-
projects_data.append({'foo': 'not a project'})
357-
session.set_response({'projects': projects_data})
358-
359-
# Then
360-
with caplog.at_level(WARNING):
361-
caplog.clear()
362-
assert len(list(collection.list())) == 5 # Skip the bad one
363-
assert any(r.levelno == WARNING for r in caplog.records)
364-
365-
366353
def test_list_projects_with_page_params(collection, session):
367354
# Given
368355
project_data = ProjectDataFactory()

0 commit comments

Comments
 (0)