Updated `Post()` to get data through `data()` since getitem is removed.
[diaspy.git] / Changelog.markdown
1 ## Changelog for `diaspy`, unofficial DIASPORA\* interface for Python
2
3 This 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
10 Deprecation means that in the next version feature will be removed.
11
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.
14
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:
18
19 *docstrings* -> *docs/* -> *manual/*
20
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
27
28 ----
29
30 #### Version `0.6.0` (for now, may change)
31
32 In this release some bugs due to Diaspora changes where adressed, it also
33 contains some new functionality. Also if `BeautifulSoup4` is installed it
34 will use it instead of the regex solution where possible. Also some manual
35 adjustments.
36
37 IMPORTANT: `python-dateutil` is a requirement now.
38
39 Note: In this version indentation changed from spaces to tabs.
40
41
42 * __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.,
43 * __upd__: `diaspy.people.User()` has new methods `getPhotos()` and `deletePhoto()`,
44 * __upd__: Aspect `id` is now removed from `diaspy.people.User()` object when removed,
45 * __upd__: `diaspy.people.Contacts()` it's `get()` method has the `page` parameter now,
46 * __upd__: It is now optional to automatic fetch contacts for `diaspy.people.Contacts()`, default it won't,
47 * __upd__: `diaspy.models.Notification()`'s `who()` method now return whole `guid`s instead of partial `guid`s,
48 * __upd__: Update `diaspy.models.Post()` it's interaction data after liked,
49 * __upd__: `diaspy.connection.Connection()`'s `getUserData()` method will now set the `Connection()` object it's `self._userdata`,
50 * __upd__: Posts obtained by `diaspy.streams.Generic()` are now fetched once instead of twice,
51
52
53 * __fix__: Streams seemed to miss posts on `more()` method, should be fixed now. Also a new dependency: `dateutil`,
54 * __fix__: Fixes `diaspy.streams.Generic()`'s `more()` and `update()` methods and adds `id` to posts,
55 * __fix__: `diaspy.streams.Aspect()` its `filter()` method,
56 * __fix__: `diaspy.models.Notification()`'s `who()` method it's regex pattern didn't always match, now it should,
57 * __fix__: `diaspy.models.Aspect()` its `addUser()` method did cause CSRF errors,
58 * __fix__: `diaspy.people.User()` its `getHCard()`,
59
60
61 * __new__: `diaspy.errors.SearchError()` and `diaspy.errors.TagError()`,
62 * __new__: `update()` and `more()` methods for `diaspy.notifications.Notifications`,
63 * __new__: `removeAspect()` method in `diaspy.models.Aspect()`,
64 * __new__: `diaspy.models.Comments()` class,
65 * __new__: `diaspy.models.Conversation()` has new methods `messages()` and `update_messages()`, it is also posible to call `len()` and iterate over the object,
66 * __new__: `diaspy.models.Post()`'s `comments` object is now a `Comments()` object instead of a `dict` (parsed json),
67 * __new__: `diaspy.models.Post()` has some new methods: `vote_poll()`, `hide()`, `mute()`, `subscribe()` and `unsubscribe()`,
68 * __new__: It is now possible to set `diaspy.people.User()` it's data manual by the `data` parameter,
69 * __new__: `diaspy.people.Contacts()` has new methods `add()` and `remove()` wich can add/remove a user to/from an aspect,
70 * __new__: Added BeautifulSoup4 (optional) support where possible instead of regex, kept regex as fallback,
71
72
73 * __rem__: `_obtain()` from `diaspy.streams.Outer()`, it was the same as `_obtain()` in `diaspy.streams.Generic()`,
74 * __rem__: `diaspy.models.Post()` its `update()` method since it is deprecated for a while now,
75 * __rem__: `backtime` parameter removed from `diaspy.streams.Generic.more()`.
76
77
78 ----
79
80
81 #### Version `0.5.0.1`
82
83 This is a hotfix release.
84 Plain 0.5.0 lost compatibility with older versions of Diaspora* due to a trivial assignment-related bug.
85
86
87 ----
88
89 #### Version `0.5.0`
90
91 Release 0.5.0
92 This release fixes a bug that arose with Diaspora* 0.5.0 update which
93 changed the way how the CSRF tokens have been embedded in HTML code.
94 This required minor fix to the CSRF-extracting regex.
95
96 Not much besides. Fixed a typo or two.
97
98
99 ----
100
101 #### Version `0.4.3`:
102
103 * __new__: `people.User().fetchprofile()` will issue a warning when user cannot be found on current pod,
104 * __new__: `settings.Profile` is now loaded during initialization (can be switched off),
105
106 * __fix__: fixed a bug in `__repr__()` method in `people.User()` object,
107
108
109 ----
110
111 #### Version `0.4.2` (2013-12-19):
112
113 This version has some small incompatibilities with `0.4.1` so read Changelog carefully.
114
115 * __new__: `diaspy.people.User._fetchstream()` method,
116 * __new__: `diaspy.people.Me()` object representing current user,
117 * __new__: `**kwargs` added to `diaspy.streams.Generic.json()` methdo to give developers control over the creation of JSON,
118 * __new__: `.getHCard()` method added to `diaspy.people.User()`,
119
120
121 * __upd__: `diaspy.connection.Connection.login()` modifies connection object in-place **and** returns it (this allows more fluent API),
122 * __upd__: `diaspy.connection.Connection.login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
123 * __upd__: `diaspy.connection.Connection._login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
124 * __upd__: better error message in `diaspy.models.Post().__init__()`,
125 * __upd__: `data` variable in `diaspy.models.Post()` renamed to `_data` to indicate that it's considered private,
126 * __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),
127 * __upd__: `filterByIDs()` method in `Aspects` stream renamed to `filter()`,
128
129
130 * __rem__: `diaspy.connection.Connection.getUserInfo()` moved to `diaspy.connection.Connection.getUserData()`,
131 * __rem__: `fetch` parameter removed from `diaspy.connection.Connection.getUserData()`,
132
133
134 * __dep__: `max_time` parameter in `diaspy.streams.*.more()` method is deprecated,
135
136 * __fix__: this release should fix the bug which prevented diaspy from working with some pods (e.g. diasp.eu and joindiaspora.com),
137
138
139 ----
140
141 #### Version `0.4.1` (2013-09-12):
142
143 Login and authentication procedure backend received major changes in this version.
144 There are no longer `username` and `password` variables in `Connection` object.
145 Instead, credentials are stored (together with the token) in single variable `_login_data`.
146 This is preserved until you call `login()` at which point credentials are erased and
147 only token is left -- it can be obtained by calling `repr(Connection)`.
148
149 Also, this release is compatible with DIASPORA\* 0.2.0.0 but should still support
150 pods running on older versions.
151
152 And the test suite was updated. Yay!
153
154
155 * __new__: `diaspy.errors.SettingsError`.
156
157
158 * __upd__: `diaspy.settings.Account.setEmail()` can now raise `SettingsError` when request fails,
159 * __upd__: `diaspy.settings.Account.getEmail()` will now return empty string instead of raising an exception if cannot fetch mail,
160 * __upd__: improved language fetching in `diaspy.settings.Account.getLanguages()`.
161
162
163 * __rem__: `diaspy/client.py` is removed,
164
165
166 **`0.4.1-rc.3` (2013-09-08):**
167
168 * __new__: `diaspy.settings.Profile.load()` method for loading profile information,
169 * __new__: `diaspy.settings.Profile.update()` method for updating profile information,
170 * __new__: `diaspy.settings.Profile.setName()` method,
171 * __new__: `diaspy.settings.Profile.setBio()` method,
172 * __new__: `diaspy.settings.Profile.setLocation()` method,
173 * __new__: `diaspy.settings.Profile.setTags()` method,
174 * __new__: `diaspy.settings.Profile.setGender()` method,
175 * __new__: `diaspy.settings.Profile.setBirthDate()` method,
176 * __new__: `diaspy.settings.Profile.setSearchable()` method,
177 * __new__: `diaspy.settings.Profile.setNSFW()` method,
178
179
180 **`0.4.1-rc.2` (2013-09-06):**
181
182 * __new__: `diaspy.search.Search.tags()` method for getting tag suggestions,
183 * __new__: `diaspy.settings.Profile.getName()` method,
184 * __new__: `diaspy.settings.Profile.getBio()` method,
185 * __new__: `diaspy.settings.Profile.getLocation()` method,
186 * __new__: `diaspy.settings.Profile.getTags()` method,
187 * __new__: `diaspy.settings.Profile.getGender()` method,
188 * __new__: `diaspy.settings.Profile.getBirthDate()` method,
189 * __new__: `diaspy.settings.Profile.isSearchable()` method,
190 * __new__: `diaspy.settings.Profile.isNSFW()` method,
191 * __new__: `provider_display_name` parameter in `diaspy.streams.Stream.post()` (thanks @svbergerem),
192
193
194 * __upd__: `remeber_me` parameter in `diaspy.connection.Connection.login()`,
195 * __upd__: you must supply `username` and `password` parameters on init of `diaspy.connection.Connection`,
196 * __upd__: you must update your testconf.py (new fields are required for settings tests),
197 * __upd__: `diaspy.settings.Settings` renamed to `diaspy.settings.Account`,
198
199
200 * __rem__: `username` and `password` parameters removed from `diaspy.connection.Connection.login()`
201 must be supplied on init,
202
203
204 **`0.4.1-rc.1` (2013-09-02):**
205
206 * __new__: `__getitem__()` in `diaspy.models.Post`,
207 * __new__: `__dict__()` in `diaspy.models.Post`,
208 * __new__: `guid` argument in `diaspy.models.Post.__init__()`,
209 * __new__: `json()` method in `diaspy.streams.Generic` adds the possibility to export streams to JSON,
210 * __new__: `full()` method in `diaspy.streams.Generic` will try to fetch full stream (containing all posts),
211 * __new__: `setEmail()` method in `diaspy.settings.Settings`,
212 * __new__: `setLanguage()` method in `diaspy.settings.Settings`,
213 * __new__: `downloadPhotos()` method in `diaspy.settings.Settings`,
214 * __new__: `backtime` argument in `more()` method in `diaspy.streams.Generic`,
215 * __new__: `DiaspyError` will be raised when connection is created with empty password and/or username,
216 * __new__: `getSessionToken()` method in `diaspy.connection.Connection` returns string from `_diaspora_session` cookie,
217 * __new__: `direct` parameter in `diaspy.connection.Connection().get()` allowing to disable pod expansion,
218
219
220 * __upd__: if `Post()` is created with fetched comments, data will also be fetched as a dependency,
221 * __upd__: `id` argument type is now `int` (`diaspy.models.Post.__init__()`),
222 * __upd__: `Search().lookup_user()` renamed to `Search().lookupUser()`,
223 * __upd__: `diaspy.messages` renamed to `diaspy.conversations` (but will be accessible under both names for this and next release),
224 * __upd__: `LoginError` moved to `diaspy.errors`,
225 * __upd__: `TokenError` moved to `diaspy.errors`,
226 * __upd__: `diaspy.connection.Connection.podswitch()` gained two new positional arguments: `username` and `password`,
227 * __upd__: `aspect_id` renamed to `id` in `diaspy.streams.Aspects().remove()`,
228
229
230 * __fix__: fixed some bugs in regular expressions used by `diaspy` internals (html tag removal, so you get nicer notifications),
231 * __fix__: fixed authentication issues,
232
233
234 ----
235
236 #### Version `0.4.0` (2013-08-20):
237
238 This release is **not backwards compatible with `0.3.x` line**! You'll have to check your code for corrections.
239 Also, this release if first to officially released fork version.
240
241 * __dep__: `diaspy.client` is officially deprecated (will be removed in `0.4.1`),
242
243
244 * __upd__: `diaspy.conversations` renamed to `diaspy.messages`,
245 * __udp__: `diaspy.conversations.Conversation` moved to `diaspy.models`,
246
247
248 * __new__: `diaspy.messages.Mailbox()` object representing diaspora\* mailbox,
249
250 ----
251
252 #### Version `0.3.2` (2013-08-20):
253
254 * __upd__: `diaspy.connection.getUserData()` raises `DiaspyError` when it cannot find user data,
255
256
257 * __rem__: `diaspy.client.Client` must be explicitly imported,
258
259 ----
260
261 #### Version `0.3.1` (2013-07-12):
262
263 * __upd__: `diaspy.people.sephandle()` raises `InvalidHandleError` instead of `UserError`
264 * __upd__: `models.Post()._fetch()` renamed to `_fetchdata()` (because of new `_fetchcomments()` method)
265
266
267 * __new__: `models.Comment()` object: wrapper for comments, not to be created manually
268 * __new__: `comments` parameter in `models.Post`: defines whether to fetch post's commets
269 * __new__: `connection.Connection` has new parameter in `__init__()`: it's `schema`
270 * __new__: `author()` method in `models.Post()`
271
272
273 The new parameter in `connection.Connection` is useful when operating with handles.
274 As handle does not contain schema (`http`, `https`, etc.) `_setlogin()` would raise an
275 unhandled exception -- `requests.exceptions.MissingSchema`.
276 Now, however, `Connection` will catch the exception, add missing schema and try once more.
277 This parameter is provided to give programmers ability to manipulate it.
278
279 Also, now you can pass just `pod.example.com` as `pod` parameter. Less typing!
280
281 When it comes to posts, we are now able to fetch comments.
282
283 ----
284
285 #### Version `0.3.0` (2013-07-07):
286
287 First edition of Changelog for `diaspy`.
288 Developers should update their code as version `0.3.0` may not be fully
289 backwards compatible depending on how the code is written.
290 If you always pass named arguments and do not rely on their order you can, at least in
291 theory, not worry about this update.
292
293 Version `0.3.0` introduces few new features, fixes several bugs and brings a bit of
294 redesign and refactoring od `diaspy`'s code.
295
296