Merge lp:~stefanor/ibid/releasenotes-0.1.1 into lp:~ibid-core/ibid/old-release-0.1-1.6
- releasenotes-0.1.1
- Merge into old-release-0.1-1.6
Proposed by
Stefano Rivera
Status: | Merged |
---|---|
Approved by: | Stefano Rivera |
Approved revision: | 996 |
Merged at revision: | 982 |
Proposed branch: | lp:~stefanor/ibid/releasenotes-0.1.1 |
Merge into: | lp:~ibid-core/ibid/old-release-0.1-1.6 |
Diff against target: |
686 lines (+597/-6) 8 files modified
CHANGES (+435/-0) docs/_extensions/extlinks.py (+67/-0) docs/changes.rst (+8/-0) docs/conf.py (+13/-2) docs/configuration.rst (+2/-3) docs/index.rst (+1/-0) setup.py (+1/-1) tools/format-changelog (+70/-0) |
To merge this branch: | bzr merge lp:~stefanor/ibid/releasenotes-0.1.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Keegan Carruthers-Smith | Approve | ||
Max Rabkin | Approve | ||
marcog (community) | Approve | ||
Jonathan Hitchcock | Approve | ||
Review via email: mp+47198@code.launchpad.net |
Commit message
Added CHANGES and tool for generating changelog entries.
Set version to 0.1.1
Description of the change
To post a comment you must log in.
Revision history for this message
Jonathan Hitchcock (vhata) : | # |
review:
Approve
Revision history for this message
marcog (marco-gallotta) : | # |
review:
Approve
Revision history for this message
Ibid Branch Auto-Lander (ibid-tarmac) wrote : | # |
Revision history for this message
Max Rabkin (max-rabkin) : | # |
review:
Approve
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'CHANGES' | |||
2 | --- CHANGES 1970-01-01 00:00:00 +0000 | |||
3 | +++ CHANGES 2011-02-20 21:52:17 +0000 | |||
4 | @@ -0,0 +1,435 @@ | |||
5 | 1 | Release 0.1.1 (2011-02-24) | ||
6 | 2 | ============================== | ||
7 | 3 | |||
8 | 4 | Bug fix release, including a couple of security issues. | ||
9 | 5 | |||
10 | 6 | Several plugins that consume Web services or scrape Web sites have been | ||
11 | 7 | updated to cope with changes since the last release. | ||
12 | 8 | |||
13 | 9 | There were no DB schema changes between 0.1.0 and 0.1.1. | ||
14 | 10 | |||
15 | 11 | Resolved Security Issues | ||
16 | 12 | ------------------------ | ||
17 | 13 | |||
18 | 14 | Remote Execution | ||
19 | 15 | ^^^^^^^^^^^^^^^^ | ||
20 | 16 | |||
21 | 17 | :bug:`705860`: | ||
22 | 18 | Permissions were ignored for handlers not using :func:`@match | ||
23 | 19 | <ibid.plugins.match>`. | ||
24 | 20 | This allowed users to perform actions they were not authorised to. | ||
25 | 21 | |||
26 | 22 | However, no included plugins were exposed by this, all | ||
27 | 23 | access-restricted handlers had match patterns. | ||
28 | 24 | |||
29 | 25 | Information Disclosure | ||
30 | 26 | ^^^^^^^^^^^^^^^^^^^^^^ | ||
31 | 27 | |||
32 | 28 | :bug:`567576`: | ||
33 | 29 | Occasionally insecure permissions on log files. | ||
34 | 30 | When the bot spoke first (creating a new log file), the log file | ||
35 | 31 | would be publicly readable, even if the message was sent in private. | ||
36 | 32 | |||
37 | 33 | Example: | ||
38 | 34 | If the bot delivered a *privmsg* memo to a user at the beginning of | ||
39 | 35 | the month, it would create the logfile with public readable | ||
40 | 36 | permissions. | ||
41 | 37 | If the logfile directory was published by a web server, this would | ||
42 | 38 | make this private conversation log accessible to the public. | ||
43 | 39 | |||
44 | 40 | Resolution: Now channels must be explicitly configured to have | ||
45 | 41 | publicly readable logs. | ||
46 | 42 | |||
47 | 43 | :bug:`649383`: | ||
48 | 44 | If someone received a private message from the bot | ||
49 | 45 | during a public meeting, the message could appear in the meeting | ||
50 | 46 | minutes. | ||
51 | 47 | |||
52 | 48 | Example: a *privmsg* memo received during a meeting would appear in | ||
53 | 49 | the minutes. | ||
54 | 50 | |||
55 | 51 | Major User Visible Changes | ||
56 | 52 | -------------------------- | ||
57 | 53 | |||
58 | 54 | * New configuration option ``plugins.log.public_logs``, a list of | ||
59 | 55 | ``source:channel`` globs of channels to log in files with publically | ||
60 | 56 | readable permissions. | ||
61 | 57 | |||
62 | 58 | * New configuration option ``plugins.ascii.preferred_fonts``, a list of | ||
63 | 59 | figlet fonts, the first one found is the default. | ||
64 | 60 | |||
65 | 61 | * Currency exchange now uses Yahoo instead of XE.com. | ||
66 | 62 | |||
67 | 63 | API Changes | ||
68 | 64 | ----------- | ||
69 | 65 | |||
70 | 66 | * New Function: :func:`ibid.utils.parse_timestamp` for parsing | ||
71 | 67 | well-formatted timestamps. | ||
72 | 68 | |||
73 | 69 | * New Function: :func:`ibid.utils.generic_webservice` for retrieving | ||
74 | 70 | arbitrary data from a web-service. | ||
75 | 71 | |||
76 | 72 | * New Function: :func:`ibid.db.get_regexp_op` which returns a REGEXP | ||
77 | 73 | SqlAlchemy operator for the DBMS in use. | ||
78 | 74 | |||
79 | 75 | All Changes | ||
80 | 76 | ----------- | ||
81 | 77 | |||
82 | 78 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
83 | 79 | |||
84 | 80 | Filter out empty definitions in gdefine. | ||
85 | 81 | |||
86 | 82 | Fixes: :bug:`719851`. | ||
87 | 83 | |||
88 | 84 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
89 | 85 | |||
90 | 86 | We don't support SQLAlchemy 0.6 yet. | ||
91 | 87 | |||
92 | 88 | Fixes: :bug:`651992`. | ||
93 | 89 | |||
94 | 90 | 2011-02-20 Marco Gallotta <marco@gallotta.co.za> | ||
95 | 91 | |||
96 | 92 | Only append .com for url's like "example". | ||
97 | 93 | |||
98 | 94 | Fixes: :bug:`702062`. | ||
99 | 95 | |||
100 | 96 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
101 | 97 | |||
102 | 98 | Use escape=# for LIKEs. | ||
103 | 99 | Perform literal queries on all non-get Factoid operations. Return | ||
104 | 100 | useful error if start index is too high. | ||
105 | 101 | Substitute $arg for _% in search. | ||
106 | 102 | |||
107 | 103 | Fixes: :bug:`544493`. | ||
108 | 104 | |||
109 | 105 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
110 | 106 | |||
111 | 107 | HTTPErrors should result in using url as title, not abandoning the | ||
112 | 108 | grab. | ||
113 | 109 | |||
114 | 110 | Fixes: :bug:`702798`. | ||
115 | 111 | |||
116 | 112 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
117 | 113 | |||
118 | 114 | Catch ImportErrors for packages we don't require in setup.py. | ||
119 | 115 | |||
120 | 116 | Fixes: :bug:`651990`. | ||
121 | 117 | |||
122 | 118 | 2011-02-20 Stefano Rivera <stefano@rivera.za.net> | ||
123 | 119 | |||
124 | 120 | pysqlite is only necessary on ancient Pythons. | ||
125 | 121 | |||
126 | 122 | Fixes: :bug:`708302`. | ||
127 | 123 | |||
128 | 124 | 2011-01-25 Stefano Rivera <stefano@rivera.za.net> | ||
129 | 125 | |||
130 | 126 | Add function get_regexp_op to ibid.db that returns a REGEXP op that | ||
131 | 127 | works on Postgres too. | ||
132 | 128 | |||
133 | 129 | Fixes: :bug:`595423`. | ||
134 | 130 | |||
135 | 131 | 2011-01-22 Keegan Carruthers-Smith <keegan.csmith@gmail.com> | ||
136 | 132 | |||
137 | 133 | Use correct plurality in pending memos message. | ||
138 | 134 | |||
139 | 135 | Fixes :bug:`634257`. | ||
140 | 136 | |||
141 | 137 | 2011-01-22 Stefano Rivera <stefano@rivera.za.net> | ||
142 | 138 | |||
143 | 139 | Add parse_timestamp function to ibid.utils, use for parsing | ||
144 | 140 | timestamps from Twitter. | ||
145 | 141 | |||
146 | 142 | Fixes :bug:`702815`. | ||
147 | 143 | |||
148 | 144 | 2011-01-22 Stefano Rivera <stefano@rivera.za.net> | ||
149 | 145 | |||
150 | 146 | URLErrors have reasons, but there are other HTTPErrors | ||
151 | 147 | |||
152 | 148 | Fixes :bug:`670855`. | ||
153 | 149 | |||
154 | 150 | 2011-01-21 Max Rabkin <max.rabkin@gmail.com> | ||
155 | 151 | |||
156 | 152 | Enforce permissions on non-@match handlers. | ||
157 | 153 | |||
158 | 154 | Fixes :bug:`705860`. | ||
159 | 155 | |||
160 | 156 | 2011-01-19 Stefano Rivera <stefano@rivera.za.net> | ||
161 | 157 | |||
162 | 158 | Handle non-500 error codes from twitter. | ||
163 | 159 | |||
164 | 160 | Fixes :bug:`670855`. | ||
165 | 161 | |||
166 | 162 | 2011-01-19 Stefano Rivera <stefano@rivera.za.net> | ||
167 | 163 | |||
168 | 164 | Strip tags from gcalc response. | ||
169 | 165 | |||
170 | 166 | Fixes :bug:`702371`. | ||
171 | 167 | |||
172 | 168 | 2011-01-19 Max Rabkin <max.rabkin@gmail.com> | ||
173 | 169 | |||
174 | 170 | Check content_type is set before checking its value. | ||
175 | 171 | |||
176 | 172 | Fixes :bug:`701900`. | ||
177 | 173 | |||
178 | 174 | 2011-01-19 Max Rabkin <max.rabkin@gmail.com> | ||
179 | 175 | |||
180 | 176 | Catch exceptions when polling feeds so that one broken feed doesn't | ||
181 | 177 | stop all feeds. | ||
182 | 178 | |||
183 | 179 | Fixes :bug:`578396`. | ||
184 | 180 | |||
185 | 181 | 2011-01-19 Max Rabkin <max.rabkin@gmail.com> | ||
186 | 182 | |||
187 | 183 | Use new OEIS API at oeis.org | ||
188 | 184 | |||
189 | 185 | Fixes :bug:`700475`. | ||
190 | 186 | |||
191 | 187 | 2010-12-25 Stefano Rivera <stefano@rivera.za.net> | ||
192 | 188 | |||
193 | 189 | Fix for the logging open file cache: Logs in logs might not be in | ||
194 | 190 | recent_logs. | ||
195 | 191 | |||
196 | 192 | Fixes :bug:`655645`. | ||
197 | 193 | |||
198 | 194 | 2010-12-25 Stefano Rivera <stefano@rivera.za.net> | ||
199 | 195 | |||
200 | 196 | Support toilet fonts, correctly decode utf-8 figlet output, handle | ||
201 | 197 | font choice edge cases. | ||
202 | 198 | |||
203 | 199 | Fixes :bug:`607743`. | ||
204 | 200 | |||
205 | 201 | 2010-12-24 Stefano Rivera <stefano@rivera.za.net> | ||
206 | 202 | |||
207 | 203 | Follow redirects in "is it up" | ||
208 | 204 | |||
209 | 205 | Fixes :bug:`599410`. | ||
210 | 206 | |||
211 | 207 | 2010-12-24 Stefano Rivera <stefano@rivera.za.net> | ||
212 | 208 | |||
213 | 209 | Rework nickserv auth to allow simultaneous authentications for the | ||
214 | 210 | same nick (although Nickserv will only be bothered once). | ||
215 | 211 | |||
216 | 212 | Fixes :bug:`655647`. | ||
217 | 213 | |||
218 | 214 | 2010-12-24 Stefano Rivera <stefano@rivera.za.net> | ||
219 | 215 | |||
220 | 216 | Use absolute imports to import SILC correctly | ||
221 | 217 | |||
222 | 218 | Fixes :bug:`654202`. | ||
223 | 219 | |||
224 | 220 | 2010-12-20 Stefano Rivera <stefano@rivera.za.net> | ||
225 | 221 | |||
226 | 222 | Country Code list parsing: Check for ; in a line before splitting by | ||
227 | 223 | semi-colons. | ||
228 | 224 | |||
229 | 225 | Fixes :bug:`692347`. | ||
230 | 226 | |||
231 | 227 | 2010-12-20 Max Rabkin <max.rabkin@gmail.com> | ||
232 | 228 | |||
233 | 229 | Don't treat feeds with no messages as errors. | ||
234 | 230 | |||
235 | 231 | Fixes :bug:`661187`. | ||
236 | 232 | |||
237 | 233 | 2010-11-08 Stefano Rivera <stefano@rivera.za.net> | ||
238 | 234 | |||
239 | 235 | Correctly handle state events that have no channel. | ||
240 | 236 | |||
241 | 237 | Fixes :bug:`656349`. | ||
242 | 238 | |||
243 | 239 | 2010-11-07 Stefano Rivera <stefano@rivera.za.net> | ||
244 | 240 | |||
245 | 241 | Port google scrape search to get_html_parse_tree + etree. Handle | ||
246 | 242 | superscript in gcalc. | ||
247 | 243 | |||
248 | 244 | Fixes :bug:`580696`. | ||
249 | 245 | |||
250 | 246 | 2010-11-07 Stefano Rivera <stefano@rivera.za.net> | ||
251 | 247 | |||
252 | 248 | Put periodic lock-using code in a try...finally block. | ||
253 | 249 | |||
254 | 250 | 2010-10-15 Stefano Rivera <stefano@rivera.za.net> | ||
255 | 251 | |||
256 | 252 | Support twitter's new AJAX URLs. | ||
257 | 253 | |||
258 | 254 | Fixes :bug:`654535`. | ||
259 | 255 | |||
260 | 256 | 2010-10-15 Stefano Rivera <stefano@rivera.za.net> | ||
261 | 257 | |||
262 | 258 | Always respond to memo sending with confirmation of recipient. Allow | ||
263 | 259 | memos to begin with "on ..." when not naming a known source. | ||
264 | 260 | |||
265 | 261 | Fixes :bug:`634253`. | ||
266 | 262 | |||
267 | 263 | 2010-10-04 Stefano Rivera <stefano@rivera.za.net> | ||
268 | 264 | |||
269 | 265 | Disallow empty factoid names. | ||
270 | 266 | |||
271 | 267 | Fixes :bug:`606065`. | ||
272 | 268 | |||
273 | 269 | 2010-10-05 Guy Halse | ||
274 | 270 | |||
275 | 271 | Allow bot to identify with zanet.net's NickServ. | ||
276 | 272 | |||
277 | 273 | Fixes :bug:`652000`. | ||
278 | 274 | |||
279 | 275 | 2010-10-03 Stefano Rivera <stefano@rivera.za.net> | ||
280 | 276 | |||
281 | 277 | [SECURITY] Add a configuration glob-list of channels which should | ||
282 | 278 | have public logs, rather than attempting to guess. | ||
283 | 279 | |||
284 | 280 | Fixes :bug:`567576`. | ||
285 | 281 | |||
286 | 282 | 2010-09-30 Stefano Rivera <stefano@rivera.za.net> | ||
287 | 283 | |||
288 | 284 | Docs: Be clear that ibid is in Debian & Ubuntu. | ||
289 | 285 | |||
290 | 286 | 2010-09-30 Stefano Rivera <stefano@rivera.za.net> | ||
291 | 287 | |||
292 | 288 | Handle 0 tweets in Twitter Atom feed parsing, correctly handle it | ||
293 | 289 | elsewhere instead of treating it as no such twit. | ||
294 | 290 | |||
295 | 291 | Fixes :bug:`646989`. | ||
296 | 292 | |||
297 | 293 | 2010-09-29 Max Rabkin <max.rabkin@gmail.com> | ||
298 | 294 | |||
299 | 295 | [SECURITY] Don't leak private messages to meeting logs. | ||
300 | 296 | |||
301 | 297 | Fixes :bug:`649383`. | ||
302 | 298 | |||
303 | 299 | 2010-08-14 Stefano Rivera <stefano@rivera.za.net> | ||
304 | 300 | |||
305 | 301 | Don't try to process() events without a message in meeting. | ||
306 | 302 | |||
307 | 303 | Fixes :bug:`598094`. | ||
308 | 304 | |||
309 | 305 | 2010-07-10 Stefano Rivera <stefano@rivera.za.net> | ||
310 | 306 | |||
311 | 307 | Correct abbreviated cross-ref format, shown up by Sphinx 1.0b1. | ||
312 | 308 | |||
313 | 309 | 2010-07-04 Stefano Rivera <stefano@rivera.za.net> | ||
314 | 310 | |||
315 | 311 | Display latest tweets from retweeting-twits instead of thinking they | ||
316 | 312 | don't exist. | ||
317 | 313 | |||
318 | 314 | Fixes :bug:`554906`. | ||
319 | 315 | |||
320 | 316 | 2010-06-13 Michael Gorven <michael@gorven.za.net> | ||
321 | 317 | |||
322 | 318 | Fix real JID detection when more than one 'x' element is received. | ||
323 | 319 | |||
324 | 320 | 2010-06-07 Stefano Rivera <stefano@rivera.za.net> | ||
325 | 321 | |||
326 | 322 | NickServ support for rizon. | ||
327 | 323 | |||
328 | 324 | 2010-06-04 Stefano Rivera <stefano@rivera.za.net> | ||
329 | 325 | |||
330 | 326 | Switch from XE.com to Yahoo for currency conversions. | ||
331 | 327 | |||
332 | 328 | 2010-06-04 Stefano Rivera <stefano@rivera.za.net> | ||
333 | 329 | |||
334 | 330 | Limit the size of the file-descriptor pool in log. | ||
335 | 331 | |||
336 | 332 | Fixes :bug:`567571`. | ||
337 | 333 | |||
338 | 334 | 2010-05-12 Stefano Rivera <stefano@rivera.za.net> | ||
339 | 335 | |||
340 | 336 | Google is also a calculator. | ||
341 | 337 | |||
342 | 338 | Fixes :bug:`574300`. | ||
343 | 339 | |||
344 | 340 | 2010-05-12 Stefano Rivera <stefano@rivera.za.net> | ||
345 | 341 | |||
346 | 342 | Use explicit lower() on each side of LIKE so factoids with arguments | ||
347 | 343 | can be case-insensitive on Postgres. | ||
348 | 344 | |||
349 | 345 | Fixes :bug:`574427`. | ||
350 | 346 | |||
351 | 347 | 2010-05-05 Max Rabkin <max.rabkin@gmail.com> | ||
352 | 348 | |||
353 | 349 | Escape query url in google scrape. | ||
354 | 350 | |||
355 | 351 | Fixes :bug:`572308`. | ||
356 | 352 | |||
357 | 353 | 2010-05-05 Stefano Rivera <stefano@rivera.za.net> | ||
358 | 354 | |||
359 | 355 | Incorrect substitution in SQLite indexing warning. | ||
360 | 356 | |||
361 | 357 | 2010-05-05 Stefano Rivera <stefano@rivera.za.net> | ||
362 | 358 | |||
363 | 359 | Change administrative user & identity linking syntax to be less | ||
364 | 360 | problematically broad. | ||
365 | 361 | |||
366 | 362 | Fixes :bug:`567510`. | ||
367 | 363 | |||
368 | 364 | 2010-04-26 Stefano Rivera <stefano@rivera.za.net> | ||
369 | 365 | |||
370 | 366 | Increase default HTTP GET size from 500 bytes to 2kiB. | ||
371 | 367 | |||
372 | 368 | Fixes :bug:`563928`. | ||
373 | 369 | |||
374 | 370 | 2010-04-13 Stefano Rivera <stefano@rivera.za.net> | ||
375 | 371 | |||
376 | 372 | Update youtube plugin to cope with site redesign. | ||
377 | 373 | |||
378 | 374 | Fixes :bug:`561684`. | ||
379 | 375 | |||
380 | 376 | 2010-04-13 Max Rabkin <max.rabkin@gmail.com> | ||
381 | 377 | |||
382 | 378 | Allow digits in Unicode character names. | ||
383 | 379 | |||
384 | 380 | 2010-04-13 Stefano Rivera <stefano@rivera.za.net> | ||
385 | 381 | |||
386 | 382 | HTTP GET: Don't assume everything is utf-8, decode according to | ||
387 | 383 | provided charset, fall back to utf-8 for text, and guess with chardet | ||
388 | 384 | if either of those was wrong. | ||
389 | 385 | |||
390 | 386 | Fixes :bug:`560973`. | ||
391 | 387 | |||
392 | 388 | 2010-04-09 Max Rabkin <max.rabkin@gmail.com> | ||
393 | 389 | |||
394 | 390 | Use unicode case-insensitive matching in factoid. | ||
395 | 391 | |||
396 | 392 | Fixes :bug:`542707`. | ||
397 | 393 | |||
398 | 394 | 2010-03-27 Michael Gorven <michael@gorven.za.net> | ||
399 | 395 | |||
400 | 396 | Treat the Processor's first feature as the primary feature in RPC. | ||
401 | 397 | |||
402 | 398 | Fixes :bug:`545168`. | ||
403 | 399 | |||
404 | 400 | 2010-03-27 Max Rabkin <max.rabkin@gmail.com> | ||
405 | 401 | |||
406 | 402 | Respond with unicode in bible error handlers. | ||
407 | 403 | |||
408 | 404 | Fixes :bug:`544260`. | ||
409 | 405 | |||
410 | 406 | 2010-03-26 Marco Gallotta <marco@gallotta.co.za> | ||
411 | 407 | |||
412 | 408 | Allow trailing punctuation in tea-style addressing. | ||
413 | 409 | |||
414 | 410 | Fixes :bug:`545186`. | ||
415 | 411 | |||
416 | 412 | 2010-03-23 Marco Gallotta <marco@gallotta.co.za> | ||
417 | 413 | |||
418 | 414 | Add username=ibid parameter to geonames API calls. Some calls now | ||
419 | 415 | require it. | ||
420 | 416 | |||
421 | 417 | Fixes :bug:`543989`. | ||
422 | 418 | |||
423 | 419 | 2010-03-23 Max Rabkin <max.rabkin@gmail.com> | ||
424 | 420 | |||
425 | 421 | Python 2.5 compatibility update for unicode lookup. Exception for | ||
426 | 422 | unknown character changed in 2.6. | ||
427 | 423 | |||
428 | 424 | Fixes :bug:`542593`. | ||
429 | 425 | |||
430 | 426 | 2010-03-10 Stefano Rivera <stefano@rivera.za.net> | ||
431 | 427 | |||
432 | 428 | Add placeholder to force ibid/static to be distributed. | ||
433 | 429 | |||
434 | 430 | Release 0.1.0 (2010-03-10) | ||
435 | 431 | ========================== | ||
436 | 432 | |||
437 | 433 | * First public release. | ||
438 | 434 | |||
439 | 435 | .. vi: set ft=rst et sta sw=3 ts=3: | ||
440 | 0 | 436 | ||
441 | === added directory 'docs/_extensions' | |||
442 | === added file 'docs/_extensions/extlinks.py' | |||
443 | --- docs/_extensions/extlinks.py 1970-01-01 00:00:00 +0000 | |||
444 | +++ docs/_extensions/extlinks.py 2011-02-20 21:52:17 +0000 | |||
445 | @@ -0,0 +1,67 @@ | |||
446 | 1 | # -*- coding: utf-8 -*- | ||
447 | 2 | # Backport of sphinx.ext.extlinks to Sphinx 0.6 | ||
448 | 3 | """ | ||
449 | 4 | sphinx.ext.extlinks | ||
450 | 5 | ~~~~~~~~~~~~~~~~~~~ | ||
451 | 6 | |||
452 | 7 | Extension to save typing and prevent hard-coding of base URLs in the reST | ||
453 | 8 | files. | ||
454 | 9 | |||
455 | 10 | This adds a new config value called ``extlinks`` that is created like this:: | ||
456 | 11 | |||
457 | 12 | extlinks = {'exmpl': ('http://example.com/%s.html', prefix), ...} | ||
458 | 13 | |||
459 | 14 | Now you can use e.g. :exmpl:`foo` in your documents. This will create a | ||
460 | 15 | link to ``http://example.com/foo.html``. The link caption depends on the | ||
461 | 16 | *prefix* value given: | ||
462 | 17 | |||
463 | 18 | - If it is ``None``, the caption will be the full URL. | ||
464 | 19 | - If it is a string (empty or not), the caption will be the prefix prepended | ||
465 | 20 | to the role content. | ||
466 | 21 | |||
467 | 22 | You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`. | ||
468 | 23 | |||
469 | 24 | :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | ||
470 | 25 | :license: BSD, see LICENSE for details. | ||
471 | 26 | """ | ||
472 | 27 | |||
473 | 28 | import re | ||
474 | 29 | |||
475 | 30 | from docutils import nodes, utils | ||
476 | 31 | |||
477 | 32 | explicit_title_re = re.compile(r'^(.+?)\s*(?<!\x00)<(.*?)>$', re.DOTALL) | ||
478 | 33 | def split_explicit_title(text): | ||
479 | 34 | """Split role content into title and target, if given.""" | ||
480 | 35 | match = explicit_title_re.match(text) | ||
481 | 36 | if match: | ||
482 | 37 | return True, match.group(1), match.group(2) | ||
483 | 38 | return False, text, text | ||
484 | 39 | |||
485 | 40 | def make_link_role(base_url, prefix): | ||
486 | 41 | def role(typ, rawtext, text, lineno, inliner, options={}, content=[]): | ||
487 | 42 | text = utils.unescape(text) | ||
488 | 43 | has_explicit_title, title, part = split_explicit_title(text) | ||
489 | 44 | try: | ||
490 | 45 | full_url = base_url % part | ||
491 | 46 | except (TypeError, ValueError): | ||
492 | 47 | env = inliner.document.settings.env | ||
493 | 48 | env.warn(env.docname, 'unable to expand %s extlink with base ' | ||
494 | 49 | 'URL %r, please make sure the base contains \'%%s\' ' | ||
495 | 50 | 'exactly once' % (typ, base_url)) | ||
496 | 51 | full_url = base_url + part | ||
497 | 52 | if not has_explicit_title: | ||
498 | 53 | if prefix is None: | ||
499 | 54 | title = full_url | ||
500 | 55 | else: | ||
501 | 56 | title = prefix + part | ||
502 | 57 | pnode = nodes.reference(title, title, refuri=full_url) | ||
503 | 58 | return [pnode], [] | ||
504 | 59 | return role | ||
505 | 60 | |||
506 | 61 | def setup_link_roles(app): | ||
507 | 62 | for name, (base_url, prefix) in app.config.extlinks.iteritems(): | ||
508 | 63 | app.add_role(name, make_link_role(base_url, prefix)) | ||
509 | 64 | |||
510 | 65 | def setup(app): | ||
511 | 66 | app.add_config_value('extlinks', {}, 'env') | ||
512 | 67 | app.connect('builder-inited', setup_link_roles) | ||
513 | 0 | 68 | ||
514 | === added file 'docs/changes.rst' | |||
515 | --- docs/changes.rst 1970-01-01 00:00:00 +0000 | |||
516 | +++ docs/changes.rst 2011-02-20 21:52:17 +0000 | |||
517 | @@ -0,0 +1,8 @@ | |||
518 | 1 | :tocdepth: 2 | ||
519 | 2 | |||
520 | 3 | Changes in Ibid | ||
521 | 4 | *************** | ||
522 | 5 | |||
523 | 6 | .. include:: ../CHANGES | ||
524 | 7 | |||
525 | 8 | .. vi: set et sta sw=3 ts=3: | ||
526 | 0 | 9 | ||
527 | === modified file 'docs/conf.py' | |||
528 | --- docs/conf.py 2011-01-15 08:51:05 +0000 | |||
529 | +++ docs/conf.py 2011-02-20 21:52:17 +0000 | |||
530 | @@ -13,6 +13,8 @@ | |||
531 | 13 | 13 | ||
532 | 14 | import sys, os | 14 | import sys, os |
533 | 15 | 15 | ||
534 | 16 | import sphinx | ||
535 | 17 | |||
536 | 16 | # If extensions (or modules to document with autodoc) are in another directory, | 18 | # If extensions (or modules to document with autodoc) are in another directory, |
537 | 17 | # add these directories to sys.path here. If the directory is relative to the | 19 | # add these directories to sys.path here. If the directory is relative to the |
538 | 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. | 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
539 | @@ -22,7 +24,11 @@ | |||
540 | 22 | 24 | ||
541 | 23 | # Add any Sphinx extension module names here, as strings. They can be extensions | 25 | # Add any Sphinx extension module names here, as strings. They can be extensions |
542 | 24 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | 26 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
544 | 25 | extensions = [] | 27 | sys.path.append(os.path.abspath('_extensions')) |
545 | 28 | if sphinx.__version__ > '1.0': | ||
546 | 29 | extensions = ['sphinx.ext.extlinks'] | ||
547 | 30 | else: | ||
548 | 31 | extensions = ['extlinks'] | ||
549 | 26 | 32 | ||
550 | 27 | # Add any paths that contain templates here, relative to this directory. | 33 | # Add any paths that contain templates here, relative to this directory. |
551 | 28 | templates_path = ['_templates'] | 34 | templates_path = ['_templates'] |
552 | @@ -47,7 +53,7 @@ | |||
553 | 47 | # The short X.Y version. | 53 | # The short X.Y version. |
554 | 48 | version = '0.1' | 54 | version = '0.1' |
555 | 49 | # The full version, including alpha/beta/rc tags. | 55 | # The full version, including alpha/beta/rc tags. |
557 | 50 | release = '0.1.0' | 56 | release = '0.1.1' |
558 | 51 | 57 | ||
559 | 52 | # The language for content autogenerated by Sphinx. Refer to documentation | 58 | # The language for content autogenerated by Sphinx. Refer to documentation |
560 | 53 | # for a list of supported languages. | 59 | # for a list of supported languages. |
561 | @@ -192,3 +198,8 @@ | |||
562 | 192 | 198 | ||
563 | 193 | # If false, no module index is generated. | 199 | # If false, no module index is generated. |
564 | 194 | #latex_use_modindex = True | 200 | #latex_use_modindex = True |
565 | 201 | |||
566 | 202 | # -- Options for extensions ---------------------------------------------------- | ||
567 | 203 | |||
568 | 204 | # pre-1.0 mode intersphinx: | ||
569 | 205 | extlinks = {'bug': ('https://bugs.launchpad.net/bugs/%s', 'LP: #')} | ||
570 | 195 | 206 | ||
571 | === modified file 'docs/configuration.rst' | |||
572 | --- docs/configuration.rst 2010-02-26 08:29:31 +0000 | |||
573 | +++ docs/configuration.rst 2011-02-20 21:52:17 +0000 | |||
574 | @@ -170,9 +170,8 @@ | |||
575 | 170 | **Reqired** | 170 | **Reqired** |
576 | 171 | String: The hostname of the IRC server to connect to. | 171 | String: The hostname of the IRC server to connect to. |
577 | 172 | 172 | ||
581 | 173 | Ibid `does not currently support | 173 | Ibid :bug:`does not currently support <363466>` falling back to |
582 | 174 | <https://bugs.launchpad.net/bugs/363466>`_ falling back to alternate | 174 | alternate servers, so you may want to use a round-robin hostname. |
580 | 175 | servers, so you may want to use a round-robin hostname. | ||
583 | 176 | 175 | ||
584 | 177 | .. describe:: port: | 176 | .. describe:: port: |
585 | 178 | 177 | ||
586 | 179 | 178 | ||
587 | === modified file 'docs/index.rst' | |||
588 | --- docs/index.rst 2010-01-12 16:29:15 +0000 | |||
589 | +++ docs/index.rst 2011-02-20 21:52:17 +0000 | |||
590 | @@ -11,6 +11,7 @@ | |||
591 | 11 | tutorial | 11 | tutorial |
592 | 12 | contributing | 12 | contributing |
593 | 13 | api/index | 13 | api/index |
594 | 14 | changes | ||
595 | 14 | 15 | ||
596 | 15 | 16 | ||
597 | 16 | Indices and tables | 17 | Indices and tables |
598 | 17 | 18 | ||
599 | === modified file 'setup.py' | |||
600 | --- setup.py 2011-02-20 20:34:20 +0000 | |||
601 | +++ setup.py 2011-02-20 21:52:17 +0000 | |||
602 | @@ -35,7 +35,7 @@ | |||
603 | 35 | 35 | ||
604 | 36 | setup( | 36 | setup( |
605 | 37 | name='Ibid', | 37 | name='Ibid', |
607 | 38 | version='0.1.0', | 38 | version='0.1.1', |
608 | 39 | description='Multi-protocol general purpose chat bot', | 39 | description='Multi-protocol general purpose chat bot', |
609 | 40 | url='http://ibid.omnia.za.net/', | 40 | url='http://ibid.omnia.za.net/', |
610 | 41 | keywords='chat bot irc jabber twisted messaging', | 41 | keywords='chat bot irc jabber twisted messaging', |
611 | 42 | 42 | ||
612 | === added directory 'tools' | |||
613 | === added file 'tools/format-changelog' | |||
614 | --- tools/format-changelog 1970-01-01 00:00:00 +0000 | |||
615 | +++ tools/format-changelog 2011-02-20 21:52:17 +0000 | |||
616 | @@ -0,0 +1,70 @@ | |||
617 | 1 | #!/usr/bin/env python | ||
618 | 2 | |||
619 | 3 | import optparse | ||
620 | 4 | import re | ||
621 | 5 | import subprocess | ||
622 | 6 | import textwrap | ||
623 | 7 | |||
624 | 8 | def process_block(block): | ||
625 | 9 | "Reformat a block into nice rst" | ||
626 | 10 | block = ''.join(block).decode('utf-8').strip() | ||
627 | 11 | |||
628 | 12 | template_re = re.compile(r'^\tAuthor: .*\n' | ||
629 | 13 | r'(?:\tMerge Request: .*\n)?' | ||
630 | 14 | r'\tApproved by: .*\n' | ||
631 | 15 | r'\tFixes LP: #(.*)$', | ||
632 | 16 | re.MULTILINE | re.UNICODE) | ||
633 | 17 | def repl(m): | ||
634 | 18 | bugs = [int(bug) for bug in m.group(1).split(',')] | ||
635 | 19 | if bugs: | ||
636 | 20 | bugs = [u':bug:`%i`' % bug for bug in bugs] | ||
637 | 21 | return u'\n\tFixes: %s.' % u', '.join(bugs) | ||
638 | 22 | return u'' | ||
639 | 23 | block = template_re.sub(repl, block) | ||
640 | 24 | |||
641 | 25 | block = block.splitlines() | ||
642 | 26 | |||
643 | 27 | wrapper = textwrap.TextWrapper(subsequent_indent=u' ') | ||
644 | 28 | for i, line in enumerate(block): | ||
645 | 29 | if not line.strip(): | ||
646 | 30 | line = u'' | ||
647 | 31 | |||
648 | 32 | if line.startswith(u'\t'): | ||
649 | 33 | line = u' ' + line[1:] | ||
650 | 34 | if i + 1 == len(block) or not block[i+1].strip(): | ||
651 | 35 | if not line.endswith(u'.'): | ||
652 | 36 | line += u'.' | ||
653 | 37 | |||
654 | 38 | line = u'\n'.join(wrapper.wrap(line)) | ||
655 | 39 | |||
656 | 40 | block[i] = line | ||
657 | 41 | |||
658 | 42 | block.append(u'') | ||
659 | 43 | block = u'\n'.join(block) | ||
660 | 44 | print block.encode('utf-8') | ||
661 | 45 | |||
662 | 46 | def main(): | ||
663 | 47 | parser = optparse.OptionParser() | ||
664 | 48 | parser.add_option('-r', '--revision', metavar='REVSPEC', | ||
665 | 49 | help='Passed to bzr') | ||
666 | 50 | opts, args = parser.parse_args() | ||
667 | 51 | |||
668 | 52 | cmd = ['bzr', 'log', '--gnu', '-n1'] | ||
669 | 53 | if opts.revision: | ||
670 | 54 | cmd.append('-r' + opts.revision) | ||
671 | 55 | p = subprocess.Popen(cmd, stdout=subprocess.PIPE) | ||
672 | 56 | |||
673 | 57 | head_re = re.compile(r'^\d{4}-\d{2}-\d{2} .+ <.+>$') | ||
674 | 58 | block = [] | ||
675 | 59 | for line in p.stdout: | ||
676 | 60 | if head_re.match(line): | ||
677 | 61 | process_block(block) | ||
678 | 62 | block = [] | ||
679 | 63 | block.append(line) | ||
680 | 64 | |||
681 | 65 | process_block(block) | ||
682 | 66 | |||
683 | 67 | assert p.wait() == 0 | ||
684 | 68 | |||
685 | 69 | if __name__ == '__main__': | ||
686 | 70 | main() |
Voting does not meet specified criteria. Required: Approve >= 2, Disapprove == 0. Got: 1 Approve.