Merge branch 'devel' into master
[diaspy.git] / Changelog.markdown
CommitLineData
4285c996 1## Changelog for `diaspy`, unofficial DIASPORA\* interface for Python
6d8d47ce
MM
2
3This changelog file follows few rules:
4
5* __rem__: indicates removed features,
6* __new__: indicates new features,
7* __upd__: indicates updated features,
8* __dep__: indicates deprecated features,
9
10Deprecation means that in the next version feature will be removed.
11
12Also, after every version there should be a brief note describing possible
13problems with migrating to it from older versions and usage of new features.
14
15Users can always read the manual and dcumentation to make themselves more knowledgeable and
16are encouraged to do so. They only need to remember that documentation is usually more
17up-to-date than manual and if conflicts appear they should follow the order:
18
19*docstrings* -> *docs/* -> *manual/*
20
b74513c5
MM
21----
22
23#### Known issues
24
25* __bug__: `diaspy` has problems/can't connect to pods using SNI (this is an issue with requests/urllib3/python),
26
6d8d47ce 27
6768a4e9
C
28----
29
8bfe79c7
C
30#### Version `0.6.1.dev` (not final changelog for this version, still in development)
31
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.
b9d087bb
C
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()`
40
8bfe79c7
C
41
42* __fix__: `diaspy.models.Post.__init__()` checking on different fetch states was a mess.
43* __fix__: `diaspy.streams.Asepcts.filter()` location fix.
b9d087bb
C
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()`
45
8bfe79c7
C
46
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()`
b9d087bb
C
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`
8bfe79c7
C
61
62* __rem__: `diaspy.streams.FollowedTags.get()` since it wasn’t doing anything usefull.
63
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.
66
67
68----
69
70
c0c23006 71#### Version `0.6.0`
6768a4e9
C
72
73In this release some bugs due to Diaspora changes where adressed, it also
74contains some new functionality. Also if `BeautifulSoup4` is installed it
75will use it instead of the regex solution where possible. Also some manual
76adjustments.
77
78IMPORTANT: `python-dateutil` is a requirement now.
79
80Note: In this version indentation changed from spaces to tabs.
81
82
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,
e5b83c4b 92* __upd__: `tests.py`,
6768a4e9
C
93
94
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()`,
101
102
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,
c0c23006 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()`,
6768a4e9
C
114
115
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,
e5b83c4b
C
118* __rem__: `backtime` parameter removed from `diaspy.streams.Generic.more()`,
119* __rem__: `protocol` parameter removed from `diaspy.people.User().fetchhandle()`.
6768a4e9
C
120
121
122----
123
124
125#### Version `0.5.0.1`
126
127This is a hotfix release.
128Plain 0.5.0 lost compatibility with older versions of Diaspora* due to a trivial assignment-related bug.
129
130
131----
132
133#### Version `0.5.0`
134
135Release 0.5.0
136This release fixes a bug that arose with Diaspora* 0.5.0 update which
137changed the way how the CSRF tokens have been embedded in HTML code.
138This required minor fix to the CSRF-extracting regex.
139
140Not much besides. Fixed a typo or two.
141
142
03ffc9ea
MM
143----
144
145#### Version `0.4.3`:
146
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),
149
150* __fix__: fixed a bug in `__repr__()` method in `people.User()` object,
151
152
415337b6
MM
153----
154
f9ffc79f 155#### Version `0.4.2` (2013-12-19):
f8752360
MM
156
157This version has some small incompatibilities with `0.4.1` so read Changelog carefully.
415337b6
MM
158
159* __new__: `diaspy.people.User._fetchstream()` method,
f8752360 160* __new__: `diaspy.people.Me()` object representing current user,
6c692631 161* __new__: `**kwargs` added to `diaspy.streams.Generic.json()` methdo to give developers control over the creation of JSON,
39af9756 162* __new__: `.getHCard()` method added to `diaspy.people.User()`,
f8752360 163
415337b6 164
f3b7fd44
MM
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),
6c692631
MM
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,
39af9756
MM
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()`,
f3b7fd44 172
415337b6 173
39af9756
MM
174* __rem__: `diaspy.connection.Connection.getUserInfo()` moved to `diaspy.connection.Connection.getUserData()`,
175* __rem__: `fetch` parameter removed from `diaspy.connection.Connection.getUserData()`,
6c692631
MM
176
177
178* __dep__: `max_time` parameter in `diaspy.streams.*.more()` method is deprecated,
f8752360 179
f9ffc79f
MM
180* __fix__: this release should fix the bug which prevented diaspy from working with some pods (e.g. diasp.eu and joindiaspora.com),
181
f8752360 182
f61c14c1
MM
183----
184
dc64fad2 185#### Version `0.4.1` (2013-09-12):
f61c14c1 186
2cf8467c
MM
187Login and authentication procedure backend received major changes in this version.
188There are no longer `username` and `password` variables in `Connection` object.
189Instead, credentials are stored (together with the token) in single variable `_login_data`.
190This is preserved until you call `login()` at which point credentials are erased and
191only token is left -- it can be obtained by calling `repr(Connection)`.
192
73a9e0d3
MM
193Also, this release is compatible with DIASPORA\* 0.2.0.0 but should still support
194pods running on older versions.
195
196And the test suite was updated. Yay!
197
3def6e18 198
dc64fad2 199* __new__: `diaspy.errors.SettingsError`.
f50cbea3
MM
200
201
202* __upd__: `diaspy.settings.Account.setEmail()` can now raise `SettingsError` when request fails,
556f2745 203* __upd__: `diaspy.settings.Account.getEmail()` will now return empty string instead of raising an exception if cannot fetch mail,
dc64fad2
MM
204* __upd__: improved language fetching in `diaspy.settings.Account.getLanguages()`.
205
206
207* __rem__: `diaspy/client.py` is removed,
f50cbea3
MM
208
209
3def6e18
MM
210**`0.4.1-rc.3` (2013-09-08):**
211
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,
222
223
cf6a800f
MM
224**`0.4.1-rc.2` (2013-09-06):**
225
226* __new__: `diaspy.search.Search.tags()` method for getting tag suggestions,
b74513c5
MM
227* __new__: `diaspy.settings.Profile.getName()` method,
228* __new__: `diaspy.settings.Profile.getBio()` method,
229* __new__: `diaspy.settings.Profile.getLocation()` method,
f91374ce 230* __new__: `diaspy.settings.Profile.getTags()` method,
b74513c5
MM
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,
f91374ce 235* __new__: `provider_display_name` parameter in `diaspy.streams.Stream.post()` (thanks @svbergerem),
cf6a800f 236
3def6e18 237
a90eb458
MM
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`,
b74513c5
MM
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`,
a90eb458 242
3def6e18 243
a90eb458
MM
244* __rem__: `username` and `password` parameters removed from `diaspy.connection.Connection.login()`
245 must be supplied on init,
246
cf6a800f 247
73a9e0d3 248**`0.4.1-rc.1` (2013-09-02):**
2cf8467c 249
f61c14c1 250* __new__: `__getitem__()` in `diaspy.models.Post`,
fe783229
MM
251* __new__: `__dict__()` in `diaspy.models.Post`,
252* __new__: `guid` argument in `diaspy.models.Post.__init__()`,
f61c14c1
MM
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`,
fe783229 258* __new__: `backtime` argument in `more()` method in `diaspy.streams.Generic`,
2cf8467c 259* __new__: `DiaspyError` will be raised when connection is created with empty password and/or username,
73a9e0d3
MM
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,
fe783229 262
3def6e18 263
fe783229
MM
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__()`),
51ab5af5 266* __upd__: `Search().lookup_user()` renamed to `Search().lookupUser()`,
3a509ff5 267* __upd__: `diaspy.messages` renamed to `diaspy.conversations` (but will be accessible under both names for this and next release),
2cf8467c
MM
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`,
73a9e0d3 271* __upd__: `aspect_id` renamed to `id` in `diaspy.streams.Aspects().remove()`,
f61c14c1 272
3def6e18
MM
273
274* __fix__: fixed some bugs in regular expressions used by `diaspy` internals (html tag removal, so you get nicer notifications),
5de52803 275* __fix__: fixed authentication issues,
f61c14c1
MM
276
277
1cff2093
MM
278----
279
4882952f
MM
280#### Version `0.4.0` (2013-08-20):
281
282This release is **not backwards compatible with `0.3.x` line**! You'll have to check your code for corrections.
283Also, this release if first to officially released fork version.
284
285* __dep__: `diaspy.client` is officially deprecated (will be removed in `0.4.1`),
286
3def6e18 287
4882952f
MM
288* __upd__: `diaspy.conversations` renamed to `diaspy.messages`,
289* __udp__: `diaspy.conversations.Conversation` moved to `diaspy.models`,
290
3def6e18 291
4882952f
MM
292* __new__: `diaspy.messages.Mailbox()` object representing diaspora\* mailbox,
293
294----
295
3def6e18 296#### Version `0.3.2` (2013-08-20):
1cff2093
MM
297
298* __upd__: `diaspy.connection.getUserData()` raises `DiaspyError` when it cannot find user data,
299
3def6e18 300
33735129
MM
301* __rem__: `diaspy.client.Client` must be explicitly imported,
302
615edb73
MM
303----
304
3def6e18 305#### Version `0.3.1` (2013-07-12):
615edb73
MM
306
307* __upd__: `diaspy.people.sephandle()` raises `InvalidHandleError` instead of `UserError`
63f1d9f1 308* __upd__: `models.Post()._fetch()` renamed to `_fetchdata()` (because of new `_fetchcomments()` method)
3def6e18
MM
309
310
313fb305
MM
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
615edb73 313* __new__: `connection.Connection` has new parameter in `__init__()`: it's `schema`
313fb305 314* __new__: `author()` method in `models.Post()`
615edb73
MM
315
316
317The new parameter in `connection.Connection` is useful when operating with handles.
318As handle does not contain schema (`http`, `https`, etc.) `_setlogin()` would raise an
319unhandled exception -- `requests.exceptions.MissingSchema`.
320Now, however, `Connection` will catch the exception, add missing schema and try once more.
321This parameter is provided to give programmers ability to manipulate it.
322
323Also, now you can pass just `pod.example.com` as `pod` parameter. Less typing!
324
313fb305
MM
325When it comes to posts, we are now able to fetch comments.
326
6d8d47ce
MM
327----
328
3def6e18 329#### Version `0.3.0` (2013-07-07):
6d8d47ce 330
cf0105fb
MM
331First edition of Changelog for `diaspy`.
332Developers should update their code as version `0.3.0` may not be fully
333backwards compatible depending on how the code is written.
334If you always pass named arguments and do not rely on their order you can, at least in
335theory, not worry about this update.
336
337Version `0.3.0` introduces few new features, fixes several bugs and brings a bit of
338redesign and refactoring od `diaspy`'s code.
339
3def6e18 340