CommunityTechBot updated the task description. (Show Details) |
CHANGES TO TASK DESCRIPTION
26570726f6475636520796f757220627567207573696e67206120726563656e742076657273696f6e206f662074686520736f6674776172652c20746f2068652077696b6920636f6e74656e74206c616e67756167652e0a0a5468616e6b20796f752e0a546167730a436865636b557365720ad70a436f6e6e65637465642d4f70656e2d48657269746167652d42617463682d75706c6f61647320285241c42d4b4d425f315f323031372d3032290ad70a54616d696c2d53697465730ad70a47616d6570726573730ad70a48617368746167730ad70a4a4144450ad70a4b6172746f456469746f720ad70a4c616e67756167652d323031382d4170722d4a756e650ad70a4e65772d456469746f722d457870657269656e6365730ad70a4d61696c0ad70a5443422d5465616d0ad70a53756273637269626572730a4465736372697074696f6e20507265766965770a436f6e74656e77a6f6e652073657474696e6720696e20796f75722070726f66696c652c20636c69636b20746f207265636f6e63696c652eHello,
according to help(site.loadrevisions) page (quoted below) is mandatory unless ids is specified. It doesn't work, through. See following output.
```name=Steps to reproduce
$ python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.Site()
>>> site.loadrevisions(revids=16114288)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1426, in wrapper
return obj(*__args, **__kw)
TypeError: loadrevisions() takes at least 2 arguments (2 given)
>>>
```
```name=Help to site.loadrevisions
$ python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.Site()
>>> help(site.loadrevisions)
Help on method loadrevisions in module pywikibot.site:
loadrevisions(*__args, **__kw) method of pywikibot.site.APISite instance
Retrieve and store revision information.
By default, retrieves the last (current) revision of the page,
unless any of the optional parameters revids, startid, endid,
starttime, endtime, rvdir, user, excludeuser, or limit are
specified. Unless noted below, all parameters not specified
default to False.
If rvdir is False or not specified, startid must be greater than
endid if both are specified; likewise, starttime must be greater
than endtime. If rvdir is True, these relationships are reversed.
@param page: retrieve revisions of this Page (required unless ids
is specified)
@param content: if True, retrieve the wiki-text of each revision;
otherwise, only retrieve the revision metadata (default)
@type content: bool
@param section: if specified, retrieve only this section of the text
(content must be True); section must be given by number (top of
the article is section 0), not name
@type section: int
@param revids: retrieve only the specified revision ids (raise
Exception if any of revids does not correspond to page
@type revids: an int, a str or a list of ints or strings
@param startid: retrieve revisions starting with this revid
@param endid: stop upon retrieving this revid
@param starttime: retrieve revisions starting at this Timestamp
@param endtime: stop upon reaching this Timestamp
@param rvdir: if false, retrieve newest revisions first (default);
if true, retrieve earliest first
@param user: retrieve only revisions authored by this user
@param excludeuser: retrieve all revisions not authored by this user
@param sysop: if True, switch to sysop account (if available) to
retrieve this page
```
I think this should be fixed.
Martin
according to help(site.loadrevisions) page (quoted below) is mandatory unless ids is specified. It doesn't work, through. See following output.
```name=Steps to reproduce
$ python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.Site()
>>> site.loadrevisions(revids=16114288)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1426, in wrapper
return obj(*__args, **__kw)
TypeError: loadrevisions() takes at least 2 arguments (2 given)
>>>
```
```name=Help to site.loadrevisions
$ python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.Site()
>>> help(site.loadrevisions)
Help on method loadrevisions in module pywikibot.site:
loadrevisions(*__args, **__kw) method of pywikibot.site.APISite instance
Retrieve and store revision information.
By default, retrieves the last (current) revision of the page,
unless any of the optional parameters revids, startid, endid,
starttime, endtime, rvdir, user, excludeuser, or limit are
specified. Unless noted below, all parameters not specified
default to False.
If rvdir is False or not specified, startid must be greater than
endid if both are specified; likewise, starttime must be greater
than endtime. If rvdir is True, these relationships are reversed.
@param page: retrieve revisions of this Page (required unless ids
is specified)
@param content: if True, retrieve the wiki-text of each revision;
otherwise, only retrieve the revision metadata (default)
@type content: bool
@param section: if specified, retrieve only this section of the text
(content must be True); section must be given by number (top of
the article is section 0), not name
@type section: int
@param revids: retrieve only the specified revision ids (raise
Exception if any of revids does not correspond to page
@type revids: an int, a str or a list of ints or strings
@param startid: retrieve revisions starting with this revid
@param endid: stop upon retrieving this revid
@param starttime: retrieve revisions starting at this Timestamp
@param endtime: stop upon reaching this Timestamp
@param rvdir: if false, retrieve newest revisions first (default);
if true, retrieve earliest first
@param user: retrieve only revisions authored by this user
@param excludeuser: retrieve all revisions not authored by this user
@param sysop: if True, switch to sysop account (if available) to
retrieve this page
```
I think this should be fixed.
Martin
TASK DETAIL
EMAIL PREFERENCES
To: CommunityTechBot
Cc: Xqt, zhuyifei1999, Urbanecm, pywikibot-bugs-list, AndyTan, Zylc, 1978Gage2001, herron, Chicocvenancio, alanajjar, Magul, Tbscho, MayS, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, JJMC89, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp
Cc: Xqt, zhuyifei1999, Urbanecm, pywikibot-bugs-list, AndyTan, Zylc, 1978Gage2001, herron, Chicocvenancio, alanajjar, Magul, Tbscho, MayS, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, JJMC89, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs