From 659ba5643d99b67b9ef01ab62a63b41b347d6c81 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Mon, 3 Jul 2017 22:24:05 +0300 Subject: [PATCH] Remove Post.photos attribute which was never used It was replaced by the _children attribute. --- CHANGELOG.md | 3 +++ federation/entities/base.py | 1 - federation/tests/entities/diaspora/test_utils.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf1018c..783a5b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Fixed * Fix getting sender from a combination of legacy Diaspora encrypted payload and new entity names (for example `author`). This combination probably only existed in this library. +### Removed +* `Post.photos` entity attribute was never used by any code and has been removed. Child entities of type `Image` are stored in the `Post._children` as before. + ## [0.12.0] - 2017-05-22 ### Backwards incompatible changes diff --git a/federation/entities/base.py b/federation/entities/base.py index 24b5dc2..530af8c 100644 --- a/federation/entities/base.py +++ b/federation/entities/base.py @@ -191,7 +191,6 @@ class Post(RawContentMixin, GUIDMixin, HandleMixin, PublicMixin, CreatedAtMixin, """Reflects a post, status message, etc, which will be composed from the message or to the message.""" provider_display_name = "" location = "" - photos = [] _allowed_children = (Image,) diff --git a/federation/tests/entities/diaspora/test_utils.py b/federation/tests/entities/diaspora/test_utils.py index e111325..ae09133 100644 --- a/federation/tests/entities/diaspora/test_utils.py +++ b/federation/tests/entities/diaspora/test_utils.py @@ -12,7 +12,7 @@ class TestGetBaseAttributes(): entity = Post() attrs = get_base_attributes(entity).keys() assert set(attrs) == { - "created_at", "guid", "handle", "location", "photos", "provider_display_name", "public", "raw_content", + "created_at", "guid", "handle", "location", "provider_display_name", "public", "raw_content", "signature", }