1 ## Changelog for `diaspy`, unofficial DIASPORA\* interface for Python
3 This changelog file follows few rules:
5 * __rem__: indicates removed features,
6 * __new__: indicates new features,
7 * __upd__: indicates updated features,
8 * __dep__: indicates deprecated features,
10 Deprecation means that in the next version feature will be removed.
12 Also, after every version there should be a brief note describing possible
13 problems with migrating to it from older versions and usage of new features.
15 Users can always read the manual and dcumentation to make themselves more knowledgeable and
16 are encouraged to do so. They only need to remember that documentation is usually more
17 up-to-date than manual and if conflicts appear they should follow the order:
19 *docstrings* -> *docs/* -> *manual/*
25 * __bug__: `diaspy` has problems/can't connect to pods using SNI (this is an issue with requests/urllib3/python),
30 #### Version `0.6.1.dev` (not final changelog for this version, still in development)
32 * __upd__: `diaspy.models.Post.like()`, `diaspy.models.Post.delete_like()`, `diaspy.models.Post.reshare()` will now update data (count and likes/reshares) without doing another request.
33 * __upd__: Add `Comment()` to `diaspy.models.Post.comments` on `diaspy.models.Post.comment()`
34 * __upd__: Delete `Comment()` from `diaspy.models.Post.comments` on `diaspy.models.Post.delete_comment()`
35 * __upd__: Update `diaspy.models.Post._data["poll"]["participation_count"]` and `diaspy.models.Post._data["poll_participation_answer_id"]` after `diaspy.models.Post.vote_poll()`
36 * __upd__: Update `diaspy.models.Post._data["participation"]` on `diaspy.models.Post.subscribe()` and `diaspy.models.Post.unsubscribe()`
37 * __upd__: Removed `verify` keyword from `diaspy.connection.Connection` it's methods, it's now done through `**requestKwargs`. Default is still `True`.
38 * __upd__: `diaspy.streams.Stream._photoupload()` to more public method `diaspy.streams.Stream.photoupload()`
39 * __upd__: Update `diaspy.models.Notification.unread` and `diaspy.models.Notification._data['unread']` on `diasply.models.Notification.mark()`
42 * __fix__: `diaspy.models.Post.__init__()` checking on different fetch states was a mess.
43 * __fix__: `diaspy.streams.Asepcts.filter()` location fix.
44 * __fix__: Don't update `diaspy.notifications.Notifications` it's `unread_count_by_type` and `unread_count` on `diaspy.notifications.Notifications._expand()` and `diaspy.notifications.Notifications._update()` since it's already done in `diaspy.notifications.Notifications._finalize()`
47 * __new__: `diaspy.tagFollowings.TagFollowings()` which represents the tags followed by the user.
48 * __new__: `diaspy.models.FollowedTag()` which represents a tag followed by the user. It is used by `diaspy.tagFollowings.TagFollowings()`.
49 * __new__: It is now possible to give `**requestKwargs` to `diaspy.connection.Connection()` which will be used for every `request` unless directly overwritten by given the function you call different key-worded arguments.
50 * __new__: `diaspy.connection.Connection()` now does check if the `pod` you are connecting to has `Camo` enabled or not. Call `diaspy.connection.Connection.camo()` to receive `True` or `False`.
51 * __new__: `diaspy.models.Comment.authordata()` which will return all author data instead of `diaspy.models.Comment.author()` which will only return data for a certain key.
52 * __new__: `diaspy.streams.Public()`
53 * __new__: `diaspy.models.Post.fetchlikes()`.
54 * __new__: `diaspy.models.Post.fetchreshares()`
55 * __new__: `diaspy.streams.Generic.deletePostGuid()` deletes `Post` with given `guid` from the local stream object. (If you manualy update a post and find that it's been deleted, call this with the `guid` of the deleted `Post`)
56 * __new__: `diaspy.streams.Stream.deletephoto()`
57 * __new__: `diaspy.notifications.Notifications.__len__()`
58 * __new__: `diaspy.notifications.Notifications.data()`
59 * __new__: `diaspy.models.Comments.delete()` deletes comment by `id`.
60 * __new__: `diaspy.errors.NotificationError`
62 * __rem__: `diaspy.streams.FollowedTags.get()` since it wasn’t doing anything usefull.
64 * __dep__: `diaspy.streams.FollowedTags.remove()` Use `diaspy.tagFollowings.TagFollowings[“tagName”].delete()` instead.
65 * __dep__: `diaspy.streams.FollowedTags.add()` Use diaspy.tagFollowings.TagFollowings.follow() instead.
73 In this release some bugs due to Diaspora changes where adressed, it also
74 contains some new functionality. Also if `BeautifulSoup4` is installed it
75 will use it instead of the regex solution where possible. Also some manual
78 IMPORTANT: `python-dateutil` is a requirement now.
80 Note: In this version indentation changed from spaces to tabs.
83 * __upd__: `diaspy.people.User()`'s `fetchguid()` method can now be called with a parameter (`bool`), if set `False` it won't fetch the stream but only userdata, default it still does.,
84 * __upd__: `diaspy.people.User()` has new methods `getPhotos()` and `deletePhoto()`,
85 * __upd__: Aspect `id` is now removed from `diaspy.people.User()` object when removed,
86 * __upd__: `diaspy.people.Contacts()` it's `get()` method has the `page` parameter now,
87 * __upd__: It is now optional to automatic fetch contacts for `diaspy.people.Contacts()`, default it won't,
88 * __upd__: `diaspy.models.Notification()`'s `who()` method now return whole `guid`s instead of partial `guid`s,
89 * __upd__: Update `diaspy.models.Post()` it's interaction data after liked,
90 * __upd__: `diaspy.connection.Connection()`'s `getUserData()` method will now set the `Connection()` object it's `self._userdata`,
91 * __upd__: Posts obtained by `diaspy.streams.Generic()` are now fetched once instead of twice,
92 * __upd__: `tests.py`,
95 * __fix__: Streams seemed to miss posts on `more()` method, should be fixed now. Also a new dependency: `dateutil`,
96 * __fix__: Fixes `diaspy.streams.Generic()`'s `more()` and `update()` methods and adds `id` to posts,
97 * __fix__: `diaspy.streams.Aspect()` its `filter()` method,
98 * __fix__: `diaspy.models.Notification()`'s `who()` method it's regex pattern didn't always match, now it should,
99 * __fix__: `diaspy.models.Aspect()` its `addUser()` method did cause CSRF errors,
100 * __fix__: `diaspy.people.User()` its `getHCard()`,
103 * __new__: `diaspy.errors.SearchError()` and `diaspy.errors.TagError()`,
104 * __new__: `update()` and `more()` methods for `diaspy.notifications.Notifications`,
105 * __new__: `removeAspect()` method in `diaspy.models.Aspect()`,
106 * __new__: `diaspy.models.Comments()` class,
107 * __new__: `diaspy.models.Conversation()` has new methods `messages()` and `update_messages()`, it is also posible to call `len()` and iterate over the object,
108 * __new__: `diaspy.models.Post()`'s `comments` object is now a `Comments()` object instead of a `dict` (parsed json),
109 * __new__: `diaspy.models.Post()` has some new methods: `vote_poll()`, `hide()`, `mute()`, `subscribe()` and `unsubscribe()`,
110 * __new__: It is now possible to set `diaspy.people.User()` it's data manual by the `data` parameter,
111 * __new__: `diaspy.people.Contacts()` has new methods `add()` and `remove()` wich can add/remove a user to/from an aspect,
112 * __new__: Added BeautifulSoup4 (optional) support where possible instead of regex, kept regex as fallback,
113 * __new__: `diaspy.connection.Connection().podswitch()` has now a optional param `login` with as default set to `True`, if `False` it will only set the data and does not call `login()`,
116 * __rem__: `_obtain()` from `diaspy.streams.Outer()`, it was the same as `_obtain()` in `diaspy.streams.Generic()`,
117 * __rem__: `diaspy.models.Post()` its `update()` method since it is deprecated for a while now,
118 * __rem__: `backtime` parameter removed from `diaspy.streams.Generic.more()`,
119 * __rem__: `protocol` parameter removed from `diaspy.people.User().fetchhandle()`.
125 #### Version `0.5.0.1`
127 This is a hotfix release.
128 Plain 0.5.0 lost compatibility with older versions of Diaspora* due to a trivial assignment-related bug.
136 This release fixes a bug that arose with Diaspora* 0.5.0 update which
137 changed the way how the CSRF tokens have been embedded in HTML code.
138 This required minor fix to the CSRF-extracting regex.
140 Not much besides. Fixed a typo or two.
145 #### Version `0.4.3`:
147 * __new__: `people.User().fetchprofile()` will issue a warning when user cannot be found on current pod,
148 * __new__: `settings.Profile` is now loaded during initialization (can be switched off),
150 * __fix__: fixed a bug in `__repr__()` method in `people.User()` object,
155 #### Version `0.4.2` (2013-12-19):
157 This version has some small incompatibilities with `0.4.1` so read Changelog carefully.
159 * __new__: `diaspy.people.User._fetchstream()` method,
160 * __new__: `diaspy.people.Me()` object representing current user,
161 * __new__: `**kwargs` added to `diaspy.streams.Generic.json()` methdo to give developers control over the creation of JSON,
162 * __new__: `.getHCard()` method added to `diaspy.people.User()`,
165 * __upd__: `diaspy.connection.Connection.login()` modifies connection object in-place **and** returns it (this allows more fluent API),
166 * __upd__: `diaspy.connection.Connection.login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
167 * __upd__: `diaspy.connection.Connection._login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
168 * __upd__: better error message in `diaspy.models.Post().__init__()`,
169 * __upd__: `data` variable in `diaspy.models.Post()` renamed to `_data` to indicate that it's considered private,
170 * __upd__: after deleting a post `Activity` stream is purged instead of being refilled (this preserves state of stream which is not reset to last 15 posts),
171 * __upd__: `filterByIDs()` method in `Aspects` stream renamed to `filter()`,
174 * __rem__: `diaspy.connection.Connection.getUserInfo()` moved to `diaspy.connection.Connection.getUserData()`,
175 * __rem__: `fetch` parameter removed from `diaspy.connection.Connection.getUserData()`,
178 * __dep__: `max_time` parameter in `diaspy.streams.*.more()` method is deprecated,
180 * __fix__: this release should fix the bug which prevented diaspy from working with some pods (e.g. diasp.eu and joindiaspora.com),
185 #### Version `0.4.1` (2013-09-12):
187 Login and authentication procedure backend received major changes in this version.
188 There are no longer `username` and `password` variables in `Connection` object.
189 Instead, credentials are stored (together with the token) in single variable `_login_data`.
190 This is preserved until you call `login()` at which point credentials are erased and
191 only token is left -- it can be obtained by calling `repr(Connection)`.
193 Also, this release is compatible with DIASPORA\* 0.2.0.0 but should still support
194 pods running on older versions.
196 And the test suite was updated. Yay!
199 * __new__: `diaspy.errors.SettingsError`.
202 * __upd__: `diaspy.settings.Account.setEmail()` can now raise `SettingsError` when request fails,
203 * __upd__: `diaspy.settings.Account.getEmail()` will now return empty string instead of raising an exception if cannot fetch mail,
204 * __upd__: improved language fetching in `diaspy.settings.Account.getLanguages()`.
207 * __rem__: `diaspy/client.py` is removed,
210 **`0.4.1-rc.3` (2013-09-08):**
212 * __new__: `diaspy.settings.Profile.load()` method for loading profile information,
213 * __new__: `diaspy.settings.Profile.update()` method for updating profile information,
214 * __new__: `diaspy.settings.Profile.setName()` method,
215 * __new__: `diaspy.settings.Profile.setBio()` method,
216 * __new__: `diaspy.settings.Profile.setLocation()` method,
217 * __new__: `diaspy.settings.Profile.setTags()` method,
218 * __new__: `diaspy.settings.Profile.setGender()` method,
219 * __new__: `diaspy.settings.Profile.setBirthDate()` method,
220 * __new__: `diaspy.settings.Profile.setSearchable()` method,
221 * __new__: `diaspy.settings.Profile.setNSFW()` method,
224 **`0.4.1-rc.2` (2013-09-06):**
226 * __new__: `diaspy.search.Search.tags()` method for getting tag suggestions,
227 * __new__: `diaspy.settings.Profile.getName()` method,
228 * __new__: `diaspy.settings.Profile.getBio()` method,
229 * __new__: `diaspy.settings.Profile.getLocation()` method,
230 * __new__: `diaspy.settings.Profile.getTags()` method,
231 * __new__: `diaspy.settings.Profile.getGender()` method,
232 * __new__: `diaspy.settings.Profile.getBirthDate()` method,
233 * __new__: `diaspy.settings.Profile.isSearchable()` method,
234 * __new__: `diaspy.settings.Profile.isNSFW()` method,
235 * __new__: `provider_display_name` parameter in `diaspy.streams.Stream.post()` (thanks @svbergerem),
238 * __upd__: `remeber_me` parameter in `diaspy.connection.Connection.login()`,
239 * __upd__: you must supply `username` and `password` parameters on init of `diaspy.connection.Connection`,
240 * __upd__: you must update your testconf.py (new fields are required for settings tests),
241 * __upd__: `diaspy.settings.Settings` renamed to `diaspy.settings.Account`,
244 * __rem__: `username` and `password` parameters removed from `diaspy.connection.Connection.login()`
245 must be supplied on init,
248 **`0.4.1-rc.1` (2013-09-02):**
250 * __new__: `__getitem__()` in `diaspy.models.Post`,
251 * __new__: `__dict__()` in `diaspy.models.Post`,
252 * __new__: `guid` argument in `diaspy.models.Post.__init__()`,
253 * __new__: `json()` method in `diaspy.streams.Generic` adds the possibility to export streams to JSON,
254 * __new__: `full()` method in `diaspy.streams.Generic` will try to fetch full stream (containing all posts),
255 * __new__: `setEmail()` method in `diaspy.settings.Settings`,
256 * __new__: `setLanguage()` method in `diaspy.settings.Settings`,
257 * __new__: `downloadPhotos()` method in `diaspy.settings.Settings`,
258 * __new__: `backtime` argument in `more()` method in `diaspy.streams.Generic`,
259 * __new__: `DiaspyError` will be raised when connection is created with empty password and/or username,
260 * __new__: `getSessionToken()` method in `diaspy.connection.Connection` returns string from `_diaspora_session` cookie,
261 * __new__: `direct` parameter in `diaspy.connection.Connection().get()` allowing to disable pod expansion,
264 * __upd__: if `Post()` is created with fetched comments, data will also be fetched as a dependency,
265 * __upd__: `id` argument type is now `int` (`diaspy.models.Post.__init__()`),
266 * __upd__: `Search().lookup_user()` renamed to `Search().lookupUser()`,
267 * __upd__: `diaspy.messages` renamed to `diaspy.conversations` (but will be accessible under both names for this and next release),
268 * __upd__: `LoginError` moved to `diaspy.errors`,
269 * __upd__: `TokenError` moved to `diaspy.errors`,
270 * __upd__: `diaspy.connection.Connection.podswitch()` gained two new positional arguments: `username` and `password`,
271 * __upd__: `aspect_id` renamed to `id` in `diaspy.streams.Aspects().remove()`,
274 * __fix__: fixed some bugs in regular expressions used by `diaspy` internals (html tag removal, so you get nicer notifications),
275 * __fix__: fixed authentication issues,
280 #### Version `0.4.0` (2013-08-20):
282 This release is **not backwards compatible with `0.3.x` line**! You'll have to check your code for corrections.
283 Also, this release if first to officially released fork version.
285 * __dep__: `diaspy.client` is officially deprecated (will be removed in `0.4.1`),
288 * __upd__: `diaspy.conversations` renamed to `diaspy.messages`,
289 * __udp__: `diaspy.conversations.Conversation` moved to `diaspy.models`,
292 * __new__: `diaspy.messages.Mailbox()` object representing diaspora\* mailbox,
296 #### Version `0.3.2` (2013-08-20):
298 * __upd__: `diaspy.connection.getUserData()` raises `DiaspyError` when it cannot find user data,
301 * __rem__: `diaspy.client.Client` must be explicitly imported,
305 #### Version `0.3.1` (2013-07-12):
307 * __upd__: `diaspy.people.sephandle()` raises `InvalidHandleError` instead of `UserError`
308 * __upd__: `models.Post()._fetch()` renamed to `_fetchdata()` (because of new `_fetchcomments()` method)
311 * __new__: `models.Comment()` object: wrapper for comments, not to be created manually
312 * __new__: `comments` parameter in `models.Post`: defines whether to fetch post's commets
313 * __new__: `connection.Connection` has new parameter in `__init__()`: it's `schema`
314 * __new__: `author()` method in `models.Post()`
317 The new parameter in `connection.Connection` is useful when operating with handles.
318 As handle does not contain schema (`http`, `https`, etc.) `_setlogin()` would raise an
319 unhandled exception -- `requests.exceptions.MissingSchema`.
320 Now, however, `Connection` will catch the exception, add missing schema and try once more.
321 This parameter is provided to give programmers ability to manipulate it.
323 Also, now you can pass just `pod.example.com` as `pod` parameter. Less typing!
325 When it comes to posts, we are now able to fetch comments.
329 #### Version `0.3.0` (2013-07-07):
331 First edition of Changelog for `diaspy`.
332 Developers should update their code as version `0.3.0` may not be fully
333 backwards compatible depending on how the code is written.
334 If you always pass named arguments and do not rely on their order you can, at least in
335 theory, not worry about this update.
337 Version `0.3.0` introduces few new features, fixes several bugs and brings a bit of
338 redesign and refactoring od `diaspy`'s code.