- Feb 05, 2016
-
-
Dan Michael O. Heggø authored
[#106] fix GeneratorList with Python 3 (add __next__)
-
- Feb 03, 2016
-
-
Adam Williamson authored
Credit for this fix goes to @tosher: https://github.com/mwclient/mwclient/issues#issuecomment-154751657 I just figured out exactly what changes his comment suggested, and poked around a bit to figure out what was going on and why they're needed. `GeneratorList` (and things deriving from it, e.g. `Category`) was broken for iteration purposes in Python 3. In Python 3 the iterator protocol requires a `__next__` method, not a `next` method as in Python 2. 8d0650cd renamed `List`'s `next` method to `__next__` and added a small wrapper `next` method to account for this, but did not make the same change for `GeneratorList`. So when you iterate over a `GeneratorList` with Python 3, it winds up calling `List.__next__` (since `GeneratorList` inherits from `List`), not `GeneratorList.next`. So we don't hit the bit that turns the results into mwclient page objects, and just get the raw dicts from the `List` method. We also have to change a couple of direct calls to `List.next` to call `List.__next__` instead. If we don't do this, then when the call originates from a child class, things get messed up, because `List.next` calls `self.__next__` - and that will wind up calling the child class' `__next__`, not `List`'s `__next__`. Confused yet? :)
-
- Jan 23, 2016
-
-
Dan Michael O. Heggø authored
-
- Jan 10, 2016
-
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
- Nov 17, 2015
-
-
Waldir Pimenta authored
Fix two typos
-
Hugo authored
-
- Nov 10, 2015
-
-
Dan Michael O. Heggø authored
- Removing the need to use a double for loop to consume the the result by returning a list of revisions rather than a list of pages. - Parsing the timestamps using the standard parse_timestamp method - Adding tests (#84)
-
- Nov 09, 2015
-
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
Waldir Pimenta authored
Test in Python 3.5 too, now that it is out
-
hugovk authored
-
- Sep 27, 2015
-
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
Cache page text until next edit operation
-
- Sep 19, 2015
-
-
Adam Williamson authored
Store the results of page.text() operations in a simple cache dict. This avoids unnecessary remote roundtrips. Cache is cleared on each successful page.save() operation. cache argument can be set to 'False' to disable use of the cache.
-
- Sep 12, 2015
-
-
Waldir Pimenta authored
Remove unused local vars
-
jeroendedauw authored
-
- Aug 29, 2015
-
-
Dan Michael O. Heggø authored
-
Adam Williamson authored
This attribute goes back to an older design, where the 'edit page' workflow was different: the edit() method did part of the work of defining what text you meant to edit. In the current workflow, text() - which replaced the deprecated edit() - is only for retrieving text, and save() is supposed to do all the work of editing the page. The 'section' attribute is therefore obsolete and dangerous.
-
- Aug 24, 2015
-
-
Dan Michael O. Heggø authored
-
- Aug 23, 2015
-
-
Dan Michael O. Heggø authored
- Remove :ref:s from the headers, since they made the latex build crash - Add logo Remaining issue: - Can't get headings levels right on both the html and the latex builds at the same time. More info in #40
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
- Aug 18, 2015
-
-
Waldir Pimenta authored
-
- Aug 17, 2015
-
-
Dan Michael O. Heggø authored
While the 'backlinks' method has a 'redirect' option, there is no such option for the 'embeddedin' method.
-
- Aug 12, 2015
-
-
Waldir Pimenta authored
See 90b87566 for context
-
Waldir Pimenta authored
Also change link to the slightly user-friendly Phabricator (the url looks nicer without the escaped slash, too)
-
Dan Michael O. Heggø authored
Removing unsued import
-
PierreSelim authored
From client.py: time, random, sys, weakref From sleep.py: random
-
- Aug 11, 2015
-
-
Pierre-Selim authored
Merging changes from mwclient master
-
- Jul 26, 2015
-
-
Dan Michael O. Heggø authored
Since CirrusSearch (and Lucene?) doesn't support 'title'.
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
Since default values are evaluated only once, mutable objects shouldn't be used.
-
Dan Michael O. Heggø authored
I've no idea when this would actually be needed, but at least it should be fixed now.. It broke during the move to use the requests library.
-
Dan Michael O. Heggø authored
log.warn has been deprecated
-
Dan Michael O. Heggø authored
-